Fix PTE free list sentinel handling
All checks were successful
Builds / ExectOS (amd64, release) (push) Successful in 26s
Builds / ExectOS (amd64, debug) (push) Successful in 28s
Builds / ExectOS (i686, debug) (push) Successful in 28s
Builds / ExectOS (i686, release) (push) Successful in 26s

This commit is contained in:
2025-12-22 15:00:14 +01:00
parent 6aa148784b
commit 643fd0d1e8

View File

@@ -226,8 +226,8 @@ XTAPI
ULONG_PTR ULONG_PTR
MM::PageMapBasic::GetNextEntry(IN PMMPTE Pte) MM::PageMapBasic::GetNextEntry(IN PMMPTE Pte)
{ {
/* Return next entry in PTE list */ /* Return next entry in PTE list, translating the hardware limit (0xFFFFF) to the logical sentinel (MAXULONG) */
return Pte->Pml2.List.NextEntry; return (Pte->Pml2.List.NextEntry == 0xFFFFF) ? MAXULONG : Pte->Pml2.List.NextEntry;
} }
/** /**
@@ -435,8 +435,8 @@ VOID
MM::PageMapBasic::SetNextEntry(IN PMMPTE Pte, MM::PageMapBasic::SetNextEntry(IN PMMPTE Pte,
IN ULONG_PTR Value) IN ULONG_PTR Value)
{ {
/* Set next entry in PTE list */ /* Set next entry in PTE list, translating the logical sentinel (MAXULONG) to the 20-bit hardware limit (0xFFFFF) */
Pte->Pml2.List.NextEntry = Value; Pte->Pml2.List.NextEntry = (Value == MAXULONG) ? 0xFFFFF : Value;
} }
/** /**