Hi,
I think we need two floating save areas, one for user mode and one for kernel mode. The area for kernel mode is necessary because win32k and freetype are using the fpu. The kernel mode area is not necessary if we protect some function in win32k with KeSaveFloatingPointState/KeRestoreFloatingPointState. The start of the areas should be calculate as a offset from the top of the kernel stack and not as offset from the user mode trap frame. The state of the fpu must be saved on a thread switch and if the fpu was used. At this point the start of the user mode trap frame is only known as an offset from the top of the stack.
- Hartmut
-----Original Message----- From: ros-dev-bounces@reactos.com [mailto:ros-dev-bounces@reactos.com] On Behalf Of KJK::Hyperion Sent: Wednesday, October 13, 2004 8:13 AM To: ros-dev@reactos.com Subject: [ros-dev] Kernel-mode stack layout (FPU save area, trap frames,etc.)
I've finally taken the time to write it all down:
http://mok.lvcm.com/cgi-bin/reactos/roswiki?KernelModeStackLayout
Let me know if you see any mistakes or omissions