Author: sir_richard Date: Sat Jan 23 20:28:26 2010 New Revision: 45212
URL: http://svn.reactos.org/svn/reactos?rev=45212&view=rev Log: [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!
Modified: trunk/reactos/ntoskrnl/ke/i386/trap.s
Modified: trunk/reactos/ntoskrnl/ke/i386/trap.s URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/trap.s?rev... ============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/trap.s [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/trap.s [iso-8859-1] Sat Jan 23 20:28:26 2010 @@ -320,6 +320,9 @@ .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 @@
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