add: gdt (peut etre y'a un gdt on sait pas)

This commit is contained in:
2024-09-09 18:00:17 +02:00
parent e287578c46
commit 0787b1a1fc
4 changed files with 102 additions and 1 deletions

18
headers/gdt.h Normal file
View File

@ -0,0 +1,18 @@
#pragma once
#include <stdint.h>
struct gdt_entry {
uint32_t limit;
uint32_t base;
uint8_t access_byte;
uint8_t flags;
};
// https://wiki.osdev.org/Global_Descriptor_Table#GDTR
struct gdt_descriptor {
uint16_t size;
uint32_t base;
} __attribute__((packed));
void initGdt();