littlekernel / lk

LK embedded kernel
MIT License
3.11k stars 611 forks source link

Saving FPU registers during IRQ Handler #385

Open Surysingh opened 10 months ago

Surysingh commented 10 months ago

Hi All,
For Aarch64, in file arch\arm64\exceptions.s, for arm64_irq_current_el_SPx, why floating point state and registers are not saved?

Is there not a chance that interrupt service routine / handler will use and hence corrupt the floating point registers

travisg commented 5 months ago

This is correct. Nothing in the IRQ or scheduler path should use the FPU, so the context is not saved. This speeds things up greatly, since it takes quite a bit of time and space to save the full fpu/vector state.