Compute PTE count per page from entry size
Some checks failed
Builds / ExectOS (amd64, debug) (push) Successful in 28s
Builds / ExectOS (amd64, release) (push) Successful in 26s
Builds / ExectOS (i686, release) (push) Failing after 20s
Builds / ExectOS (i686, debug) (push) Failing after 21s

This commit is contained in:
2025-12-15 13:56:39 +01:00
parent 36c273ea13
commit 7f0ca6a948
4 changed files with 21 additions and 9 deletions

View File

@@ -9,6 +9,21 @@
#include <xtos.hh>
/**
* Calculates the number of Page Table Entries (PTEs) that fit within a single page.
*
* @return This routine returns the number of PTEs per page.
*
* @since XT 1.0
*/
XTAPI
ULONG
MM::Pte::GetPtesPerPage(VOID)
{
/* Calculate and return the number of PTEs per page */
return MM_PAGE_SIZE / MM::Paging::GetPteSize();
}
/**
* Maps a range of virtual addresses at the P5E (PML5) level.
*