Author: tkreuzer
Date: Thu Jan 21 19:00:23 2010
New Revision: 45185
URL:
http://svn.reactos.org/svn/reactos?rev=45185&view=rev
Log:
[NTOS]
- Fix bugcheck paramters in KiGeneralProtectionFault
- Disable x87 fpu exceptions
Modified:
branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c
branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c [iso-8859-1] Thu Jan 21
19:00:23 2010
@@ -179,6 +179,11 @@
/* Disable fpu monitoring */
__writecr0(__readcr0() & ~CR0_MP);
+
+ /* Disable x87 fpu exceptions */
+ __writecr0(__readcr0() & ~CR0_NE);
+
+ asm volatile ("fninit\n");
}
VOID
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] Thu Jan 21
19:00:23 2010
@@ -588,12 +588,11 @@
/* Bugcheck */
mov ecx, UNEXPECTED_KERNEL_MODE_TRAP
mov rdx, 0x0000D // EXCEPTION_GP_FAULT
- xor rdx, rdx
xor r8, r8
- xor r9, r9 // Reserved
- mov [rbp + KTRAP_FRAME_P5], rbp // trap frame
+ mov r9, [rbp + KTRAP_FRAME_ErrorCode] // error code
+ sub rsp, 8
+ mov [rsp + KTRAP_FRAME_P5+8], rbp // trap frame
call _KeBugCheckWithTf
-
KiGpfPopSegDs: