summaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-07-05 01:04:58 +0000
committerIan Moffett <ian@osmora.org>2025-07-05 01:04:58 +0000
commit755615ef0b094ca644ada0f677c49e665120ff37 (patch)
tree09d2c53b4a236bcf0d11aac2c2e1f6528bbd3812 /sys/include
parent627c047d1ce71c9882cefac41a0d0b3c9d379c5b (diff)
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 <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/arch/amd64/cpu.h3
1 files changed, 3 insertions, 0 deletions
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);