From d36538554435708b38af9ad7e8358490898cd888 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 8 Oct 2025 16:10:02 -0400 Subject: kernel/amd64: intr: Make interrupt table global This commit makes the interrupt table global so it can be accessed through assembly. Signed-off-by: Ian Moffett --- src/sys/arch/amd64/mainbus/intr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/sys') diff --git a/src/sys/arch/amd64/mainbus/intr.c b/src/sys/arch/amd64/mainbus/intr.c index d2215b4..73fe8bd 100644 --- a/src/sys/arch/amd64/mainbus/intr.c +++ b/src/sys/arch/amd64/mainbus/intr.c @@ -39,7 +39,7 @@ #include /* List of interrupt handlers */ -static struct intr_hand *intrs[256] = {0}; +struct intr_hand *g_intrs[256] = {0}; struct intr_hand * intr_register(const struct intr_hand *ih) @@ -69,7 +69,7 @@ intr_register(const struct intr_hand *ih) * priority level as only 4 bits encode the IPL */ for (int i = vec; i < vec + 16; ++i) { - if (intrs[i] != NULL) { + if (g_intrs[i] != NULL) { continue; } @@ -78,7 +78,7 @@ intr_register(const struct intr_hand *ih) ih_new->irq = ih->irq; ih_new->count = ih->count; ih_new->vector = i; - intrs[i] = ih_new; + g_intrs[i] = ih_new; if (ih->irq >= 0) { ioapic_route_vec(ih->irq, ih_new->vector); -- cgit v1.2.3