reimplmenets the previous iteration with a brand new custom build system

This commit is contained in:
2025-05-29 10:00:38 -04:00
commit e4f160e8b6
35 changed files with 1060 additions and 0 deletions

19
kernel/arch/gdt_entry.c Normal file
View File

@ -0,0 +1,19 @@
#include <kernel/x86/gdt.h>
uint64_t create_descriptor(uint32_t base, uint32_t limit, uint16_t flag)
{
uint64_t descriptor;
descriptor = limit & 0x000F0000;
descriptor |= (flag << 8) & 0x00F0FF00;
descriptor |= (base >> 16) & 0x000000FF;
descriptor |= base & 0xFF000000;
descriptor <<= 32;
descriptor |= base << 16;
descriptor |= limit & 0x0000FFFF;
return descriptor;
}