From 24934406d5d39e013e22a9e6f4138c4169460d71 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Thu, 25 Jul 2024 20:15:40 +0200 Subject: kernel: set up the GDT in assembly This is just for simplicity's sake. I think I could even omit the `movw $TSS, (GdtTss + 2)` and have the linker fill that out as a relocation, but that would probably be more complex overall. --- src/kernel/arch/amd64/boot64.s | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 src/kernel/arch/amd64/boot64.s (limited to 'src/kernel/arch/amd64/boot64.s') diff --git a/src/kernel/arch/amd64/boot64.s b/src/kernel/arch/amd64/boot64.s deleted file mode 100644 index 9bd9f0c..0000000 --- a/src/kernel/arch/amd64/boot64.s +++ /dev/null @@ -1,12 +0,0 @@ -.global boot64 -boot64: - lgdt (lgdt_arg) // try reloading gdt again - mov $(6 << 3 | 3), %ax // SEG_TSS - ltr %ax - - push %rdi // preserve multiboot struct - call sysenter_setup - pop %rdi - - // multiboot struct in %rdi - jmp kmain_early -- cgit v1.2.3