diff --git a/build/OwOS.bin b/build/OwOS.bin index 1ddf996..6baee35 100755 Binary files a/build/OwOS.bin and b/build/OwOS.bin differ diff --git a/build/OwOS.iso b/build/OwOS.iso index 0878a08..8941932 100644 Binary files a/build/OwOS.iso and b/build/OwOS.iso differ diff --git a/iso/boot/OwOS.bin b/iso/boot/OwOS.bin index 1ddf996..6baee35 100644 Binary files a/iso/boot/OwOS.bin and b/iso/boot/OwOS.bin differ diff --git a/kernel/gdt.cpp b/kernel/gdt.cpp index 703e5ca..70f8a78 100644 --- a/kernel/gdt.cpp +++ b/kernel/gdt.cpp @@ -21,13 +21,9 @@ struct GDT_t { SegmentDescriptor_t _GDT[5]; GDT_t _GDTptr; -void lgdt(void* base, uint16_t size) { - struct { - uint16_t length; - void* base; - } __attribute__((packed)) GDTR = { size, base }; - - asm ( "lgdt %0" : : "m"(GDTR) );} +void lgdt(GDT_t GDT) { + asm ("lgdt %0" : : "m"(GDT)); +} void initGDT() { #define BochsBreak() outw(0x8A00,0x8A00); outw(0x8A00,0x08AE0); @@ -41,7 +37,7 @@ void initGDT() { // Data Base 0 Limit 32 Access RW setGDTGate(2, 0x00000000, 0xFFFFFFFF, GDT_ACCESS_PRESENT | GDT_ACCESS_RW, GDT_FLAG_GR_PAGE | GDT_FLAG_SZ_32B); - lgdt(&_GDT, sizeof(_GDT)); + lgdt(_GDTptr); BochsBreak(); SEGMENTS_RELOAD(); }