Reorder code

This commit is contained in:
Alex Kotov 2021-12-19 07:51:41 +05:00
parent 89acfd2443
commit 9fdee5025d
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 16 additions and 16 deletions

View File

@ -52,6 +52,22 @@ struct KernAux_Arch_I386_GDTE {
}
__attribute__((packed));
// Page directory entry
// TODO: validate this according to spec
struct KernAux_Arch_I386_PDE {
unsigned present : 1;
unsigned writable : 1;
unsigned user : 1;
unsigned write_through : 1;
unsigned cache_disabled : 1;
unsigned accessed : 1;
unsigned available0 : 1;
unsigned page_size : 1;
unsigned available1 : 4;
unsigned addr : 20;
}
__attribute__((packed));
// Page table entry
// TODO: validate this according to spec
struct KernAux_Arch_I386_PTE {
@ -69,22 +85,6 @@ struct KernAux_Arch_I386_PTE {
}
__attribute__((packed));
// Page directory entry
// TODO: validate this according to spec
struct KernAux_Arch_I386_PDE {
unsigned present : 1;
unsigned writable : 1;
unsigned user : 1;
unsigned write_through : 1;
unsigned cache_disabled : 1;
unsigned accessed : 1;
unsigned available0 : 1;
unsigned page_size : 1;
unsigned available1 : 4;
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);