Refactor memory layout structure
All checks were successful
Builds / ExectOS (amd64, release) (push) Successful in 29s
Builds / ExectOS (amd64, debug) (push) Successful in 39s
Builds / ExectOS (i686, debug) (push) Successful in 38s
Builds / ExectOS (i686, release) (push) Successful in 28s

This commit is contained in:
2026-01-29 22:10:26 +01:00
parent 72f34c8286
commit 58669d3074
10 changed files with 67 additions and 47 deletions

View File

@@ -199,15 +199,15 @@ MM::Pte::InitializeSystemPteSpace(VOID)
/* Retrieve the system's memory layout */
MemoryLayout = MM::Manager::GetMemoryLayout();
NonPagedSystemPoolEnd = ((ULONGLONG)MemoryLayout->SystemSpaceStart +
NonPagedSystemPoolEnd = ((ULONGLONG)MemoryLayout->NonPagedSystemPoolStart +
MM::Manager::GetNumberOfSystemPtes() * MM_PAGE_SIZE);
/* Map the page table hierarchy for the entire system PTE space */
MM::Pte::MapPPE(MemoryLayout->SystemSpaceStart, (PVOID)NonPagedSystemPoolEnd, &ValidPte);
MM::Pte::MapPDE(MemoryLayout->SystemSpaceStart, (PVOID)NonPagedSystemPoolEnd, &ValidPte);
MM::Pte::MapPPE(MemoryLayout->NonPagedSystemPoolStart, (PVOID)NonPagedSystemPoolEnd, &ValidPte);
MM::Pte::MapPDE(MemoryLayout->NonPagedSystemPoolStart, (PVOID)NonPagedSystemPoolEnd, &ValidPte);
/* Format the main block of system PTEs into a free list pool */
PointerPte = MM::Paging::GetPteAddress(MemoryLayout->SystemSpaceStart);
PointerPte = MM::Paging::GetPteAddress(MemoryLayout->NonPagedSystemPoolStart);
InitializeSystemPtePool(PointerPte, MM::Manager::GetNumberOfSystemPtes(), SystemPteSpace);