From b371c50b2fd724bf9c005d75361952b67dbbd161 Mon Sep 17 00:00:00 2001 From: sigsegv7 Date: Sat, 30 Sep 2023 09:23:20 -0400 Subject: kernel/amd64: machdep: Enable spectre mitigation Signed-off-by: sigsegv7 --- sys/arch/amd64/machdep.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys/arch/amd64') diff --git a/sys/arch/amd64/machdep.c b/sys/arch/amd64/machdep.c index e6088a0..9fd7a12 100644 --- a/sys/arch/amd64/machdep.c +++ b/sys/arch/amd64/machdep.c @@ -34,6 +34,7 @@ #include #include #include +#include #define ISR(func) ((uintptr_t)func) #define INIT_FLAG_IOAPIC 0x00000001U @@ -75,4 +76,8 @@ processor_init(void) lapic_init(); /* Per core */ gdt_load(&g_gdtr); interrupts_init(); + + /* Enable spectre mitigation if enabled */ + if (try_spectre_mitigate != NULL) + try_spectre_mitigate(); } -- cgit v1.2.3