Author: tkreuzer
Date: Fri Sep 16 09:46:08 2011
New Revision: 53720
URL:
http://svn.reactos.org/svn/reactos?rev=53720&view=rev
Log:
[NTOSKRNL/AMD64]
- Fix KiGeneralProtectionFault
- Don't bugcheck in KiUnexpectedInterrupt
- Remove debugprint in KiEndInterrupt, and instead assert, its called from the clock
interrupt, since thats the only instance we handle right now
Modified:
trunk/reactos/ntoskrnl/include/internal/amd64/ke.h
trunk/reactos/ntoskrnl/ke/amd64/krnlinit.c
trunk/reactos/ntoskrnl/ke/amd64/trap.S
Modified: trunk/reactos/ntoskrnl/include/internal/amd64/ke.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1] Fri Sep 16 09:46:08
2011
@@ -238,7 +238,8 @@
KiEndInterrupt(IN KIRQL Irql,
IN PKTRAP_FRAME TrapFrame)
{
- DbgPrint("KiEndInterrupt is unimplemented\n");
+ /* Make sure this is from the clock handler */
+ ASSERT(TrapFrame->ErrorCode == 0xc10c4);
}
BOOLEAN
Modified: trunk/reactos/ntoskrnl/ke/amd64/krnlinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/amd64/krnlinit…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/amd64/krnlinit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/amd64/krnlinit.c [iso-8859-1] Fri Sep 16 09:46:08 2011
@@ -79,6 +79,9 @@
/* Initialize PRCB pool lookaside pointers */
ExInitPoolLookasidePointers();
+
+ /* Lower to APC_LEVEL */
+ KeLowerIrql(APC_LEVEL);
/* Check if this is the boot cpu */
if (Prcb->Number == 0)
@@ -153,9 +156,6 @@
/* Set the current MP Master KPRCB to the Boot PRCB */
Prcb->MultiThreadSetMaster = Prcb;
- /* Lower to APC_LEVEL */
- KeLowerIrql(APC_LEVEL);
-
/* Initialize Bugcheck Callback data */
InitializeListHead(&KeBugcheckCallbackListHead);
InitializeListHead(&KeBugcheckReasonCallbackListHead);
Modified: trunk/reactos/ntoskrnl/ke/amd64/trap.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/amd64/trap.S?r…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] Fri Sep 16 09:46:08 2011
@@ -637,12 +637,13 @@
/* We have an error code */
ENTER_TRAP_FRAME (TRAPFLAG_HAS_ERRORCODE OR TRAPFLAG_ALL)
- TRAPINFO KiGeneralProtectionFault
- mov rdx, [rbp + KTRAP_FRAME_Rip]
- lea rcx, MsgGeneralProtFault[rip]
- call qword ptr FrLdrDbgPrint[rip]
+ //TRAPINFO KiGeneralProtectionFault
+ //mov rdx, [rbp + KTRAP_FRAME_Rip]
+ //lea rcx, MsgGeneralProtFault[rip]
+ //call qword ptr FrLdrDbgPrint[rip]
/* Call the C handler */
+ mov rcx, rbp
call KiGeneralProtectionFaultHandler
/* Check for success */
@@ -890,9 +891,9 @@
PUBLIC KiUnexpectedInterrupt
.PROC KiUnexpectedInterrupt
/* The error code is the vector */
- cli
- ENTER_TRAP_FRAME (TRAPFLAG_HAS_ERRORCODE OR TRAPFLAG_ALL)
-
+ ENTER_TRAP_FRAME (TRAPFLAG_HAS_ERRORCODE OR TRAPFLAG_ALL)
+
+#if 0
/* Set bugcheck parameters */
mov ecx, TRAP_CAUSE_UNKNOWN
mov rdx, [rbp + KTRAP_FRAME_ErrorCode] // the vector
@@ -901,8 +902,10 @@
sub rsp, 8
mov [rbp + KTRAP_FRAME_P5 + 8], rbp // trap frame
call KeBugCheckWithTf
-
- jmp $
+ jmp $
+#endif
+ LEAVE_TRAP_FRAME;
+ iretq
.ENDP KiUnexpectedInterrupt
#ifdef _MSC_VER