IRQs
include/irq/irq.h View source View on GitHubStructs
Section titled “Structs”irq_action
Section titled “irq_action”irq_chip
Section titled “irq_chip” struct irq_chip (6 fields) source
irq_desc
Section titled “irq_desc” struct irq_desc (11 fields) source
irq_registers
Section titled “irq_registers” struct irq_registers (21 fields) source
§
uint64_t rax §
uint64_t rbx §
uint64_t rcx §
uint64_t rdx §
uint64_t rbp §
uint64_t rdi §
uint64_t rsi §
uint64_t r8 §
uint64_t r9 §
uint64_t r10 §
uint64_t r11 §
uint64_t r12 §
uint64_t r13 §
uint64_t r14 §
uint64_t r15 §
uint64_t error_code §
uint64_t rip §
uint64_t cs §
uint64_t rflags §
uint64_t rsp §
uint64_t ss irq_context
Section titled “irq_context” struct irq_context (4 fields) source
§
struct irq_registers *regs §
uint8_t *irq_stack_scratch_buf This scratch buffer is stack allocated, and is set upon IRQ entry, allowing the top half of the IRQ to modify it
For exception_sync_cb, it is passed into the callback as a parameter
irq_result
Section titled “irq_result”irq_flags
Section titled “irq_flags” enum irq_flags (4 variants) source
Type Aliases
Section titled “Type Aliases”irq_handler_t
Section titled “irq_handler_t”typedef enum irq_result (*irq_handler_t)(
struct irq_context * ictx,
void * ctx
) source Functions
Section titled “Functions”irq_context_to_crash_regs
Section titled “irq_context_to_crash_regs”void irq_context_to_crash_regs(
const struct irq_registers *ictx,
struct crash_regs *out
) source irq_register
Section titled “irq_register”void irq_register(
char *name,
uint8_t vector,
irq_handler_t handler,
void *ctx,
enum irq_flags flags
) source irq_register_full
Section titled “irq_register_full”irq_set_chip
Section titled “irq_set_chip”irq_mark_self_in_interrupt
Section titled “irq_mark_self_in_interrupt”uint32_t irq_mark_self_in_interrupt(bool new) source We DO NOT set _IRQ here because _NONE is used as this set of functions will set the flags _NONE checks
irq_mark_self_in_nmi
Section titled “irq_mark_self_in_nmi”uint32_t irq_mark_self_in_nmi(bool new) source irq_in_nmi
Section titled “irq_in_nmi”These are called from the verification logic,
they are simple reads. cc_pure so assume() accepts it: NMI nesting is
balanced, so it is invariant from the interrupted code’s point of view
irq_in_interrupt
Section titled “irq_in_interrupt”bool irq_in_interrupt(void) source irq_not_in_interrupt
Section titled “irq_not_in_interrupt”bool irq_not_in_interrupt(void) source irq_vector_is_exception
Section titled “irq_vector_is_exception”bool irq_vector_is_exception(uint8_t vector) source irq_set_alloc
Section titled “irq_set_alloc”irq_alloc_entry
Section titled “irq_alloc_entry”int32_t irq_alloc_entry(void) source irq_free_entry
Section titled “irq_free_entry”irq_is_installed
Section titled “irq_is_installed”irq_free_entry
Section titled “irq_free_entry”irq_vector_disable
Section titled “irq_vector_disable”irq_vector_enable
Section titled “irq_vector_enable”Macros
Section titled “Macros”IRQ_DIV_BY_Z
Section titled “IRQ_DIV_BY_Z”#define IRQ_DIV_BY_Z 0x0 source IRQ_DEBUG
Section titled “IRQ_DEBUG”#define IRQ_DEBUG 0x1 source IRQ_NMI
Section titled “IRQ_NMI”#define IRQ_NMI 0x2 source IRQ_BREAKPOINT
Section titled “IRQ_BREAKPOINT”#define IRQ_BREAKPOINT 0x3 source IRQ_DBF
Section titled “IRQ_DBF”#define IRQ_DBF 0x8 source IRQ_SSF
Section titled “IRQ_SSF”#define IRQ_SSF 0xC source IRQ_GPF
Section titled “IRQ_GPF”#define IRQ_GPF 0xD source IRQ_PAGE_FAULT
Section titled “IRQ_PAGE_FAULT”#define IRQ_PAGE_FAULT 0xE source IRQ_TIMER
Section titled “IRQ_TIMER”#define IRQ_TIMER 0x20 source IRQ_TLB_SHOOTDOWN
Section titled “IRQ_TLB_SHOOTDOWN”#define IRQ_TLB_SHOOTDOWN 0x22 source IRQ_SCHEDULER
Section titled “IRQ_SCHEDULER”#define IRQ_SCHEDULER 0x23 source IRQ_NOP
Section titled “IRQ_NOP”#define IRQ_NOP 0x24 source IRQ_DPC
Section titled “IRQ_DPC”#define IRQ_DPC 0x25 source IRQ_EXCEPTION_COUNT
Section titled “IRQ_EXCEPTION_COUNT”#define IRQ_EXCEPTION_COUNT 32 source