Author: ion
Date: Wed Aug 23 02:45:45 2006
New Revision: 23654
URL:
http://svn.reactos.org/svn/reactos?rev=23654&view=rev
Log:
- Add the code necessary in the C version of KeLowerIRql to properly mask the PIC, and
enable #ifed code in ASM KeRaiseIrql to mask the PIC, since it now works.
Modified:
trunk/reactos/hal/halx86/generic/irq.S
trunk/reactos/hal/halx86/generic/irql.c
Modified: trunk/reactos/hal/halx86/generic/irq.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/irq.S?r…
==============================================================================
--- trunk/reactos/hal/halx86/generic/irq.S (original)
+++ trunk/reactos/hal/halx86/generic/irq.S Wed Aug 23 02:45:45 2006
@@ -464,14 +464,12 @@
/* Set the new IRQL */
mov [fs:KPCR_IRQL], cl
-#if 0
/* Mask the interrupts in the PIC */
mov eax, _KiI8259MaskTable[ecx*4]
or eax, [fs:KPCR_IDR]
out 0x21, al
shr eax, 8
out 0xA1, al
-#endif
/* Restore interrupts and return old IRQL */
popf
Modified: trunk/reactos/hal/halx86/generic/irql.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/irql.c?…
==============================================================================
--- trunk/reactos/hal/halx86/generic/irql.c (original)
+++ trunk/reactos/hal/halx86/generic/irql.c Wed Aug 23 02:45:45 2006
@@ -51,6 +51,15 @@
VOID STATIC
HalpLowerIrql(KIRQL NewIrql)
{
+ ULONG Mask;
+
+ if (KeGetPcr()->Irql > DISPATCH_LEVEL)
+ {
+ Mask = KeGetPcr()->IDR | KiI8259MaskTable[NewIrql];
+ WRITE_PORT_UCHAR((PUCHAR)0x21, (UCHAR)Mask);
+ Mask >>= 8;
+ WRITE_PORT_UCHAR((PUCHAR)0xa1, (UCHAR)Mask);
+ }
if (NewIrql >= PROFILE_LEVEL)
{
KeGetPcr()->Irql = NewIrql;
@@ -112,6 +121,7 @@
HalpLowerIrql(NewIrql);
}
+
VOID STDCALL HalEndSystemInterrupt (KIRQL Irql, ULONG Unknown2)
/*
* FUNCTION: Finish a system interrupt and restore the specified irq level.