From 15c7d247151bc35de3031b12e9862668b3bb6251 Mon Sep 17 00:00:00 2001 From: Malo Lecomte Date: Tue, 13 Jul 2021 05:05:58 +0200 Subject: [PATCH] feat(gdt): add gdt_entry struct --- k/gdt.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 k/gdt.h diff --git a/k/gdt.h b/k/gdt.h new file mode 100644 index 0000000..096dbd5 --- /dev/null +++ b/k/gdt.h @@ -0,0 +1,24 @@ +#ifndef GDT_H +#define GDT_H + +#include + +struct gdt_entry +{ + uint8_t base_3 : 8; + uint8_t granularity : 1; + uint8_t db : 1; + uint8_t l : 1; + uint8_t available : 1; + uint8_t limit_2 : 4; + uint8_t present : 1; + uint8_t desc_priv : 2; + uint8_t desc_type : 1; + uint8_t seg_type : 4; + uint8_t base_2 : 8; + uint16_t base_1 : 16; + uint16_t limit_1 : 16; + +}; + +#endif /* !GDT_H */