mirror of
https://github.com/reactos/reactos.git
synced 2024-11-04 22:00:55 +00:00
064a35dc67
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. |
||
---|---|---|
.. | ||
abios.c | ||
context.c | ||
cpu.c | ||
ctxswitch.S | ||
exp.c | ||
irqobj.c | ||
kiinit.c | ||
ldt.c | ||
mtrr.c | ||
patpge.c | ||
thrdini.c | ||
trap.s | ||
traphdlr.c | ||
usercall.c | ||
usercall_asm.S | ||
v86vdm.c | ||
zeropage.S |