Kernel: Initialize GDT in kernel code

We dont use the boot GDT only while booting
This commit is contained in:
Bananymous
2023-03-01 21:21:08 +02:00
parent 7f8cad83b1
commit 7fcbb869e1
8 changed files with 306 additions and 82 deletions

View File

@@ -43,7 +43,7 @@
# 0 MiB -> 1 MiB: bootloader stuff
# 1 MiB -> 2 MiB: kernel
# 2 MiB -> 3 MiB: kmalloc
# 3 MiB -> 4 MiB: kmalloc_eternal
# 3 MiB -> 4 MiB: kmalloc_fixed
.align 4096
boot_pml4:
.skip 512 * 8
@@ -52,8 +52,6 @@
boot_pd1:
.skip 512 * 8
.section .text, "a"
.global g_multiboot_info
g_multiboot_info:
.skip 8
@@ -61,6 +59,8 @@ g_multiboot_info:
g_multiboot_magic:
.skip 8
.section .text, "a"
boot_gdt:
.quad 0x0000000000000000 # null descriptor
.quad 0x00AF9A000000FFFF # kernel code