summaryrefslogtreecommitdiff
path: root/src/sys/arch/amd64/mainbus
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-10-08 16:10:02 -0400
committerIan Moffett <ian@osmora.org>2025-10-08 16:10:40 -0400
commitd36538554435708b38af9ad7e8358490898cd888 (patch)
tree6737ab270a541342ea48cbfd4e576603544aee86 /src/sys/arch/amd64/mainbus
parent1a8a3bfcad19687c67fb9e7861a71e2345909ce4 (diff)
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 <ian@osmora.org>
Diffstat (limited to 'src/sys/arch/amd64/mainbus')
-rw-r--r--src/sys/arch/amd64/mainbus/intr.c6
1 files changed, 3 insertions, 3 deletions
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 <string.h>
/* 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);