aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src/boot
diff options
context:
space:
mode:
authorFabian Imhof <fabian.imhof@ost.ch>2025-03-20 15:30:18 +0000
committerFabian Imhof <fabian.imhof@ost.ch>2025-03-20 15:30:18 +0000
commitb6ee8bec7ed23fd0c544f67f735e96b2bfe67682 (patch)
tree1c738088d75bd7e1299d3b695e74e96d68878fc4 /arch/x86_64/src/boot
parent7a98b1dcb1f4436664a8f1a5d6e71ab2c65378f0 (diff)
downloadteachos-b6ee8bec7ed23fd0c544f67f735e96b2bfe67682.tar.xz
teachos-b6ee8bec7ed23fd0c544f67f735e96b2bfe67682.zip
begin implementation of IDT
Diffstat (limited to 'arch/x86_64/src/boot')
-rw-r--r--arch/x86_64/src/boot/boot.s13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86_64/src/boot/boot.s b/arch/x86_64/src/boot/boot.s
index 39bfe33..4fb23e5 100644
--- a/arch/x86_64/src/boot/boot.s
+++ b/arch/x86_64/src/boot/boot.s
@@ -354,7 +354,20 @@ prepare_page_maps:
.section .boot_text, "ax", @progbits
.code64
+.global segment_register_reload_pointer
+segment_register_reload_pointer:
+ xor %rax, %rax
+ mov %rax, %ss
+ mov %rax, %ds
+ mov %rax, %es
+ mov %rax, %fs
+ mov %rax, %gs
+
+ ret
+
_transition_to_long_mode:
+ call segment_register_reload_pointer
+
xor %rax, %rax
mov %rax, %ss
mov %rax, %ds