34#define default_EISA_trigger(idx) (EISA_ELCR_Read(IRQMap[idx].SrcBusIrq))
35#define default_EISA_polarity(idx) (0)
40#define default_ISA_trigger(idx) (0)
41#define default_ISA_polarity(idx) (0)
46#define default_PCI_trigger(idx) (1)
47#define default_PCI_polarity(idx) (1)
52#define default_MCA_trigger(idx) (1)
53#define default_MCA_polarity(idx) (0)
73 DPRINT1(
"Broken MPtable reports ISA irq %lu\n",
irq);
206 DPRINT1(
"Broken BIOS or MPTABLE parser\n");
230 DPRINT1(
"Unknown bus type %lu\n", bus);
240 static ULONG current_vector = FIRST_DEVICE_VECTOR, vector_offset = 0;
250 if (current_vector > FIRST_SYSTEM_VECTOR)
253 current_vector = FIRST_DEVICE_VECTOR + vector_offset;
255 else if (current_vector == FIRST_SYSTEM_VECTOR)
257 DPRINT1(
"Ran out of interrupt sources\n");
301 DPRINT(
"Init IO_APIC IRQs\n");
315 entry.delivery_mode = (APIC_DM_LOWEST >> 8);
318 entry.dest.logical.logical_dest = 0;
356 if ((apic == 0) && (
irq < 16))
375 DPRINT(
"IOAPICClearPin(Apic %lu, Pin %lu\n", Apic,
Pin);
463 if (
IRQMap[
i].DstApicId == old_id)
476 tmp &= ~IOAPIC_ID_MASK;
487 DPRINT1(
"Could not set I/O APIC ID!\n");
502 if (
Entry.dest.logical.logical_dest == 0)
527 ULONG reg0, reg1, reg2=0;
532 DbgPrint(
"Number of IO-APIC #%d registers: %d.\n",
541 DbgPrint(
"Testing the IO APIC.......................\n");
554 DbgPrint(
".... register #00: %08X\n", reg0);
556 if (reg0 & 0xF0FFFFFF)
558 DbgPrint(
" WARNING: Unexpected IO-APIC\n");
561 DbgPrint(
".... register #01: %08X\n", reg1);
564 DbgPrint(
"....... : max redirection entries: %04X\n",
i);
573 DbgPrint(
" WARNING: Unexpected IO-APIC\n");
577 DbgPrint(
"....... : IO APIC version: %04X\n",
i);
583 DbgPrint(
" WARNING: Unexpected IO-APIC\n");
586 if (reg1 & 0xFF00FF00)
588 DbgPrint(
" WARNING: Unexpected IO-APIC\n");
593 DbgPrint(
".... register #02: %08X\n", reg2);
594 DbgPrint(
"....... : arbitration: %02X\n",
596 if (reg2 & 0xF0FFFFFF)
598 DbgPrint(
" WARNING: Unexpected IO-APIC\n");
602 DbgPrint(
".... IRQ redirection table:\n");
603 DbgPrint(
" NR Log Phy Mask Trig IRR Pol"
604 " Stat Dest Deli Vect: \n");
615 entry.dest.logical.logical_dest,
616 entry.dest.physical.physical_dest);
618 DbgPrint(
"%C %C %1d %C %C %C %03X %02X\n",
619 (
entry.mask == 0) ?
'U' :
'M',
620 (
entry.trigger == 0) ?
'E' :
'L',
622 (
entry.polarity == 0) ?
'H' :
'L',
623 (
entry.delivery_status == 0) ?
'I' :
'S',
624 (
entry.dest_mode == 0) ?
'P' :
'L',
630 DbgPrint(
".................................... done.\n");
642 DPRINT(
"%02lx: IrqType %02x, IrqFlag %04x, SrcBusId %02x"
643 ", SrcBusIrq %02x, DstApicId %02x, DstApicInt %02x\n",
649 (
IRQMap[
i].SrcBusIrq >> 2) & 0x1f,
665 tmp |= (1 << (
irq - 8));
IN PDCB IN VBO IN ULONG IN BOOLEAN Pin
GLuint GLuint GLsizei GLenum type
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
ULONG NTAPI HalSetBusDataByOffset(IN BUS_DATA_TYPE BusDataType, IN ULONG BusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
static ULONG Pin2Irq(ULONG idx, ULONG apic, ULONG pin)
#define default_ISA_trigger(idx)
static ULONG IOAPICGetIrqEntry(ULONG apic, ULONG pin, ULONG type)
IOAPIC_INFO IOAPICMap[MAX_IOAPIC]
#define default_EISA_polarity(idx)
#define default_EISA_trigger(idx)
ULONG IRQVectorMap[MAX_IRQ_SOURCE]
ULONG IrqApicMap[MAX_IRQ_SOURCE]
VOID HaliReconfigurePciInterrupts(VOID)
static VOID IOAPICClearAll(VOID)
VOID IOAPICSetupIrqs(VOID)
static ULONG IRQPolarity(ULONG idx)
VOID IOAPICWrite(ULONG Apic, ULONG Offset, ULONG Value)
static ULONG IRQTrigger(ULONG idx)
ULONG IOAPICRead(ULONG Apic, ULONG Offset)
static VOID IOAPICClearPin(ULONG Apic, ULONG Pin)
#define default_MCA_polarity(idx)
VOID IOAPICMaskIrq(ULONG Irq)
VOID Disable8259AIrq(ULONG irq)
#define default_ISA_polarity(idx)
#define default_MCA_trigger(idx)
static VOID IOAPICClear(ULONG Apic)
#define default_PCI_trigger(idx)
#define default_PCI_polarity(idx)
MP_CONFIGURATION_INTSRC IRQMap[MAX_IRQ_SOURCE]
VOID IOAPICSetupIds(VOID)
static ULONG AssignIrqVector(ULONG irq)
VOID IOAPICUnmaskIrq(ULONG Irq)
static ULONG EISA_ELCR_Read(ULONG irq)
#define GET_IOAPIC_ARB(x)
#define GET_IOAPIC_VERSION(x)
#define GET_IOAPIC_MRE(x)
_In_ ULONG _In_ ULONG Offset
#define READ_PORT_UCHAR(p)
#define WRITE_PORT_UCHAR(p, d)
FORCEINLINE ULONG KeGetCurrentProcessorNumber(VOID)
base of all file and directory entries
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
_Must_inspect_result_ typedef _In_ ULONG ApicId