Author: tkreuzer
Date: Tue Jan 5 00:00:35 2010
New Revision: 44937
URL:
http://svn.reactos.org/svn/reactos?rev=44937&view=rev
Log:
[KE]
Improve KiDoubleFaultAbort
Modified:
branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S
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] Tue Jan 5
00:00:35 2010
@@ -32,6 +32,9 @@
_MsgInvalidOpcodeFault:
.ascii "General protection fault at %p!\n\0"
+
+_MsgDoubleFault:
+.ascii "Double fault at %p, rbp=%p!\n\0"
_MsgTrapInfo:
.ascii "Trap: %s at %p\n\0"
@@ -430,20 +433,23 @@
push 0
.allocstack 0x8
- /* Reserve stack space for parameters */
- sub rsp, 0x28
- .allocstack 0x28
+ ENTER_TRAP_FRAME TRAPFLAG_ALL
+
+ lea rcx, _MsgDoubleFault[rip]
+ mov rdx, [rbp + KTRAP_FRAME_FaultAddress]
+ mov r8, rbp
+ call _FrLdrDbgPrint[rip]
/* Bugcheck code UNEXPECTED_KERNEL_MODE_TRAP */
mov rcx, 0x0000007F
/* Set double fault parameters */
- mov rdx, 0x00000008
+ mov rdx, 0x00000008 // EXCEPTION_DOUBLE_FAULT
mov r8, 0
mov r9, 0
- mov qword ptr [rsp + 0x20], 0
-
- call _KeBugCheckEx
+ mov [rbp + KTRAP_FRAME_P5], rbp // trap frame (HACKY)
+ push 0
+ call _KeBugCheckWithTf
jmp $
.endproc
@@ -773,8 +779,13 @@
.proc KiUnexpectedInterrupt
.pushframe 0
- push 0
- .allocstack 0x8
+ /* Push pseudo error code */
+ push 0
+ .allocstack 0x8
+
+ cli
+
+ ENTER_TRAP_FRAME TRAPFLAG_ALL
lea rcx, _MsgUnexpectedInterrupt[rip]
call _FrLdrDbgPrint[rip]