summaryrefslogtreecommitdiff
path: root/src/kernel/arch/amd64/boot.h
diff options
context:
space:
mode:
authordzwdz2023-01-25 20:56:36 +0100
committerdzwdz2023-01-25 20:56:36 +0100
commitc24a9376b4a048a3f9408df2d47eaad367459bd7 (patch)
tree74388b8b575719ab94e6f8eed9ad834abe7ba36b /src/kernel/arch/amd64/boot.h
parent93194f8645ecd9f280372ec99497ede5f0ce7cee (diff)
kernel: consolidate some header files
Diffstat (limited to 'src/kernel/arch/amd64/boot.h')
-rw-r--r--src/kernel/arch/amd64/boot.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/kernel/arch/amd64/boot.h b/src/kernel/arch/amd64/boot.h
index 251086c..b68f52b 100644
--- a/src/kernel/arch/amd64/boot.h
+++ b/src/kernel/arch/amd64/boot.h
@@ -1,2 +1,21 @@
#pragma once
+
+enum gdt_segs {
+ SEG_null,
+ /* order dictated by SYSENTER */
+ SEG_r0code,
+ SEG_r0data,
+ SEG_r3code,
+ SEG_r3data,
+ SEG_TSS,
+ SEG_TSS2,
+
+ SEG_end
+};
+
void kmain_early(void *mbi);
+void gdt_init(void);
+void idt_init(void);
+
+/* used from asm */
+extern struct lgdt_arg lgdt_arg;