mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 02:25:40 +00:00
- Enable 2nd entry for HalEndSystemInterrupt but not actually using the optimized 2nd entry since ROS IRQs are currently built with a completely different trap frame.
svn path=/trunk/; revision=23665
This commit is contained in:
parent
9ac4b05366
commit
7fa6c080b5
1 changed files with 23 additions and 23 deletions
|
@ -35,8 +35,7 @@ PICInitTable:
|
||||||
/* End of initialization table */
|
/* End of initialization table */
|
||||||
.short 0
|
.short 0
|
||||||
|
|
||||||
.globl _KiI8259MaskTable
|
KiI8259MaskTable:
|
||||||
_KiI8259MaskTable:
|
|
||||||
.long 0 /* IRQL 0 */
|
.long 0 /* IRQL 0 */
|
||||||
.long 0 /* IRQL 1 */
|
.long 0 /* IRQL 1 */
|
||||||
.long 0 /* IRQL 2 */
|
.long 0 /* IRQL 2 */
|
||||||
|
@ -83,8 +82,7 @@ HalpSysIntHandler:
|
||||||
.long GenericIRQ /* IRQ 16-35 */
|
.long GenericIRQ /* IRQ 16-35 */
|
||||||
.endr
|
.endr
|
||||||
|
|
||||||
.globl _SoftIntByteTable
|
SoftIntByteTable:
|
||||||
_SoftIntByteTable:
|
|
||||||
.byte PASSIVE_LEVEL /* IRR 0 */
|
.byte PASSIVE_LEVEL /* IRR 0 */
|
||||||
.byte PASSIVE_LEVEL /* IRR 1 */
|
.byte PASSIVE_LEVEL /* IRR 1 */
|
||||||
.byte APC_LEVEL /* IRR 2 */
|
.byte APC_LEVEL /* IRR 2 */
|
||||||
|
@ -94,8 +92,7 @@ _SoftIntByteTable:
|
||||||
.byte DISPATCH_LEVEL /* IRR 6 */
|
.byte DISPATCH_LEVEL /* IRR 6 */
|
||||||
.byte DISPATCH_LEVEL /* IRR 7 */
|
.byte DISPATCH_LEVEL /* IRR 7 */
|
||||||
|
|
||||||
.globl _SoftIntHandlerTable
|
SoftIntHandlerTable:
|
||||||
_SoftIntHandlerTable:
|
|
||||||
.long _KiUnexpectedInterrupt /* PASSIVE_LEVEL */
|
.long _KiUnexpectedInterrupt /* PASSIVE_LEVEL */
|
||||||
.long _HalpApcInterrupt /* APC_LEVEL */
|
.long _HalpApcInterrupt /* APC_LEVEL */
|
||||||
.long _HalpDispatchInterrupt /* DISPATCH_LEVEL */
|
.long _HalpDispatchInterrupt /* DISPATCH_LEVEL */
|
||||||
|
@ -175,12 +172,12 @@ _@HalRequestSoftwareInterrupt@4:
|
||||||
|
|
||||||
/* Get highest pending software interrupt and check if it's higher */
|
/* Get highest pending software interrupt and check if it's higher */
|
||||||
xor edx, edx
|
xor edx, edx
|
||||||
mov dl, _SoftIntByteTable[eax]
|
mov dl, SoftIntByteTable[eax]
|
||||||
cmp dl, cl
|
cmp dl, cl
|
||||||
jbe AfterCall
|
jbe AfterCall
|
||||||
|
|
||||||
/* Call the pending interrupt */
|
/* Call the pending interrupt */
|
||||||
call _SoftIntHandlerTable[edx*4]
|
call SoftIntHandlerTable[edx*4]
|
||||||
|
|
||||||
AfterCall:
|
AfterCall:
|
||||||
|
|
||||||
|
@ -272,7 +269,7 @@ AfterMask:
|
||||||
|
|
||||||
/* Get the current IRQL and mask the IRQs in the PIC */
|
/* Get the current IRQL and mask the IRQs in the PIC */
|
||||||
movzx eax, byte ptr [fs:KPCR_IRQL]
|
movzx eax, byte ptr [fs:KPCR_IRQL]
|
||||||
mov eax, _KiI8259MaskTable[eax*4]
|
mov eax, KiI8259MaskTable[eax*4]
|
||||||
or eax, [fs:KPCR_IDR]
|
or eax, [fs:KPCR_IDR]
|
||||||
out 0x21, al
|
out 0x21, al
|
||||||
shr eax, 8
|
shr eax, 8
|
||||||
|
@ -336,7 +333,7 @@ GenericIRQ:
|
||||||
mov [fs:KPCR_IRQL], al
|
mov [fs:KPCR_IRQL], al
|
||||||
|
|
||||||
/* Set IRQ mask in the PIC */
|
/* Set IRQ mask in the PIC */
|
||||||
mov eax, _KiI8259MaskTable[eax*4]
|
mov eax, KiI8259MaskTable[eax*4]
|
||||||
or eax, [fs:KPCR_IDR]
|
or eax, [fs:KPCR_IDR]
|
||||||
out 0x21, al
|
out 0x21, al
|
||||||
shr eax, 8
|
shr eax, 8
|
||||||
|
@ -377,7 +374,7 @@ _HalEndSystemInterrupt@8:
|
||||||
jbe SkipMask2
|
jbe SkipMask2
|
||||||
|
|
||||||
/* Hardware interrupt, mask the appropriate IRQs in the PIC */
|
/* Hardware interrupt, mask the appropriate IRQs in the PIC */
|
||||||
mov eax, _KiI8259MaskTable[ecx*4]
|
mov eax, KiI8259MaskTable[ecx*4]
|
||||||
or eax, [fs:KPCR_IDR]
|
or eax, [fs:KPCR_IDR]
|
||||||
out 0x21, al
|
out 0x21, al
|
||||||
shr eax, 8
|
shr eax, 8
|
||||||
|
@ -388,16 +385,19 @@ SkipMask2:
|
||||||
/* Set IRQL and check if there are pending software interrupts */
|
/* Set IRQL and check if there are pending software interrupts */
|
||||||
mov [fs:KPCR_IRQL], cl
|
mov [fs:KPCR_IRQL], cl
|
||||||
mov eax, [fs:KPCR_IRR]
|
mov eax, [fs:KPCR_IRR]
|
||||||
mov al, _SoftIntByteTable[eax]
|
mov al, SoftIntByteTable[eax]
|
||||||
cmp al, cl
|
cmp al, cl
|
||||||
//ja DoCall
|
ja DoCall
|
||||||
ret 8
|
ret 8
|
||||||
|
|
||||||
DoCall:
|
DoCall:
|
||||||
|
|
||||||
/* There are pending softwate interrupts, call their handlers */
|
/* There are pending software interrupts, call their handlers */
|
||||||
add esp, 12
|
/* FIXME: Because ROS IRQs don't setup a nice trap frame yet, we can't optimize a 2nd entry */
|
||||||
jmp SoftIntHandlerTable2[eax*4]
|
//add esp, 12
|
||||||
|
//jmp SoftIntHandlerTable2[eax*4]
|
||||||
|
call SoftIntHandlerTable[eax*4]
|
||||||
|
ret 8
|
||||||
.endfunc
|
.endfunc
|
||||||
|
|
||||||
.globl @KfLowerIrql@4
|
.globl @KfLowerIrql@4
|
||||||
|
@ -415,7 +415,7 @@ _@KfLowerIrql@4:
|
||||||
jbe SkipMask
|
jbe SkipMask
|
||||||
|
|
||||||
/* Clear interrupt masks since there's a pending hardware interrupt */
|
/* Clear interrupt masks since there's a pending hardware interrupt */
|
||||||
mov eax, _KiI8259MaskTable[ecx*4]
|
mov eax, KiI8259MaskTable[ecx*4]
|
||||||
or eax, [fs:KPCR_IDR]
|
or eax, [fs:KPCR_IDR]
|
||||||
out 0x21, al
|
out 0x21, al
|
||||||
shr eax, 8
|
shr eax, 8
|
||||||
|
@ -426,12 +426,12 @@ SkipMask:
|
||||||
/* Set the new IRQL and check if there's a pending software interrupt */
|
/* Set the new IRQL and check if there's a pending software interrupt */
|
||||||
mov [fs:KPCR_IRQL], cl
|
mov [fs:KPCR_IRQL], cl
|
||||||
mov eax, [fs:KPCR_IRR]
|
mov eax, [fs:KPCR_IRR]
|
||||||
mov al, _SoftIntByteTable[eax]
|
mov al, SoftIntByteTable[eax]
|
||||||
cmp al, cl
|
cmp al, cl
|
||||||
jbe DoCall3
|
jbe DoCall3
|
||||||
|
|
||||||
/* There is, call it */
|
/* There is, call it */
|
||||||
call _SoftIntHandlerTable[eax*4]
|
call SoftIntHandlerTable[eax*4]
|
||||||
|
|
||||||
DoCall3:
|
DoCall3:
|
||||||
|
|
||||||
|
@ -464,7 +464,7 @@ _@KfRaiseIrql@4:
|
||||||
mov [fs:KPCR_IRQL], cl
|
mov [fs:KPCR_IRQL], cl
|
||||||
|
|
||||||
/* Mask the interrupts in the PIC */
|
/* Mask the interrupts in the PIC */
|
||||||
mov eax, _KiI8259MaskTable[ecx*4]
|
mov eax, KiI8259MaskTable[ecx*4]
|
||||||
or eax, [fs:KPCR_IDR]
|
or eax, [fs:KPCR_IDR]
|
||||||
out 0x21, al
|
out 0x21, al
|
||||||
shr eax, 8
|
shr eax, 8
|
||||||
|
@ -513,7 +513,7 @@ _KeRaiseIrqlToSynchLevel@0:
|
||||||
cli
|
cli
|
||||||
|
|
||||||
/* Mask out interrupts */
|
/* Mask out interrupts */
|
||||||
mov eax, _KiI8259MaskTable + DISPATCH_LEVEL * 2
|
mov eax, KiI8259MaskTable + DISPATCH_LEVEL * 2
|
||||||
or eax, [fs:KPCR_IDR]
|
or eax, [fs:KPCR_IDR]
|
||||||
out 0x21, al
|
out 0x21, al
|
||||||
shr eax, 8
|
shr eax, 8
|
||||||
|
@ -616,7 +616,7 @@ _HalpEndSoftwareInterrupt@4:
|
||||||
jbe SoftwareInt
|
jbe SoftwareInt
|
||||||
|
|
||||||
/* Set the right mask in the PIC for the hardware IRQ */
|
/* Set the right mask in the PIC for the hardware IRQ */
|
||||||
mov eax, _KiI8259MaskTable[ecx*4]
|
mov eax, KiI8259MaskTable[ecx*4]
|
||||||
or eax, [fs:KPCR_IDR]
|
or eax, [fs:KPCR_IDR]
|
||||||
out 0x21, al
|
out 0x21, al
|
||||||
shr eax, 8
|
shr eax, 8
|
||||||
|
@ -626,7 +626,7 @@ SoftwareInt:
|
||||||
/* Check if there are pending software interrupts */
|
/* Check if there are pending software interrupts */
|
||||||
mov [fs:KPCR_IRQL], cl
|
mov [fs:KPCR_IRQL], cl
|
||||||
mov eax, [fs:KPCR_IRR]
|
mov eax, [fs:KPCR_IRR]
|
||||||
mov al, _SoftIntByteTable[eax]
|
mov al, SoftIntByteTable[eax]
|
||||||
cmp al, cl
|
cmp al, cl
|
||||||
ja DoCall2
|
ja DoCall2
|
||||||
ret 4
|
ret 4
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue