diff options
| author | Raghuram Subramani <raghus2247@gmail.com> | 2025-12-06 20:14:28 -0500 |
|---|---|---|
| committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-12-06 20:14:28 -0500 |
| commit | 2cf843ae6de1f35e5a5d3a947d0179337e82752f (patch) | |
| tree | 7e7983be37568fb0f9cbd806de94573a61df83ca /kernel/include/boot/gdt.h | |
| parent | 096d9ab61281062b6672c6c9f413de97e034d3f7 (diff) | |
I know; it's POINTLESS! However, I do enjoy programming in C more than
C++ so I ended up spending the hour it takes converting this project
from C++ to C.
Diffstat (limited to 'kernel/include/boot/gdt.h')
| -rw-r--r-- | kernel/include/boot/gdt.h | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/kernel/include/boot/gdt.h b/kernel/include/boot/gdt.h index 49067bd..b104db8 100644 --- a/kernel/include/boot/gdt.h +++ b/kernel/include/boot/gdt.h @@ -92,9 +92,6 @@ #define GDT_KERNEL_CODE_OFFSET 0x8 #define GDT_KERNEL_DATA_OFFSET 0x10 -namespace GDT -{ - typedef struct { uint16_t limit_low; uint16_t base_low; @@ -102,18 +99,16 @@ typedef struct { uint8_t access_flags; uint8_t flags_limit_high; uint8_t base_high; -} PACKED entry_t; +} PACKED gdt_entry_t; typedef struct { - uint16_t limit; /* sizeof(GDT) - 1 */ - entry_t *ptr; /* Address of GDT */ -} PACKED descriptor_t; - -extern "C" void _GDT_flush(descriptor_t *descriptor); + uint16_t limit; /* sizeof(GDT) - 1 */ + gdt_entry_t *ptr; /* Address of GDT */ +} PACKED gdt_descriptor_t; -void initialize(void); -void load(void); +void _GDT_flush(gdt_descriptor_t *descriptor); -} +void gdt_initialize(void); +void gdt_load(void); #endif |
