65#if defined(SARCH_PC98)
74#if defined(SARCH_PC98)
97#if defined(SARCH_PC98)
98 HalpDismissIrq08Level,
106#if defined(SARCH_PC98)
136#define HalpDelayedHardwareInterrupt(x) \
137 VOID __cdecl HalpHardwareInterrupt##x(VOID); \
140 HalpHardwareInterrupt##x(VOID) \
142 asm volatile ("int $%c0\n"::"i"(PRIMARY_VECTOR_BASE + x)); \
145#elif defined(_MSC_VER)
147#define HalpDelayedHardwareInterrupt(x) \
148 VOID __cdecl HalpHardwareInterrupt##x(VOID); \
151 HalpHardwareInterrupt##x(VOID) \
155 int PRIMARY_VECTOR_BASE + x \
160#error Unsupported compiler
188 HalpHardwareInterrupt0,
189 HalpHardwareInterrupt1,
190 HalpHardwareInterrupt2,
191 HalpHardwareInterrupt3,
192 HalpHardwareInterrupt4,
193 HalpHardwareInterrupt5,
194 HalpHardwareInterrupt6,
195 HalpHardwareInterrupt7,
196 HalpHardwareInterrupt8,
197 HalpHardwareInterrupt9,
198 HalpHardwareInterrupt10,
199 HalpHardwareInterrupt11,
200 HalpHardwareInterrupt12,
201 HalpHardwareInterrupt13,
202 HalpHardwareInterrupt14,
203 HalpHardwareInterrupt15
237#if defined(SARCH_PC98)
239 if (Elcr.
Bits == 0xFFFF)
241 Elcr.
Master.Irq0Level = 0;
242 Elcr.
Master.Irq1Level = 0;
243 Elcr.
Master.Irq7Level = 0;
244 Elcr.
Slave.Irq8Level = 0;
249 ElcrFound = (!(Elcr.
Master.Irq0Level) && !(Elcr.
Master.Irq1Level) && !(Elcr.
Master.Irq2Level) &&
250 !(Elcr.
Slave.Irq8Level) && !(Elcr.
Slave.Irq13Level));
259 for (
i = 1,
j = 0;
j < 16;
i <<= 1,
j++)
328 CurrentIrql = Pcr->
Irql;
351 CurrentIrql = Pcr->
Irql;
382 CurrentIrql = Pcr->
Irql;
410 ULONG PendingIrql, PendingIrqlMask;
445 Pcr->
IRR ^= (1 << PendingIrql);
500 ULONG PendingIrql, PendingIrqlMask, PendingIrqMask;
514 if (!PendingIrqlMask)
return NULL;
529 PendingIrqMask = (1 << PendingIrql);
531 Pcr->
IRR ^= PendingIrqMask;
563 CurrentIrql = Pcr->
Irql;
566 if (
Irql > CurrentIrql)
579#if defined(SARCH_PC98)
621 Pcr->
IRR |= (1 << (Irq + 4));
690#if defined(SARCH_PC98)
750 Pcr->
IRR |= (1 << (Irq + 4));
753 CurrentIrql = Pcr->
Irql;
762#if defined(SARCH_PC98)
799 if (
Irql > CurrentIrql)
872#if defined(SARCH_PC98)
875HalpDismissIrq08Level(
918 ULONG PendingIrqlMask, PendingIrql;
931 Pcr->
IRR ^= (1 << PendingIrql);
973 Pcr->
IDR &= ~(1 << Irq);
1010 PicMask.
Both |= IrqMask;
1044 ULONG PendingIrql, PendingIrqlMask, PendingIrqMask;
1053 if (PendingIrqlMask)
1066 Mask.Both = Pcr->
IDR & 0xFFFF;
1071 PendingIrqMask = (1 << PendingIrql);
1076 Pcr->
IRR ^= PendingIrqMask;
1086 if (!PendingIrqlMask)
break;
1110 CurrentIrql = Pcr->
Irql;
1148 TrapFrame->Eip = TrapFrame->Eax;
1165 CurrentIrql = Pcr->
Irql;
1201 ULONG PendingIrqlMask, PendingIrql;
1214 if (PendingIrqlMask)
1221 Mask.Both = Pcr->
IDR & 0xFFFF;
1226 Pcr->
IRR ^= (1 << PendingIrql);
1262 return SystemVector;
#define EFLAGS_INTERRUPT_MASK
VOID NTAPI KiDispatchInterrupt(VOID)
DECLSPEC_NORETURN VOID NTAPI KeBugCheck(ULONG BugCheckCode)
#define KeGetCurrentIrql()
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG IN OUT PLONG IN LONG Increment KeRaiseIrqlToDpcLevel
static BOOLEAN NTAPI Isr(PKINTERRUPT Interrupt, PVOID ServiceContext)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
BOOLEAN NTAPI HalBeginSystemInterrupt(IN KIRQL Irql, IN ULONG Vector, OUT PKIRQL OldIrql)
BOOLEAN NTAPI HalEnableSystemInterrupt(IN ULONG Vector, IN KIRQL Irql, IN KINTERRUPT_MODE InterruptMode)
VOID NTAPI HalDisableSystemInterrupt(IN ULONG Vector, IN KIRQL Irql)
VOID FASTCALL HalRequestSoftwareInterrupt(IN KIRQL Irql)
VOID FASTCALL KfLowerIrql(IN KIRQL NewIrql)
KIRQL FASTCALL KfRaiseIrql(IN KIRQL NewIrql)
VOID FASTCALL HalClearSoftwareInterrupt(IN KIRQL Irql)
KIRQL NTAPI KeRaiseIrqlToSynchLevel(VOID)
KAFFINITY HalpDefaultInterruptAffinity
VOID NTAPI HalpRegisterVector(IN UCHAR Flags, IN ULONG BusVector, IN ULONG SystemVector, IN KIRQL Irql)
VOID NTAPI HalpInitializeLegacyPICs(VOID)
PHAL_DISMISS_INTERRUPT HalpSpecialDismissLevelTable[16]
BOOLEAN NTAPI HalpDismissIrq13(IN KIRQL Irql, IN ULONG Irq, OUT PKIRQL OldIrql)
BOOLEAN NTAPI HalpDismissIrq13Level(IN KIRQL Irql, IN ULONG Irq, OUT PKIRQL OldIrql)
PHAL_SW_INTERRUPT_HANDLER_2ND_ENTRY FASTCALL HalpEndSoftwareInterrupt2(IN KIRQL OldIrql, IN PKTRAP_FRAME TrapFrame)
BOOLEAN NTAPI HalpDismissIrqLevel(IN KIRQL Irql, IN ULONG Irq, OUT PKIRQL OldIrql)
DECLSPEC_NORETURN VOID FASTCALL HalpDispatchInterrupt2ndEntry(IN PKTRAP_FRAME TrapFrame)
PHAL_SW_INTERRUPT_HANDLER __cdecl HalpDispatchInterrupt2(VOID)
BOOLEAN NTAPI HalpDismissIrq07(IN KIRQL Irql, IN ULONG Irq, OUT PKIRQL OldIrql)
HalpDelayedHardwareInterrupt(0)
FORCEINLINE BOOLEAN _HalpDismissIrqGeneric(IN KIRQL Irql, IN ULONG Irq, OUT PKIRQL OldIrql)
FORCEINLINE KIRQL _HalpDispatchInterruptHandler(VOID)
ULONG KiI8259MaskTable[32]
ULONG NTAPI HalpGetRootInterruptVector(IN ULONG BusInterruptLevel, IN ULONG BusInterruptVector, OUT PKIRQL Irql, OUT PKAFFINITY Affinity)
UCHAR FASTCALL HalpIrqToVector(UCHAR Irq)
BOOLEAN NTAPI HalpDismissIrq15Level(IN KIRQL Irql, IN ULONG Irq, OUT PKIRQL OldIrql)
KIRQL FASTCALL HalpVectorToIrql(UCHAR Vector)
VOID NTAPI HalpInitializePICs(IN BOOLEAN EnableInterrupts)
ULONG FindHigherIrqlMask[32]
PHAL_SW_INTERRUPT_HANDLER_2ND_ENTRY SWInterruptHandlerTable2[3]
PHAL_SW_INTERRUPT_HANDLER_2ND_ENTRY FASTCALL HalEndSystemInterrupt2(IN KIRQL OldIrql, IN PKTRAP_FRAME TrapFrame)
VOID NTAPI HalpEndSoftwareInterrupt(IN KIRQL OldIrql, IN PKTRAP_FRAME TrapFrame)
PHAL_SW_INTERRUPT_HANDLER SWInterruptHandlerTable[20]
BOOLEAN NTAPI HalpDismissIrq15(IN KIRQL Irql, IN ULONG Irq, OUT PKIRQL OldIrql)
UCHAR FASTCALL HalpVectorToIrq(UCHAR Vector)
FORCEINLINE BOOLEAN _HalpDismissIrqLevel(IN KIRQL Irql, IN ULONG Irq, OUT PKIRQL OldIrql)
BOOLEAN NTAPI HalpDismissIrqGeneric(IN KIRQL Irql, IN ULONG Irq, OUT PKIRQL OldIrql)
PHAL_DISMISS_INTERRUPT HalpSpecialDismissTable[16]
BOOLEAN NTAPI HalpDismissIrq07Level(IN KIRQL Irql, IN ULONG Irq, OUT PKIRQL OldIrql)
DECLSPEC_NORETURN VOID FASTCALL HalpApcInterrupt2ndEntry(IN PKTRAP_FRAME TrapFrame)
FORCEINLINE DECLSPEC_NORETURN VOID _HalpApcInterruptHandler(IN PKTRAP_FRAME TrapFrame)
PHAL_SW_INTERRUPT_HANDLER __cdecl HalpHardwareInterruptLevel2(VOID)
DECLSPEC_NORETURN VOID FASTCALL HalpApcInterruptHandler(IN PKTRAP_FRAME TrapFrame)
KIRQL SWInterruptLookUpTable[8]
#define PRIMARY_VECTOR_BASE
VOID __cdecl HalpDispatchInterrupt(VOID)
BOOLEAN(NTAPI * PHAL_DISMISS_INTERRUPT)(IN KIRQL Irql, IN ULONG Irq, OUT PKIRQL OldIrql)
VOID(FASTCALL * PHAL_SW_INTERRUPT_HANDLER_2ND_ENTRY)(IN PKTRAP_FRAME TrapFrame)
VOID(__cdecl * PHAL_SW_INTERRUPT_HANDLER)(VOID)
VOID __cdecl HalpApcInterrupt(VOID)
VOID __cdecl HalpHardwareInterruptLevel(VOID)
void __cdecl _disable(void)
void __cdecl _enable(void)
PPC_QUAL unsigned char __inbyte(const unsigned long Port)
PPC_QUAL void __outbyte(unsigned long const Port, const unsigned char Data)
__INTRIN_INLINE void __writeeflags(uintptr_t Value)
__INTRIN_INLINE uintptr_t __readeflags(void)
#define PIC2_CONTROL_PORT
#define PIC1_CONTROL_PORT
#define DECLSPEC_NORETURN
#define UNREFERENCED_PARAMETER(P)
FORCEINLINE BOOLEAN KiUserTrap(IN PKTRAP_FRAME TrapFrame)
DECLSPEC_NORETURN VOID FASTCALL KiEoiHelper(IN PKTRAP_FRAME TrapFrame)
VOID NTAPI KiDeliverApc(IN KPROCESSOR_MODE DeliveryMode, IN PKEXCEPTION_FRAME ExceptionFrame, IN PKTRAP_FRAME TrapFrame)
VOID KiUnexpectedInterrupt(VOID)
VOID NTAPI KeBugCheckEx(_In_ ULONG BugCheckCode, _In_ ULONG_PTR BugCheckParameter1, _In_ ULONG_PTR BugCheckParameter2, _In_ ULONG_PTR BugCheckParameter3, _In_ ULONG_PTR BugCheckParameter4)
enum _KINTERRUPT_MODE KINTERRUPT_MODE
#define CPU_IO_o_FPU_BUSY_LATCH
_Requires_lock_held_ SpinLock _Releases_lock_ SpinLock _In_ _IRQL_restores_ KIRQL NewIrql
FORCEINLINE VOID KiEnterInterruptTrap(IN PKTRAP_FRAME TrapFrame)
struct _EISA_ELCR::@1528::@1531 Slave
struct _EISA_ELCR::@1528::@1530 Master
_In_ ULONG _In_ ULONG BusInterruptLevel
_In_ ULONG _In_ ULONG _In_ ULONG BusInterruptVector
_In_ ULONG _In_ ULONG _In_ ULONG _Out_ PKIRQL _Out_ PKAFFINITY Affinity
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG _In_ KIRQL _In_ KIRQL _In_ KINTERRUPT_MODE InterruptMode
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql