mm: fix copy_page_dir
This commit is contained in:
+1
-6
@@ -241,16 +241,11 @@ uint32_t* copy_page_dir(uint32_t* page_dir_virt)
|
||||
map_page(orig_phys_page, scratch_src, PAGE_PRESENT | PAGE_RW);
|
||||
map_page(new_phys_page, scratch_dst, PAGE_PRESENT | PAGE_RW);
|
||||
|
||||
//debug_log("copying %X to %X...", orig_phys_page, new_phys_page);
|
||||
//memcpy(new_phys_page, orig_phys_page, PAGE_SIZE);
|
||||
//memcpy(new_virt_page, orig_virt_page, PAGE_SIZE);
|
||||
|
||||
memcpy(scratch_dst, scratch_src, PAGE_SIZE);
|
||||
|
||||
unmap_page(scratch_dst);
|
||||
unmap_page(scratch_src);
|
||||
|
||||
//debug_log("done\n");
|
||||
new_page_table_virt[j] = (uint32_t)new_phys_page | (pte & 0xFFF);
|
||||
}
|
||||
else
|
||||
@@ -261,7 +256,7 @@ uint32_t* copy_page_dir(uint32_t* page_dir_virt)
|
||||
|
||||
|
||||
// Set the new PDE in the child's page directory
|
||||
new_pagedir[i] = (uint32_t)virt_to_phys(new_page_table) | (pde & 0xFFF);
|
||||
new_pagedir[i] = (uint32_t)new_page_table | (pde & 0xFFF);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user