Hi,
I've made this changes, because syssetup does always crash ros in
KiHandleFpuFault line #462 on my smp machine. The crash is triggered from
fxsave in tskswitch.S after a win32 callback. I revert my changes.
- Hartmut
-----Original Message-----
From: ros-dev-bounces(a)reactos.com
[mailto:ros-dev-bounces@reactos.com] On Behalf Of Gregor Anich
Sent: Saturday, November 27, 2004 10:57 PM
To: ReactOS Development List
Subject: [ros-dev] Re: [ros-diffs] [CVS reactos] - Saved the
state of the fpu at a win32 call and restored the state
Hi Hartmut!
You have changed the w32 callback to save the FPU state, this
is wrong I
think!
I was wondering too wether it should be saved so GvG
suggested to check
myself and I modified our winhello app...
It prints out the FPU control word, calls CreateWindow and printf the
FPU control word again.
In the callback for the WM_CREATE message (produced by
CreateWindow) it
also prints the control word, then modifies it (and prints
the modified one)
This is the output on windows2000:
Original FPU control word: 0x8001f
WM_CREATE: Original FPU control word: 0x8001f
WM_CREATE: Modified FPU control word: 0xa001f
FPU control word after CreateWindow: 0xa001f
Of course I have attached the program.
I am not sure but I think in the KiClearFloatingPointState which you
have added you have to set KPCR->NpxThread to NULL if it's
CurrentThread
before you do the fn/xsave because it could raise a delayed FPU
exception (which will be ignored when KPCR->CurrentThread is
NULL and be
delivered when the saved FPU state is restored for the thread)
I think I have made the same mistake in tskswitch.S - I am
pretty sure
it has to be fixed there because we don't want a FPU exception to be
raised while we are in a cli/sti block and switching to another task.
- blight