diff options
Diffstat (limited to 'src/loader/inc/gdt.h')
-rw-r--r-- | src/loader/inc/gdt.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/loader/inc/gdt.h b/src/loader/inc/gdt.h new file mode 100644 index 0000000..1ff20b7 --- /dev/null +++ b/src/loader/inc/gdt.h @@ -0,0 +1,25 @@ +// MIT License, Copyright (c) 2021 Marvin Borner + +#ifndef GDT_H +#define GDT_H + +#include <def.h> + +struct gdtr { + u16 limit; + u32 ptr; + u32 pad; +} PACKED; + +struct gdt_desc { + u16 limit; + u16 base_low; + u8 base_mid; + u8 access; + u8 granularity; + u8 base_hi; +} PACKED; + +extern struct gdtr gdt; + +#endif |