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 DPRINT(
"Broken MPtable reports ISA irq %d\n",
irq);
109 DPRINT(
"Broken BIOS!!\n");
120 DPRINT(
"Broken BIOS!!\n");
129 DPRINT(
"Broken BIOS!!\n");
167 DPRINT(
"Broken BIOS!!\n");
178 DPRINT(
"Broken BIOS!!\n");
187 DPRINT(
"Broken BIOS!!\n");
206 DPRINT(
"broken BIOS or MPTABLE parser, ayiee!!\n");
230 DPRINT(
"Unknown bus type %d.\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!");
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 %d, Pin %d\n", Apic,
Pin);
450 DPRINT1(
"BIOS bug, IO-APIC#%d ID is %d in the MPC table!...\n",
452 DPRINT1(
"... fixing up to %d. (tell your hw vendor)\n",
465 if (
IRQMap[
i].DstApicId == old_id)
476 DPRINT(
"Changing IO-APIC physical APIC ID to %d\n",
490 DPRINT1(
"Could not set I/O APIC ID!\n");
505 if (
Entry.dest.logical.logical_dest == 0)
530 ULONG reg0, reg1, reg2=0;
535 DbgPrint(
"Number of IO-APIC #%d registers: %d.\n",
544 DbgPrint(
"Testing the IO APIC.......................\n");
557 DbgPrint(
".... register #00: %08X\n", reg0);
559 if (reg0 & 0xF0FFFFFF)
561 DbgPrint(
" WARNING: Unexpected IO-APIC\n");
564 DbgPrint(
".... register #01: %08X\n", reg1);
567 DbgPrint(
"....... : max redirection entries: %04X\n",
i);
576 DbgPrint(
" WARNING: Unexpected IO-APIC\n");
580 DbgPrint(
"....... : IO APIC version: %04X\n",
i);
586 DbgPrint(
" WARNING: Unexpected IO-APIC\n");
589 if (reg1 & 0xFF00FF00)
591 DbgPrint(
" WARNING: Unexpected IO-APIC\n");
596 DbgPrint(
".... register #02: %08X\n", reg2);
597 DbgPrint(
"....... : arbitration: %02X\n",
599 if (reg2 & 0xF0FFFFFF)
601 DbgPrint(
" WARNING: Unexpected IO-APIC\n");
605 DbgPrint(
".... IRQ redirection table:\n");
606 DbgPrint(
" NR Log Phy Mask Trig IRR Pol" 607 " Stat Dest Deli Vect: \n");
618 entry.dest.logical.logical_dest,
619 entry.dest.physical.physical_dest);
621 DbgPrint(
"%C %C %1d %C %C %C %03X %02X\n",
622 (
entry.mask == 0) ?
'U' :
'M',
623 (
entry.trigger == 0) ?
'E' :
'L',
625 (
entry.polarity == 0) ?
'H' :
'L',
626 (
entry.delivery_status == 0) ?
'I' :
'S',
627 (
entry.dest_mode == 0) ?
'P' :
'L',
633 DbgPrint(
".................................... done.\n");
645 DPRINT(
"%02x: IrqType %02x, IrqFlag %02x, SrcBusId %02x, SrcBusIrq %02x" 646 ", DstApicId %02x, DstApicInt %02x\n",
652 (
IRQMap[
i].SrcBusIrq >> 2) & 0x1f,
668 tmp |= (1 << (
irq - 8));
static ULONG AssignIrqVector(ULONG irq)
#define GET_IOAPIC_ARB(x)
ULONG IRQVectorMap[MAX_IRQ_SOURCE]
#define READ_PORT_UCHAR(p)
#define default_PCI_polarity(idx)
#define default_ISA_trigger(idx)
_Must_inspect_result_ typedef _In_ ULONG ApicId
#define default_EISA_polarity(idx)
ULONG IrqApicMap[MAX_IRQ_SOURCE]
static ULONG EISA_ELCR_Read(ULONG irq)
#define default_ISA_polarity(idx)
FORCEINLINE ULONG KeGetCurrentProcessorNumber(VOID)
#define default_PCI_trigger(idx)
static ULONG IRQTrigger(ULONG idx)
MP_CONFIGURATION_INTSRC IRQMap[MAX_IRQ_SOURCE]
static VOID IOAPICClearPin(ULONG Apic, ULONG Pin)
#define default_MCA_polarity(idx)
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
static VOID IOAPICClear(ULONG Apic)
VOID IOAPICSetupIds(VOID)
#define default_EISA_trigger(idx)
IN PDCB IN VBO IN ULONG IN BOOLEAN Pin
#define GET_IOAPIC_VERSION(x)
VOID IOAPICMaskIrq(ULONG Irq)
static VOID IOAPICClearAll(VOID)
VOID IOAPICUnmaskIrq(ULONG Irq)
#define WRITE_PORT_UCHAR(p, d)
VOID HaliReconfigurePciInterrupts(VOID)
ULONG IOAPICRead(ULONG Apic, ULONG Offset)
#define default_MCA_trigger(idx)
VOID Disable8259AIrq(ULONG irq)
_In_ ULONG _In_ ULONG Offset
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
#define GET_IOAPIC_MRE(x)
static ULONG Pin2Irq(ULONG idx, ULONG apic, ULONG pin)
IOAPIC_INFO IOAPICMap[MAX_IOAPIC]
static ULONG IOAPICGetIrqEntry(ULONG apic, ULONG pin, ULONG type)
GLuint GLuint GLsizei GLenum type
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 IRQPolarity(ULONG idx)
base of all file and directory entries
VOID IOAPICWrite(ULONG Apic, ULONG Offset, ULONG Value)
VOID IOAPICSetupIrqs(VOID)