Fix paging init bug

This commit is contained in:
Baptiste Wicht 2016-08-03 17:32:54 +02:00
parent 457a399196
commit 19b61e2fed

View File

@ -223,7 +223,7 @@ void paging::init(){
auto pte = pt_entry(virt_page);
auto pt_index = pde * 512 + pdpte * 512 * 512 + pml4e * 512 * 512 * 512;
auto physical = physical_pt_start + pt_index * paging::PAGE_SIZE;
auto physical = physical_pt_start + (pt_index / 512) * paging::PAGE_SIZE;
if(pt_index != current_pt_index || current_virt == 0){
current_virt = early_map_page(physical);