packed
This commit is contained in:
@@ -16,7 +16,7 @@ typedef struct {
|
|||||||
uint64_t address:39 = 0;
|
uint64_t address:39 = 0;
|
||||||
uint16_t rsvd_1:10 = 0;
|
uint16_t rsvd_1:10 = 0;
|
||||||
uint8_t execute_disable:1 = 0;
|
uint8_t execute_disable:1 = 0;
|
||||||
} pagetable_entry_t;
|
} __attribute__((__packed__)) pagetable_entry_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
pagetable_entry_t entries[512];
|
pagetable_entry_t entries[512];
|
||||||
@@ -33,13 +33,13 @@ typedef struct {
|
|||||||
uint64_t address:39 = 0;
|
uint64_t address:39 = 0;
|
||||||
uint16_t rsvd_1:10 = 0;
|
uint16_t rsvd_1:10 = 0;
|
||||||
uint8_t execute_disable:1 = 0;
|
uint8_t execute_disable:1 = 0;
|
||||||
} pagedirectory_entry_t;
|
} __attribute__((__packed__)) pagedirectory_entry_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
alignas(4096) pagedirectory_entry_t l4;
|
alignas(4096) pagedirectory_entry_t l4;
|
||||||
alignas(4096) pagedirectory_entry_t l3;
|
alignas(4096) pagedirectory_entry_t l3;
|
||||||
alignas(4096) pagedirectory_entry_t l2[1];
|
alignas(4096) pagedirectory_entry_t l2[32];
|
||||||
alignas(4096) pagetable_t l1[1];
|
alignas(4096) pagetable_t l1[32];
|
||||||
} four_lvl_paging_t;
|
} four_lvl_paging_t;
|
||||||
|
|
||||||
void create_basic_page_table(uintptr_t base);
|
void create_basic_page_table(uintptr_t base);
|
||||||
|
|||||||
Reference in New Issue
Block a user