map_page: add support for mapping 1GiB pages
Signed-off-by: Andy-Python-Programmer <andypythonappdeveloper@gmail.com>
This commit is contained in:
parent
7a1e3cb35c
commit
a218423b9c
@ -65,6 +65,12 @@ level5:
|
||||
pml4 = get_next_level(pml5, pml5_entry);
|
||||
level4:
|
||||
pml3 = get_next_level(pml4, pml4_entry);
|
||||
|
||||
if (pg_size == Size1GiB) {
|
||||
pml3[pml3_entry] = (pt_entry_t)(phys_addr | flags | (1 << 7));
|
||||
return;
|
||||
}
|
||||
|
||||
pml2 = get_next_level(pml3, pml3_entry);
|
||||
|
||||
if (pg_size == Size2MiB) {
|
||||
|
@ -15,7 +15,8 @@ typedef struct {
|
||||
|
||||
enum page_size {
|
||||
Size4KiB,
|
||||
Size2MiB
|
||||
Size2MiB,
|
||||
Size1GiB
|
||||
};
|
||||
|
||||
void vmm_assert_nx(void);
|
||||
|
Loading…
Reference in New Issue
Block a user