some cleanup from debugging and todos
This commit is contained in:
@ -8,8 +8,12 @@ setGdt:
|
||||
mov eax, [esp + 8]
|
||||
mov [gdtr + 2], eax
|
||||
lgdt [gdtr]
|
||||
jmp 0x08:reload_CS ; 0x08 is a stand in for the code segment
|
||||
reload_CS:
|
||||
ret
|
||||
|
||||
global reloadSegments
|
||||
reloadSegments:
|
||||
jmp 0x08:.reload_CS ; 0x08 is a stand in for the code segment
|
||||
.reload_CS:
|
||||
mov ax, 0x10 ; stand in for the data segment
|
||||
mov ds, ax
|
||||
mov es, ax
|
||||
|
@ -67,7 +67,7 @@ void gdt_init(void)
|
||||
//gdt[4] = create_descriptor(0, 0x000FFFFF, (GDT_DATA_PL3)); // user data
|
||||
|
||||
setGdt((sizeof(uint64_t) * GDT_SIZE) - 1, &(gdt[0])); // limit, base
|
||||
//reloadSegments();
|
||||
reloadSegments();
|
||||
#ifdef __TESTING__
|
||||
kinfo("Initialized the GDT");
|
||||
dump_gdt();
|
||||
|
Reference in New Issue
Block a user