Kernel: Only allocate single GDT entry during boot.S

When we need more, we should probably initialize rest of them
in cpp code
This commit is contained in:
Bananymous 2023-01-30 18:55:57 +02:00
parent 1954f223ad
commit cb3b62d665
1 changed files with 2 additions and 5 deletions

View File

@ -73,11 +73,8 @@ g_multiboot_magic:
.skip 8 .skip 8
boot_gdt: boot_gdt:
.quad 0 # null descriptor .quad 0 # null descriptor
.quad (GDT_F_G | GDT_F_L ) | (GDT_A_P | (0 * GDT_A_DPL) | GDT_A_S | GDT_A_E | GDT_A_RW) | (0xF << 48 | 0xFFFF) # kernel code .quad (GDT_F_G | GDT_F_L ) | (GDT_A_P | (0 * GDT_A_DPL) | GDT_A_S | GDT_A_E | GDT_A_RW) | (0xF << 48 | 0xFFFF) # kernel code
.quad (GDT_F_G | GDT_F_DB ) | (GDT_A_P | (0 * GDT_A_DPL) | GDT_A_S | GDT_A_RW) | (0xF << 48 | 0xFFFF) # kernel data
.quad (GDT_F_G | GDT_F_L ) | (GDT_A_P | (3 * GDT_A_DPL) | GDT_A_S | GDT_A_E | GDT_A_RW) | (0xF << 48 | 0xFFFF) # userspace code
.quad (GDT_F_G | GDT_F_DB ) | (GDT_A_P | (3 * GDT_A_DPL) | GDT_A_S | GDT_A_RW) | (0xF << 48 | 0xFFFF) # userspace data
boot_gdtr: boot_gdtr:
.short . - boot_gdt - 1 .short . - boot_gdt - 1
.quad boot_gdt .quad boot_gdt