mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 19:47:42 +00:00
Kernel: Fix bogus address calculation in initialize_physical_pages()
We were incorrectly using sizeof(PhysicalPageEntry) for some address calculations instead of sizeof(PageTableEntry). It still worked correctly because they happen to be the same size.
This commit is contained in:
parent
e323942623
commit
bf5e4326ac
1 changed files with 1 additions and 1 deletions
|
@ -460,7 +460,7 @@ UNMAP_AFTER_INIT void MemoryManager::initialize_physical_pages()
|
||||||
auto result = kernel_page_tables.set(virtual_page_array_current_page & ~0x1fffff, move(physical_page));
|
auto result = kernel_page_tables.set(virtual_page_array_current_page & ~0x1fffff, move(physical_page));
|
||||||
VERIFY(result == AK::HashSetResult::InsertedNewEntry);
|
VERIFY(result == AK::HashSetResult::InsertedNewEntry);
|
||||||
|
|
||||||
virtual_page_array_current_page += (PAGE_SIZE / sizeof(PhysicalPageEntry)) * PAGE_SIZE;
|
virtual_page_array_current_page += (PAGE_SIZE / sizeof(PageTableEntry)) * PAGE_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
dmesgln("MM: Physical page entries: {}", range.value());
|
dmesgln("MM: Physical page entries: {}", range.value());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue