From 3497b1ff9c8448a19c4ee026f9322288d8a3076c Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Sat, 18 Dec 2021 09:06:55 +0500 Subject: [PATCH] Add struct KernAux_Arch_I386_PageDirEntry --- include/kernaux/arch/i386.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/kernaux/arch/i386.h b/include/kernaux/arch/i386.h index 84aa02b..fbf93a1 100644 --- a/include/kernaux/arch/i386.h +++ b/include/kernaux/arch/i386.h @@ -31,6 +31,21 @@ extern "C" { #define KERNAUX_ARCH_I386_CR4_PGE ((uint32_t)0x00000080) // 7: Page Global Enabled // TODO: bits 8-31 +struct KernAux_Arch_I386_PageDirEntry { + unsigned present : 1; + unsigned writable : 1; + unsigned user : 1; + unsigned write_through : 1; + unsigned cache_disabled : 1; + unsigned accessed : 1; + unsigned always_0 : 1; + unsigned page_size : 1; + unsigned ignored : 1; + unsigned unused : 3; + unsigned addr : 20; +} +__attribute__((packed)); + inline static uint8_t kernaux_arch_i386_inportb(uint16_t port); inline static uint16_t kernaux_arch_i386_inportw(uint16_t port); inline static uint32_t kernaux_arch_i386_inportd(uint16_t port);