- Fix bugcheck paramters in KiGeneralProtectionFault
- Disable x87 fpu exceptions

svn path=/branches/ros-amd64-bringup/; revision=45185
This commit is contained in:
Timo Kreuzer 2010-01-21 18:00:23 +00:00
parent bc00bfdb25
commit b9ebd4c107
2 changed files with 8 additions and 4 deletions

View file

@ -179,6 +179,11 @@ KiInitializeCpuFeatures(ULONG Cpu)
/* Disable fpu monitoring */ /* Disable fpu monitoring */
__writecr0(__readcr0() & ~CR0_MP); __writecr0(__readcr0() & ~CR0_MP);
/* Disable x87 fpu exceptions */
__writecr0(__readcr0() & ~CR0_NE);
asm volatile ("fninit\n");
} }
VOID VOID

View file

@ -588,14 +588,13 @@ KiGpfFatal:
/* Bugcheck */ /* Bugcheck */
mov ecx, UNEXPECTED_KERNEL_MODE_TRAP mov ecx, UNEXPECTED_KERNEL_MODE_TRAP
mov rdx, 0x0000D // EXCEPTION_GP_FAULT mov rdx, 0x0000D // EXCEPTION_GP_FAULT
xor rdx, rdx
xor r8, r8 xor r8, r8
xor r9, r9 // Reserved mov r9, [rbp + KTRAP_FRAME_ErrorCode] // error code
mov [rbp + KTRAP_FRAME_P5], rbp // trap frame sub rsp, 8
mov [rsp + KTRAP_FRAME_P5+8], rbp // trap frame
call _KeBugCheckWithTf call _KeBugCheckWithTf
KiGpfPopSegDs: KiGpfPopSegDs:
mov [rbp + KTRAP_FRAME_SegDs], dx mov [rbp + KTRAP_FRAME_SegDs], dx
jmp KiGpfPopSeg jmp KiGpfPopSeg