reactos/ntoskrnl/ke/i386
George Bișoc 064a35dc67
[NTOS:KE] Fully implement FPU Save/Restore mechanism
This commit fully implements the inner logic of KeSaveFloatingPointState and KeRestoreFloatingPointState routines. On ReactOS we're currently simply doing a FNSAVE operation whereas on Windows it is a lot more than that.

On Windows Server 2003 the logic more or less goes like this. In order to save the FPU state the NPX state of the current thread has to be checked first, that is, if NPX is loaded and currently charged for the current thread then the system will acquire the NPX registers actively present. From that point it performs either a FNSAVE or FXSAVE
if FX is actually supported. Otherwise the control word and MXCsr registers are obtained.

FXSAVE/FNSAVE operation is done solely if the FX save area is held up in a pool allocation. Pool allocation occurs if it's been found out that the NPX IRQL of the thread is not the same as the current thread which from where it determines if the interrupt level is APC then allocate some pool memory and hold the save area there, otherwise
the save area in question is grabbed from the current processor control region. If NPX is not loaded for the current thread then the FPU state is obtained from the NPX frame.

In our case we'll be doing something way simpler. Only do a FXSAVE/FNSAVE directly of the FPU state registers, in this way we are simplifying the code and the actual logic of Save/Restore mechanism.
2022-05-24 18:39:45 +02:00
..
abios.c
context.c
cpu.c [NTOS:KE] Fully implement FPU Save/Restore mechanism 2022-05-24 18:39:45 +02:00
ctxswitch.S [FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces 2021-06-11 15:33:08 +03:00
exp.c [NTOS:KE] Remove all checks for x87 not being present 2022-01-25 02:12:33 +03:00
irqobj.c
kiinit.c [NDK][HAL][NTOS] Add missing PRCB_MINOR_VERSION / PRCB_MAJOR_VERSION and use them. 2022-05-07 18:14:38 +02:00
ldt.c
mtrr.c [REACTOS] Cleanup INIT and some PAGE section allocations 2020-11-02 21:45:31 +03:00
patpge.c [REACTOS] Cleanup INIT and some PAGE section allocations 2020-11-02 21:45:31 +03:00
thrdini.c [NTOS:KE] Remove all checks for x87 not being present 2022-01-25 02:12:33 +03:00
trap.s [NTOS:KE] Rewrite KiSystemCallTrampoline in assembly 2021-04-06 17:57:18 +02:00
traphdlr.c [NTOS:KE] KiTrap0EHandler(): Use MI_IS_WRITE_ACCESS() 2021-11-04 23:20:21 +03:00
usercall.c [NTOS:KE] Fix stack memory disclosure in KiInitializeUserApc (#2988) 2020-07-27 03:39:48 +03:00
usercall_asm.S
v86vdm.c [NTOSKRNL] Regroup the pool allocation tags in one dedicated place 2021-12-27 18:57:03 +01:00
zeropage.S [NTOS:KE] Rewrite KeZeroPages in assembly 2021-08-04 17:48:39 +02:00