From e18680bb11371772a7d351384aa17d670a3dbe72 Mon Sep 17 00:00:00 2001 From: Sir Richard Date: Sat, 23 Jan 2010 19:28:26 +0000 Subject: [PATCH] [NTOS]: KiDispatchInterrupt crushes EBX, so maybe it should preserve it first? This only worked because KiDispatchInterrupt was only called by ASM code that already was magically aware of this fact, and preserved (or didn't use) EBX before making the call. Yuck! svn path=/trunk/; revision=45212 --- reactos/ntoskrnl/ke/i386/trap.s | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/reactos/ntoskrnl/ke/i386/trap.s b/reactos/ntoskrnl/ke/i386/trap.s index ae72a1ba8be..cc2a202cec1 100644 --- a/reactos/ntoskrnl/ke/i386/trap.s +++ b/reactos/ntoskrnl/ke/i386/trap.s @@ -320,6 +320,9 @@ _KeUpdateSystemTime@0: .func KiDispatchInterrupt@0 _KiDispatchInterrupt@0: + /* Preserve EBX */ + push ebx + /* Get the PCR and disable interrupts */ mov ebx, PCR[KPCR_SELF] cli @@ -418,12 +421,14 @@ GetNext: Return: /* All done */ + pop ebx ret QuantumEnd: /* Disable quantum end and process it */ mov byte ptr [ebx+KPCR_PRCB_QUANTUM_END], 0 call _KiQuantumEnd@0 + pop ebx ret .endfunc