interrupt: LoadGDT() with KERNEL_GDT_SIZE instead of calculating it
This commit is contained in:
parent
7e9cc76ec5
commit
c4b4dbeb18
@ -41,6 +41,7 @@ void interrupt_Init() {
|
||||
io_WriteConsoleASCII("interrupt_Init() calling\n");
|
||||
|
||||
// set the 2 dummy gdts
|
||||
memset((void *)KERNEL_GDT_MAPPING, 0, KERNEL_GDT_SIZE);
|
||||
uint64_t *gdt = (uint64_t *)KERNEL_GDT_MAPPING;
|
||||
gdt[0] = 0;
|
||||
gdt[GDT_DATA_SELECTOR >> 3] = GDT_DATA;
|
||||
@ -49,7 +50,7 @@ void interrupt_Init() {
|
||||
gdt[GDT_EXEC_RING3_SELECTOR >> 3] = GDT_EXEC_RING3;
|
||||
io_WriteConsoleASCII("GDT Installed\n");
|
||||
|
||||
interrupt_LoadGDT(5 * GDT_SIZE_BYTES - 1, (void *)KERNEL_GDT_MAPPING); // set it!
|
||||
interrupt_LoadGDT(KERNEL_GDT_SIZE - 1, (void *)KERNEL_GDT_MAPPING); // set it!
|
||||
io_WriteConsoleASCII("GDT OK\n");
|
||||
|
||||
//interrupt_Testcode();
|
||||
|
Loading…
Reference in New Issue
Block a user