51#define IRQ_PHYS_NONE UINT32_MAX
127typedef struct irq_domain
142typedef struct irq_chip
290#define IRQ_INVOKE(virt) asm volatile("int %0" : : "i"(virt));
void irq_chip_unregister(irq_chip_t *chip, irq_phys_t start, irq_phys_t end)
Unregister all instances of the given IRQ chip within the specified range.
void irq_virt_free(irq_virt_t virt)
Free a previously allocated virtual IRQ.
void irq_handler_unregister(irq_func_t func, irq_virt_t virt)
Unregister an IRQ handler.
void irq_init(void)
Initialize the IRQ subsystem.
uint64_t irq_virt_set_affinity(irq_virt_t virt, cpu_t *cpu)
Change the CPU responsible for an IRQ.
uint32_t irq_phys_t
Physical IRQ numbers.
uint64_t irq_handler_register(irq_virt_t virt, irq_func_t func, void *private)
Register an IRQ handler for a virtual IRQ.
uint64_t irq_chip_amount(void)
Get the number of registered IRQ chips.
void(* irq_func_t)(irq_func_data_t *data)
Callback function type for IRQs.
void irq_dispatch(interrupt_frame_t *frame, cpu_t *self)
Dispatch an IRQ.
uint64_t irq_chip_register(irq_chip_t *chip, irq_phys_t start, irq_phys_t end, void *private)
Register an IRQ chip for a range of physical IRQs.
uint64_t irq_virt_alloc(irq_virt_t *out, irq_phys_t phys, irq_flags_t flags, cpu_t *cpu)
Allocate a virtual IRQ mapped to the given physical IRQ.
uint8_t irq_virt_t
Virtual IRQ numbers.
@ IRQ_TRIGGER_EDGE
If set, the IRQ is edge triggered. Otherwise, level triggered.
@ IRQ_POLARITY_HIGH
If set, the IRQ is active high.
@ IRQ_SHARED
If set, the IRQ is shared.
@ IRQ_TRIGGER_LEVEL
If set, the IRQ is level triggered.
@ IRQ_POLARITY_LOW
If set, the IRQ is active low. Otherwise, active high.
@ IRQ_EXCLUSIVE
If set, the IRQ is exclusive (not shared).
static const path_flag_t flags[]
irq_phys_t start
Inclusive.
Data passed to IRQ functions.
interrupt_frame_t * frame
Structure to hold an IRQ function and its data.
cpu_t * cpu
The CPU with affinity for this IRQ, may be NULL.
A entry in a doubly linked list.
Read-Write Ticket Lock structure.