From 19b61e2fede766f2f9ef0a6c21879b34bb697286 Mon Sep 17 00:00:00 2001 From: Baptiste Wicht Date: Wed, 3 Aug 2016 17:32:54 +0200 Subject: [PATCH] Fix paging init bug --- kernel/src/paging.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/src/paging.cpp b/kernel/src/paging.cpp index ef179eed..843cfb20 100644 --- a/kernel/src/paging.cpp +++ b/kernel/src/paging.cpp @@ -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);