mirror of
https://github.com/reactos/reactos.git
synced 2024-09-11 05:12:43 +00:00
- Switch HalEndSystemInterrupt to ASM version and get completely rid of the irql.C file.
svn path=/trunk/; revision=23663
This commit is contained in:
parent
a82987f860
commit
280da54a61
|
@ -31,7 +31,6 @@
|
||||||
<define name="_NTHAL_" />
|
<define name="_NTHAL_" />
|
||||||
<define name="__USE_W32API" />
|
<define name="__USE_W32API" />
|
||||||
<file>ipi.c</file>
|
<file>ipi.c</file>
|
||||||
<file>irql.c</file>
|
|
||||||
<file>irq.S</file>
|
<file>irq.S</file>
|
||||||
<file>processor.c</file>
|
<file>processor.c</file>
|
||||||
<file>resource.c</file>
|
<file>resource.c</file>
|
||||||
|
|
|
@ -367,7 +367,6 @@ DoneBegin:
|
||||||
ret 12
|
ret 12
|
||||||
.endfunc
|
.endfunc
|
||||||
|
|
||||||
#if 0
|
|
||||||
.globl _HalEndSystemInterrupt@8
|
.globl _HalEndSystemInterrupt@8
|
||||||
.func HalEndSystemInterrupt@8
|
.func HalEndSystemInterrupt@8
|
||||||
_HalEndSystemInterrupt@8:
|
_HalEndSystemInterrupt@8:
|
||||||
|
@ -389,7 +388,7 @@ 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
|
||||||
#if 0
|
#if 0
|
||||||
mov eax, [fs:KPCR_IDR]
|
mov eax, [fs:KPCR_IRR]
|
||||||
mov al, _SoftIntByteTable[eax]
|
mov al, _SoftIntByteTable[eax]
|
||||||
cmp al, cl
|
cmp al, cl
|
||||||
ja DoCall
|
ja DoCall
|
||||||
|
@ -402,7 +401,6 @@ DoCall:
|
||||||
add esp, 8
|
add esp, 8
|
||||||
jmp SoftIntHandlerTable2[eax*4]
|
jmp SoftIntHandlerTable2[eax*4]
|
||||||
.endfunc
|
.endfunc
|
||||||
#endif
|
|
||||||
|
|
||||||
.globl @KfLowerIrql@4
|
.globl @KfLowerIrql@4
|
||||||
.func @KfLowerIrql@4
|
.func @KfLowerIrql@4
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
/* $Id$
|
|
||||||
*
|
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
|
||||||
* PROJECT: ReactOS kernel
|
|
||||||
* FILE: ntoskrnl/hal/x86/irql.c
|
|
||||||
* PURPOSE: Implements IRQLs
|
|
||||||
* PROGRAMMER: David Welch (welch@cwcom.net)
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
|
||||||
|
|
||||||
#include <hal.h>
|
|
||||||
#define NDEBUG
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
/* GLOBALS ******************************************************************/
|
|
||||||
|
|
||||||
typedef VOID (*PSW_HANDLER)(VOID);
|
|
||||||
extern PSW_HANDLER SoftIntHandlerTable[];
|
|
||||||
extern ULONG KiI8259MaskTable[];
|
|
||||||
extern UCHAR SoftIntByteTable[];
|
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
VOID STDCALL HalEndSystemInterrupt (KIRQL Irql, ULONG Unknown2)
|
|
||||||
{
|
|
||||||
ULONG Mask;
|
|
||||||
ULONG Flags;
|
|
||||||
UCHAR Pending;
|
|
||||||
|
|
||||||
Ki386SaveFlags(Flags);
|
|
||||||
Ki386DisableInterrupts();
|
|
||||||
|
|
||||||
if (KeGetPcr()->Irql > DISPATCH_LEVEL)
|
|
||||||
{
|
|
||||||
Mask = KeGetPcr()->IDR | KiI8259MaskTable[Irql];
|
|
||||||
WRITE_PORT_UCHAR((PUCHAR)0x21, (UCHAR)Mask);
|
|
||||||
Mask >>= 8;
|
|
||||||
WRITE_PORT_UCHAR((PUCHAR)0xa1, (UCHAR)Mask);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
KeGetPcr()->Irql = Irql;
|
|
||||||
Pending = SoftIntByteTable[KeGetPcr()->IRR];
|
|
||||||
if (Pending > Irql)
|
|
||||||
{
|
|
||||||
SoftIntHandlerTable[Pending]();
|
|
||||||
}
|
|
||||||
Ki386RestoreFlags(Flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* EOF */
|
|
Loading…
Reference in a new issue