Author: tkreuzer
Date: Sat Feb 13 03:01:33 2010
New Revision: 45590
URL:
http://svn.reactos.org/svn/reactos?rev=45590&view=rev
Log:
[NTOS] Push vector as error code on the stack in KiUnexpectedInterrupt* instead of putting
it into eax, because we must not clobber it. Spotted by jcatena.
Modified:
trunk/reactos/ntoskrnl/ke/i386/irqobj.c
trunk/reactos/ntoskrnl/ke/i386/trap.s
Modified: trunk/reactos/ntoskrnl/ke/i386/irqobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/irqobj.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/irqobj.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/i386/irqobj.c [iso-8859-1] Sat Feb 13 03:01:33 2010
@@ -168,7 +168,7 @@
KeGetCurrentPrcb()->InterruptCount++;
/* Start the interrupt */
- if (HalBeginSystemInterrupt(HIGH_LEVEL, TrapFrame->Eax, &OldIrql))
+ if (HalBeginSystemInterrupt(HIGH_LEVEL, TrapFrame->ErrCode, &OldIrql))
{
/* Warn user */
DPRINT1("\n\x7\x7!!! Unexpected Interrupt %02lx !!!\n");
Modified: trunk/reactos/ntoskrnl/ke/i386/trap.s
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/trap.s?re…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/trap.s [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/i386/trap.s [iso-8859-1] Sat Feb 13 03:01:33 2010
@@ -20,7 +20,7 @@
MACRO(GENERATE_INT_HANDLER, Number)
.func KiUnexpectedInterrupt&Number
_KiUnexpectedInterrupt&Number:
- mov eax, PRIMARY_VECTOR_BASE + Number
+ push PRIMARY_VECTOR_BASE + Number
jmp _KiEndUnexpectedRange@0
.endfunc
ENDM
@@ -103,7 +103,7 @@
TRAP_ENTRY KiCallbackReturn, KI_PUSH_FAKE_ERROR_CODE
TRAP_ENTRY KiRaiseAssertion, KI_PUSH_FAKE_ERROR_CODE
TRAP_ENTRY KiDebugService, KI_PUSH_FAKE_ERROR_CODE
-TRAP_ENTRY KiUnexpectedInterruptTail, KI_PUSH_FAKE_ERROR_CODE
+TRAP_ENTRY KiUnexpectedInterruptTail, 0
ALIGN 4
EXTERN @KiInterruptTemplateHandler@8