git.cappig.dev / apheleiaOS.git master

a7d58607929c5b39be6395ebb79f751997ea2873 master
cappig <[email protected]> ยท 4 months ago
Fix FPU context save/restore

* Use fnsave/frstor instead of fxsave/fxrstor on both
  architectures to avoid GP faults from unaligned operands
* Kernel heap does not guarantee 16-byte alignment required
  by fxsave; fnsave has no alignment requirement
* fnsave is sufficient since kernel is compiled with -mno-sse
  and only x87 FPU state needs saving
2 files changed, 11 insertions, 5 deletions
kernel/arch/x86/arch.c +5 -3
kernel/arch/x86/asm.h +6 -2