From 755615ef0b094ca644ada0f677c49e665120ff37 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 5 Jul 2025 01:04:58 +0000 Subject: kernel/amd64: cpu: Support SMEP Some CPUs support Supervisor Memory Execution Protection that prevent ring 3 code from being executed in a ring 0 context. Enable this on CPUs that support it. Signed-off-by: Ian Moffett --- sys/include/arch/amd64/cpu.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sys/include/arch/amd64/cpu.h') diff --git a/sys/include/arch/amd64/cpu.h b/sys/include/arch/amd64/cpu.h index fe8fc8a..46e5df7 100644 --- a/sys/include/arch/amd64/cpu.h +++ b/sys/include/arch/amd64/cpu.h @@ -61,6 +61,9 @@ __dead void cpu_halt_all(void); void cpu_halt_others(void); void cpu_startup(struct cpu_info *ci); +void cpu_enable_smep(void); +void cpu_disable_smep(void); + struct cpu_info *cpu_get(uint32_t index); uint32_t cpu_count(void); void cpu_shootdown_tlb(vaddr_t va); -- cgit v1.2.3