gdt working

This commit is contained in:
2026-01-29 08:04:16 +11:00
parent 68df6c7ebb
commit 7d869a3cb4
11 changed files with 79 additions and 13 deletions

View File

@@ -5,6 +5,7 @@ extern "C" void __stack_chk_fail(void) {
}
#include "kernelUtil.h"
#include "gdt/gdt.h"
KernelInfo kernelInfo;
PageTableManager pageTableManager = NULL;
@@ -43,6 +44,11 @@ void PrepareMemory(BootInfo* bootInfo){
KernelInfo InitializeKernel(BootInfo* bootInfo){
GDTDescriptor gdtDescriptor;
gdtDescriptor.Size = sizeof(GDT) - 1;
gdtDescriptor.Offset = (uint64_t)&DefaultGDT;
LoadGDT(&gdtDescriptor);
PrepareMemory(bootInfo);
memset(bootInfo->framebuffer->BaseAddress, 0, bootInfo->framebuffer->BufferSize);