1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2025-02-24 15:55:41 -05:00

Add struct KernAux_Arch_I386_GDTE

This commit is contained in:
Alex Kotov 2021-12-19 04:42:04 +05:00
parent eb640353b4
commit 89acfd2443
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -31,7 +31,29 @@ extern "C" {
#define KERNAUX_ARCH_I386_CR4_PGE ((uint32_t)0x00000080) // 7: Page Global Enabled #define KERNAUX_ARCH_I386_CR4_PGE ((uint32_t)0x00000080) // 7: Page Global Enabled
// TODO: bits 8-31 // TODO: bits 8-31
// Global descriptor table entry
// TODO: validate this according to spec
struct KernAux_Arch_I386_GDTE {
unsigned int limit_low : 16;
unsigned int base_low : 24;
unsigned int accessed : 1;
unsigned int read_write : 1;
unsigned int conforming_expand_down : 1;
unsigned int code : 1;
unsigned int always_1 : 1;
unsigned int DPL : 2;
unsigned int present : 1;
unsigned int limit_high : 4;
unsigned int available : 1;
unsigned int always_0 : 1;
unsigned int big : 1;
unsigned int gran : 1;
unsigned int base_high : 8;
}
__attribute__((packed));
// Page table entry // Page table entry
// TODO: validate this according to spec
struct KernAux_Arch_I386_PTE { struct KernAux_Arch_I386_PTE {
unsigned present : 1; unsigned present : 1;
unsigned writable : 1; unsigned writable : 1;
@ -48,6 +70,7 @@ struct KernAux_Arch_I386_PTE {
__attribute__((packed)); __attribute__((packed));
// Page directory entry // Page directory entry
// TODO: validate this according to spec
struct KernAux_Arch_I386_PDE { struct KernAux_Arch_I386_PDE {
unsigned present : 1; unsigned present : 1;
unsigned writable : 1; unsigned writable : 1;