diff options
author | Ian Moffett <ian@osmora.org> | 2025-09-15 12:27:01 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-09-15 12:27:01 -0400 |
commit | 4122de881d3b7f9e54563affd7564213d415d1e5 (patch) | |
tree | 794d7b5866f2fabb0418836e6d4dff02061d8747 /src | |
parent | fa8bf187448d93e5c4c0ddeaf6c7fbb384d1b946 (diff) |
kern/amd64: boot: Initialize I/O APIC *once*
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/sys/arch/amd64/boot/boot_chip.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/sys/arch/amd64/boot/boot_chip.c b/src/sys/arch/amd64/boot/boot_chip.c index 01d090c..679a759 100644 --- a/src/sys/arch/amd64/boot/boot_chip.c +++ b/src/sys/arch/amd64/boot/boot_chip.c @@ -33,6 +33,20 @@ #include <machine/boot.h> #include <machine/i8259.h> #include <machine/ioapic.h> +#include <stdbool.h> + +static void +chipset_init(void) +{ + static bool once = false; + + if (once) { + return; + } + + once = true; + ioapic_init(); +} void platform_boot(void) @@ -40,6 +54,6 @@ platform_boot(void) gdt_load(); i8259_disable(); - ioapic_init(); + chipset_init(); uart_init(); } |