diff options
author | Marvin Borner | 2021-07-10 15:51:54 +0200 |
---|---|---|
committer | Marvin Borner | 2021-07-10 15:51:54 +0200 |
commit | ad56eb28f0614db4b7656ade390f1c79b446cbc9 (patch) | |
tree | 7d42ab3c9f36c188dbf54a25b1db1c3db5acb1bd /src/loader/inc/gdt.h | |
parent | 176b6eb808f4d02d871c30f6ec19daa179f374d1 (diff) |
A20, E820h, Real Mode Emulation
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 |