aboutsummaryrefslogtreecommitdiff
path: root/src/bootstrap/boot64.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/bootstrap/boot64.s')
-rw-r--r--src/bootstrap/boot64.s16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/bootstrap/boot64.s b/src/bootstrap/boot64.s
new file mode 100644
index 0000000..493912b
--- /dev/null
+++ b/src/bootstrap/boot64.s
@@ -0,0 +1,16 @@
+.global long_mode_start
+.extern kmain
+
+.section .text
+.code64
+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
+
+ call kmain
+ hlt \ No newline at end of file