From 25f1f6f830282a667927dfefb5b91e72a5e69e6e Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 8 Oct 2025 01:10:01 -0400 Subject: kern/amd64: ioapic: Add ISA IRQ to GSI conversion Introduce a helper function to convert legacy ISA IRQ numbers to the GSI numbers assigned to an I/O APIC pin Signed-off-by: Ian Moffett --- src/sys/include/arch/amd64/ioapic.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/sys/include/arch/amd64/ioapic.h') diff --git a/src/sys/include/arch/amd64/ioapic.h b/src/sys/include/arch/amd64/ioapic.h index 20b8058..c0d935e 100644 --- a/src/sys/include/arch/amd64/ioapic.h +++ b/src/sys/include/arch/amd64/ioapic.h @@ -48,6 +48,13 @@ void ioapic_init(void); */ void ioapic_gsi_mask(uint8_t gsi, uint8_t mask); +/* + * Convert an ISA IRQ number into a global system + * interrupt, returnes a less than zero value on + * failure. + */ +int ioapic_get_gsi(uint8_t irq); + /* * Route an IRQ number to a system interrupt vector * via the internal redirection table -- cgit v1.2.3