mm: fix mapping memory in non-present PDEs

This commit is contained in:
2025-11-05 20:59:01 +03:00
parent 561de6a4e3
commit 57d2931b96
3 changed files with 18 additions and 7 deletions
+1 -1
View File
@@ -138,7 +138,7 @@ uint32_t* create_page_dir()
uint32_t* current_pd = (uint32_t*)0xFFFFF000; // Current PD (self-mapped)
uint32_t* new_pd = (uint32_t*)phys_to_virt((uint32_t)ppp);
for(int i = 768; i < 1023; i++)
for(int i = 768; i < 1024; i++)
{
if(current_pd[i] & PAGE_PRESENT) {
new_pd[i] = current_pd[i];