38 ASSERT (Index < 0x100);
60 ASSERT (Index < 0x100);
84 Version.Uint32 =
IoApicRead (IO_APIC_VERSION_REGISTER_INDEX);
85 ASSERT (Version.Bits.MaximumRedirectionEntry < 0xF0);
86 ASSERT (Irq <= Version.Bits.MaximumRedirectionEntry);
88 Entry.Uint32.Low =
IoApicRead (IO_APIC_REDIRECTION_TABLE_ENTRY_INDEX + Irq * 2);
89 Entry.Bits.Mask = Enable ? 0 : 1;
90 IoApicWrite (IO_APIC_REDIRECTION_TABLE_ENTRY_INDEX + Irq * 2, Entry.Uint32.Low);
127 IN BOOLEAN LevelTriggered,
128 IN BOOLEAN AssertionLevel
134 Version.Uint32 =
IoApicRead (IO_APIC_VERSION_REGISTER_INDEX);
135 ASSERT (Version.Bits.MaximumRedirectionEntry < 0xF0);
136 ASSERT (Irq <= Version.Bits.MaximumRedirectionEntry);
137 ASSERT (Vector <= 0xFF);
138 ASSERT (DeliveryMode < 8 && DeliveryMode != 6 && DeliveryMode != 3);
140 Entry.Uint32.Low =
IoApicRead (IO_APIC_REDIRECTION_TABLE_ENTRY_INDEX + Irq * 2);
141 Entry.Bits.Vector = (UINT8)Vector;
142 Entry.Bits.DeliveryMode = (UINT32)DeliveryMode;
143 Entry.Bits.DestinationMode = 0;
144 Entry.Bits.Polarity = AssertionLevel ? 0 : 1;
145 Entry.Bits.TriggerMode = LevelTriggered ? 1 : 0;
147 IoApicWrite (IO_APIC_REDIRECTION_TABLE_ENTRY_INDEX + Irq * 2, Entry.Uint32.Low);
149 Entry.Uint32.High =
IoApicRead (IO_APIC_REDIRECTION_TABLE_ENTRY_INDEX + Irq * 2 + 1);
151 IoApicWrite (IO_APIC_REDIRECTION_TABLE_ENTRY_INDEX + Irq * 2 + 1, Entry.Uint32.High);
#define IOAPIC_INDEX_OFFSET
UINT32 EFIAPI IoApicWrite(IN UINTN Index, IN UINT32 Value)
VOID EFIAPI IoApicConfigureInterrupt(IN UINTN Irq, IN UINTN Vector, IN UINTN DeliveryMode, IN BOOLEAN LevelTriggered, IN BOOLEAN AssertionLevel)
VOID EFIAPI IoApicEnableInterrupt(IN UINTN Irq, IN BOOLEAN Enable)
UINT32 EFIAPI IoApicRead(IN UINTN Index)
UINT8 EFIAPI MmioWrite8(IN UINTN Address, IN UINT8 Value)
UINT32 EFIAPI MmioRead32(IN UINTN Address)
UINT32 EFIAPI MmioWrite32(IN UINTN Address, IN UINT32 Value)
UINT32 EFIAPI GetApicId(VOID)
#define PcdGet32(TokenName)