I/O APIC
include/acpi/ioapic.h View source View on GitHubStructs
Section titled “Structs”ioapic_info
Section titled “ioapic_info” struct ioapic_info (3 fields) source
Unions
Section titled “Unions”ioapic_redirection_entry
Section titled “ioapic_redirection_entry” union ioapic_redirection_entry (2 fields) source
§
uint64_t raw §
struct §
uint8_t vector bits 0-7
§
uint8_t delivery_mode : 3 bits 8-10
§
uint8_t dest_mode : 1 bit 11
§
uint8_t delivery_status : 1 bit 12 (read-only)
§
uint8_t polarity : 1 bit 13
§
uint8_t remote_irr : 1 bit 14 (read-only)
§
uint8_t trigger_mode : 1 bit 15
§
uint8_t mask : 1 bit 16
§
uint64_t reserved : 39 bits 17-55
§
uint8_t dest_apic_id bits 56-63
Functions
Section titled “Functions”ioapic_init
Section titled “ioapic_init”void ioapic_init(void) source ioapic_write
Section titled “ioapic_write”void ioapic_write(uint8_t reg, uint32_t val) source ioapic_read
Section titled “ioapic_read”uint32_t ioapic_read(uint8_t reg) source ioapic_set_redirection_entry
Section titled “ioapic_set_redirection_entry”ioapic_get_redirection_entry
Section titled “ioapic_get_redirection_entry”uint64_t ioapic_get_redirection_entry(int irq) source ioapic_route_irq
Section titled “ioapic_route_irq”ioapic_mask_irq
Section titled “ioapic_mask_irq”ioapic_unmask_irq
Section titled “ioapic_unmask_irq”ioapic_get_chip
Section titled “ioapic_get_chip”ioapic_isa_to_gsi
Section titled “ioapic_isa_to_gsi”uint32_t ioapic_isa_to_gsi(uint8_t isa_irq) source ioapic_route_isa_irq
Section titled “ioapic_route_isa_irq”void ioapic_route_isa_irq(
uint8_t isa_irq,
uint8_t vector,
uint32_t dest_apic_id,
bool masked
) source ioapic_route_isa_nmi
Section titled “ioapic_route_isa_nmi”void ioapic_route_isa_nmi(uint8_t isa_irq, uint32_t dest_apic_id) source Macros
Section titled “Macros”IOAPIC_REGSEL_INDEX
Section titled “IOAPIC_REGSEL_INDEX”#define IOAPIC_REGSEL_INDEX 0 source IOREGSEL index
IOAPIC_IOWIN_INDEX
Section titled “IOAPIC_IOWIN_INDEX”#define IOAPIC_IOWIN_INDEX 4 source IOWIN index
IOAPIC_MMIO_SIZE
Section titled “IOAPIC_MMIO_SIZE”#define IOAPIC_MMIO_SIZE 0x20 source 32 bytes
IOAPIC_REG_ID
Section titled “IOAPIC_REG_ID”#define IOAPIC_REG_ID 0x00 source IOAPIC_REG_VER
Section titled “IOAPIC_REG_VER”#define IOAPIC_REG_VER 0x01 source IOAPIC_REG_ARB
Section titled “IOAPIC_REG_ARB”#define IOAPIC_REG_ARB 0x02 source IOAPIC_REG_REDTBL_BASE
Section titled “IOAPIC_REG_REDTBL_BASE”#define IOAPIC_REG_REDTBL_BASE 0x10 source IOAPIC_REDTBL_REG_LOW
Section titled “IOAPIC_REDTBL_REG_LOW”#define IOAPIC_REDTBL_REG_LOW(pin) source Expansion
#define IOAPIC_REDTBL_REG_LOW(pin) \
((uint8_t) (IOAPIC_REG_REDTBL_BASE + (pin) * 2)) IOAPIC_REDTBL_REG_HIGH
Section titled “IOAPIC_REDTBL_REG_HIGH”#define IOAPIC_REDTBL_REG_HIGH(pin) source Expansion
#define IOAPIC_REDTBL_REG_HIGH(pin) \
((uint8_t) (IOAPIC_REG_REDTBL_BASE + (pin) * 2 + 1)) IOAPIC_DELIVERY_FIXED
Section titled “IOAPIC_DELIVERY_FIXED”#define IOAPIC_DELIVERY_FIXED 0 source IOAPIC_DELIVERY_LOWEST
Section titled “IOAPIC_DELIVERY_LOWEST”#define IOAPIC_DELIVERY_LOWEST 1 source IOAPIC_DELIVERY_SMI
Section titled “IOAPIC_DELIVERY_SMI”#define IOAPIC_DELIVERY_SMI 2 source IOAPIC_DELIVERY_NMI
Section titled “IOAPIC_DELIVERY_NMI”#define IOAPIC_DELIVERY_NMI 4 source IOAPIC_DELIVERY_INIT
Section titled “IOAPIC_DELIVERY_INIT”#define IOAPIC_DELIVERY_INIT 5 source IOAPIC_DELIVERY_EXTINT
Section titled “IOAPIC_DELIVERY_EXTINT”#define IOAPIC_DELIVERY_EXTINT 7 source IOAPIC_DEST_PHYSICAL
Section titled “IOAPIC_DEST_PHYSICAL”#define IOAPIC_DEST_PHYSICAL 0 source IOAPIC_DEST_LOGICAL
Section titled “IOAPIC_DEST_LOGICAL”#define IOAPIC_DEST_LOGICAL 1 source IOAPIC_POLARITY_ACTIVE_HIGH
Section titled “IOAPIC_POLARITY_ACTIVE_HIGH”#define IOAPIC_POLARITY_ACTIVE_HIGH 0 source IOAPIC_POLARITY_ACTIVE_LOW
Section titled “IOAPIC_POLARITY_ACTIVE_LOW”#define IOAPIC_POLARITY_ACTIVE_LOW 1 source IOAPIC_TRIGGER_EDGE
Section titled “IOAPIC_TRIGGER_EDGE”#define IOAPIC_TRIGGER_EDGE 0 source IOAPIC_TRIGGER_LEVEL
Section titled “IOAPIC_TRIGGER_LEVEL”#define IOAPIC_TRIGGER_LEVEL 1 source IOAPIC_MASK_UNMASKED
Section titled “IOAPIC_MASK_UNMASKED”#define IOAPIC_MASK_UNMASKED 0 source IOAPIC_MASK_MASKED
Section titled “IOAPIC_MASK_MASKED”#define IOAPIC_MASK_MASKED 1 source IOAPIC_REDTBL_MASK
Section titled “IOAPIC_REDTBL_MASK”#define IOAPIC_REDTBL_MASK (1u << 16) source IOAPIC_ISO_POLARITY_MASK
Section titled “IOAPIC_ISO_POLARITY_MASK”#define IOAPIC_ISO_POLARITY_MASK 0x03 source IOAPIC_ISO_POLARITY_ACTIVE_LOW
Section titled “IOAPIC_ISO_POLARITY_ACTIVE_LOW”#define IOAPIC_ISO_POLARITY_ACTIVE_LOW 0x03 source IOAPIC_ISO_TRIGGER_MASK
Section titled “IOAPIC_ISO_TRIGGER_MASK”#define IOAPIC_ISO_TRIGGER_MASK 0x0C source IOAPIC_ISO_TRIGGER_LEVEL
Section titled “IOAPIC_ISO_TRIGGER_LEVEL”#define IOAPIC_ISO_TRIGGER_LEVEL 0x0C source