[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

svn path=/trunk/; revision=53720
This commit is contained in:
Timo Kreuzer 2011-09-16 09:46:08 +00:00
parent 4dfa3c52a3
commit 331009e07d
3 changed files with 14 additions and 10 deletions

View file

@ -238,7 +238,8 @@ FORCEINLINE
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

View file

@ -80,6 +80,9 @@ KiSystemStartupBootStack(VOID)
/* 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 @@ KiInitializeKernel(IN PKPROCESS InitProcess,
/* 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);

View file

@ -637,12 +637,13 @@ PUBLIC KiGeneralProtectionFault
/* 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 KiIpiInterrupt
PUBLIC KiUnexpectedInterrupt
.PROC KiUnexpectedInterrupt
/* The error code is the vector */
cli
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 @@ PUBLIC KiUnexpectedInterrupt
sub rsp, 8
mov [rbp + KTRAP_FRAME_P5 + 8], rbp // trap frame
call KeBugCheckWithTf
jmp $
#endif
LEAVE_TRAP_FRAME;
iretq
.ENDP KiUnexpectedInterrupt
#ifdef _MSC_VER