aboutsummaryrefslogtreecommitdiff
path: root/src/boot/boot64.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot/boot64.s')
-rw-r--r--src/boot/boot64.s15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/boot/boot64.s b/src/boot/boot64.s
new file mode 100644
index 0000000..e851388
--- /dev/null
+++ b/src/boot/boot64.s
@@ -0,0 +1,15 @@
+.global boot_long_mode_start
+.extern kmain
+
+.section .text
+.code64
+boot_long_mode_start:
+ // load null into all data segment registers
+ mov $0, %ax
+ mov %ax, %ss
+ mov %ax, %ds
+ mov %ax, %es
+ mov %ax, %fs
+ mov %ax, %gs
+
+ jmp kmain \ No newline at end of file