Abstract PTE list terminator into paging layer
All checks were successful
Builds / ExectOS (amd64, debug) (push) Successful in 25s
Builds / ExectOS (i686, debug) (push) Successful in 24s
Builds / ExectOS (i686, release) (push) Successful in 44s
Builds / ExectOS (amd64, release) (push) Successful in 48s

This commit is contained in:
2026-01-03 21:03:14 +01:00
parent cc76ea40ee
commit 329143b4f6
7 changed files with 66 additions and 0 deletions

View File

@@ -330,6 +330,21 @@ MM::PageMap::GetPteDistance(PMMPTE EndPte,
return ((ULONG_PTR)EndPte - (ULONG_PTR)StartPte) / sizeof(MMPTE);
}
/**
* Gets the terminator value for a PTE list.
*
* @return This routine returns the terminator value for a PTE list.
*
* @since XT 1.0
*/
XTAPI
ULONG_PTR
MM::PageMap::GetPteListTerminator(VOID)
{
/* Return PTE list terminator value */
return 0xFFFFFFFF;
}
/**
* Gets the Offset of the PTE (Page Table Entry), that maps given address.
*

View File

@@ -340,6 +340,21 @@ MM::PageMapBasic::GetPteDistance(PMMPTE EndPte,
return ((ULONG_PTR)EndPte - (ULONG_PTR)StartPte) / sizeof(MMPML2_PTE);
}
/**
* Gets the terminator value for a PTE list (PML2).
*
* @return This routine returns the terminator value for a PTE list.
*
* @since XT 1.0
*/
XTAPI
ULONG_PTR
MM::PageMapBasic::GetPteListTerminator(VOID)
{
/* Return PTE list terminator value for PML2 */
return 0xFFFFF;
}
/**
* Gets the size of a PTE for basic paging (PML2).
*
@@ -813,6 +828,21 @@ MM::PageMapXpa::GetPteDistance(PMMPTE EndPte,
return ((ULONG_PTR)EndPte - (ULONG_PTR)StartPte) / sizeof(MMPML3_PTE);
}
/**
* Gets the terminator value for a PTE list (PML3).
*
* @return This routine returns the terminator value for a PTE list.
*
* @since XT 1.0
*/
XTAPI
ULONG_PTR
MM::PageMapXpa::GetPteListTerminator(VOID)
{
/* Return PTE list terminator value for PML3 */
return 0xFFFFFFFF;
}
/**
* Gets the size of a PTE for XPA paging (PML3).
*

View File

@@ -351,6 +351,21 @@ MM::Paging::GetPteDistance(PMMPTE EndPte,
return PmlRoutines->GetPteDistance(EndPte, StartPte);
}
/**
* Gets the terminator value for a PTE list.
*
* @return This routine returns the terminator value for a PTE list.
*
* @since XT 1.0
*/
XTAPI
ULONG_PTR
MM::Paging::GetPteListTerminator(VOID)
{
/* Return PTE list terminator value */
return PmlRoutines->GetPteListTerminator();
}
/**
* Gets the size of a PTE.
*