Refactor MMU for multi-paging support and add 5-Level paging #16
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "harraiken_mm"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This pull request introduces a major architectural refactoring of the Memory Management Unit (MMU) to support multiple paging modes within a single kernel, adds full support for 5-level paging (LA57) on AMD64, and fixes a critical address calculation bug.
Architectural refactoring
AMD64: 5-Level paging (LA57 / PML5) implementation
Critical bug fix: AMD64 MMU base address overflow
The previous MM_PTE_LA57_BASE address (0xFFFFF68000000000ULL) was too high. When calculating PTE addresses for high virtual memory regions, adding the virtual address offset resulted in a 64-bit integer overflow, leading to page faults at incorrect, non-canonical addresses. The new MM_PTE_LA57_BASE is 0xFFFF000000000000ULL, which prevents the overflow and ensures correct address translation for the entire 57-bit address space.
Code consolidation and cleanup
Checkout
From your project repository, check out a new branch and test the changes.