I read up on an article about it, took a THC gummy, and grasped the concept easily.
I entered my PML4 structure as the last entry in the PML4 structure.
Code: Select all
memory::paging::pml_4 = (memory::paging::page_table *)memory::paging::allocation::request_page();
memory::operations::memset(memory::paging::pml_4, 0, 0x1000);
memory::paging::page_directory_entry pml_4_pde;
pml_4_pde.set_address((uint64_t)memory::paging::pml_4);
pml_4_pde.set_flag(memory::paging::pt_flag::present, true);
pml_4_pde.set_flag(memory::paging::pt_flag::read_write, true);
memory::paging::pml_4->entries[512 - 1] = pml_4_pde;
memory::paging::map_memory((void*)memory::paging::pml_4, (void*)memory::paging::pml_4);
What am I missing? I am definitely missing something.