Introduce helper functions for querying the software prototype and transition bits of PTE
This commit is contained in:
@@ -363,6 +363,40 @@ MM::PageMap::GetPteSize(VOID)
|
||||
return sizeof(MMPTE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the software prototype value of the corresponding Page Table Entry.
|
||||
*
|
||||
* @param PtePointer
|
||||
* Specifies the address of the PTE.
|
||||
*
|
||||
* @return This routine returns the PTE software prototype value.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTAPI
|
||||
ULONG
|
||||
MM::PageMap::GetPteSoftwarePrototype(IN PMMPTE PtePointer)
|
||||
{
|
||||
return (ULONG)PtePointer->Software.Prototype;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the software transition value of the corresponding Page Table Entry.
|
||||
*
|
||||
* @param PtePointer
|
||||
* Specifies the address of the PTE.
|
||||
*
|
||||
* @return This routine returns the PTE software transition value.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTAPI
|
||||
ULONG
|
||||
MM::PageMap::GetPteSoftwareTransition(IN PMMPTE PtePointer)
|
||||
{
|
||||
return (ULONG)PtePointer->Software.Transition;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the address of the PXE (Extended Page Entry), that maps given address.
|
||||
*
|
||||
|
||||
@@ -355,6 +355,40 @@ MM::PageMapBasic::GetPteSize(VOID)
|
||||
return sizeof(MMPML2_PTE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the software prototype value of the corresponding Page Table Entry.
|
||||
*
|
||||
* @param PtePointer
|
||||
* Specifies the address of the PTE.
|
||||
*
|
||||
* @return This routine returns the PTE software prototype value.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTAPI
|
||||
ULONG
|
||||
MM::PageMapBasic::GetPteSoftwarePrototype(IN PMMPTE PtePointer)
|
||||
{
|
||||
return (ULONG)PtePointer->Pml2.Software.Prototype;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the software transition value of the corresponding Page Table Entry.
|
||||
*
|
||||
* @param PtePointer
|
||||
* Specifies the address of the PTE.
|
||||
*
|
||||
* @return This routine returns the PTE software transition value.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTAPI
|
||||
ULONG
|
||||
MM::PageMapBasic::GetPteSoftwareTransition(IN PMMPTE PtePointer)
|
||||
{
|
||||
return (ULONG)PtePointer->Pml2.Software.Transition;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the virtual address that is mapped by a given Page Table Entry.
|
||||
*
|
||||
@@ -505,7 +539,7 @@ MM::PageMapBasic::SetPte(IN PMMPTE PtePointer,
|
||||
XTAPI
|
||||
VOID
|
||||
MM::PageMapBasic::SetPte(IN PMMPTE PtePointer,
|
||||
IN ULONG_PTR Attributes)
|
||||
IN ULONG_PTR Attributes)
|
||||
{
|
||||
PtePointer->Pml2.Long = Attributes;
|
||||
}
|
||||
@@ -743,6 +777,40 @@ MM::PageMapXpa::GetPteSize(VOID)
|
||||
return sizeof(MMPML3_PTE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the software prototype value of the corresponding Page Table Entry.
|
||||
*
|
||||
* @param PtePointer
|
||||
* Specifies the address of the PTE.
|
||||
*
|
||||
* @return This routine returns the PTE software prototype value.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTAPI
|
||||
ULONG
|
||||
MM::PageMapXpa::GetPteSoftwarePrototype(IN PMMPTE PtePointer)
|
||||
{
|
||||
return (ULONG)PtePointer->Pml3.Software.Prototype;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the software transition value of the corresponding Page Table Entry.
|
||||
*
|
||||
* @param PtePointer
|
||||
* Specifies the address of the PTE.
|
||||
*
|
||||
* @return This routine returns the PTE software transition value.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTAPI
|
||||
ULONG
|
||||
MM::PageMapXpa::GetPteSoftwareTransition(IN PMMPTE PtePointer)
|
||||
{
|
||||
return (ULONG)PtePointer->Pml3.Software.Transition;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the virtual address that is mapped by a given Page Table Entry.
|
||||
*
|
||||
|
||||
@@ -366,6 +366,40 @@ MM::Paging::GetPteSize(VOID)
|
||||
return PmlRoutines->GetPteSize();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the software prototype value of the corresponding Page Table Entry.
|
||||
*
|
||||
* @param PtePointer
|
||||
* Specifies the address of the PTE.
|
||||
*
|
||||
* @return This routine returns the PTE software prototype value.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTAPI
|
||||
ULONG
|
||||
MM::Paging::GetPteSoftwarePrototype(IN PMMPTE PtePointer)
|
||||
{
|
||||
return PmlRoutines->GetPteSoftwarePrototype(PtePointer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the software transition value of the corresponding Page Table Entry.
|
||||
*
|
||||
* @param PtePointer
|
||||
* Specifies the address of the PTE.
|
||||
*
|
||||
* @return This routine returns the PTE software transition value.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTAPI
|
||||
ULONG
|
||||
MM::Paging::GetPteSoftwareTransition(IN PMMPTE PtePointer)
|
||||
{
|
||||
return PmlRoutines->GetPteSoftwareTransition(PtePointer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the virtual address that is mapped by a given Page Table Entry.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user