diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-02-07 17:15:28 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-02-07 17:17:15 +0530 |
commit | cca4e987ec30229a77a7cd4bf27c9d6670ad79db (patch) | |
tree | 1747ef03b987221e2c655f0fc42e1161a0e8958d /kernel/include/boot/gdt.h | |
parent | d19eaaef708a51d1ac6a89a86c14745ad948e6c8 (diff) |
IDT: Initialize IDT with a very basic exception handler that does nothing
Diffstat (limited to 'kernel/include/boot/gdt.h')
-rw-r--r-- | kernel/include/boot/gdt.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/kernel/include/boot/gdt.h b/kernel/include/boot/gdt.h index ff87981..237628c 100644 --- a/kernel/include/boot/gdt.h +++ b/kernel/include/boot/gdt.h @@ -78,13 +78,12 @@ #define GDT_ENTRY(base, limit, access_flags, flags) \ { \ - (limit & 0xffff), /* limit_low */ \ - (base & 0xffff), /* base_low */ \ - ((base >> 16) & 0xff), /* base_mid */ \ - access_flags, /* access_flags */ \ - FLAGS_LIMIT_HIGH(flags, \ - ((limit >> 16) & 0xff)), /* flags_limit_high */ \ - ((base >> 24) & 0xff) /* base_high */ \ + (limit & 0xffff), /* limit_low */ \ + (base & 0xffff), /* base_low */ \ + ((base >> 16) & 0xff), /* base_mid */ \ + access_flags, /* access_flags */ \ + FLAGS_LIMIT_HIGH(flags, ((limit >> 16) & 0xff)), /* flags_limit_high */ \ + ((base >> 24) & 0xff) /* base_high */ \ } namespace GDT @@ -105,6 +104,8 @@ typedef struct { } PACKED descriptor_t; extern "C" void _GDT_flush(descriptor_t *descriptor); + +void initialize(void); void load(void); } |