summaryrefslogtreecommitdiff
path: root/kernel/cpu/arch_inst.h
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-02-21 20:06:35 +0100
committerAnton Kling <anton@kling.gg>2024-02-21 20:06:35 +0100
commit9b475d3db3275d4c34f02161ae70ced5595a0fdb (patch)
tree0c50e4af3ce52017f295c44f6f4319e4a43de085 /kernel/cpu/arch_inst.h
parent6c9cb0bd8ceb039ce387c850e25adc6f99cfcd6f (diff)
Kernel: Remove all inline assembly.
Now the kernel does not rely upon inline assembly which is often very error prone. This also means that the kernel could probably be compiled with any c99 compiler which would help future bootstrapping.
Diffstat (limited to 'kernel/cpu/arch_inst.h')
-rw-r--r--kernel/cpu/arch_inst.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/cpu/arch_inst.h b/kernel/cpu/arch_inst.h
new file mode 100644
index 0000000..54faffb
--- /dev/null
+++ b/kernel/cpu/arch_inst.h
@@ -0,0 +1,11 @@
+#include <stdint.h>
+uintptr_t get_current_sp(void);
+uintptr_t get_current_sbp(void);
+__attribute__((__noreturn__)) void halt(void);
+uintptr_t get_cr2(void);
+void flush_tlb(void);
+void set_sp(uintptr_t);
+void set_sbp(uintptr_t);
+void set_cr3(uintptr_t);
+uintptr_t get_cr3(void);
+void enable_paging(void);