Page table entries that map the linear address range are reset to 0 before set to the new attribute\r
when a new physical base address is set.\r
@param[in] Mask The mask used for attribute. The corresponding field in Attribute is ignored if that in Mask is 0.\r
- @param[out] IsModified TRUE means page table is modified. FALSE means page table is not modified.\r
+ @param[out] IsModified TRUE means page table is modified by software or hardware. FALSE means page table is not modified by software.\r
+ If the output IsModified is FALSE, there is possibility that the page table is changed by hardware. It is ok\r
+ because page table can be changed by hardware anytime, and caller don't need to Flush TLB.\r
\r
@retval RETURN_UNSUPPORTED PagingMode is not supported.\r
@retval RETURN_INVALID_PARAMETER PageTable, BufferSize, Attribute or Mask is NULL.\r
Page table entries that map the linear address range are reset to 0 before set to the new attribute\r
when a new physical base address is set.\r
@param[in] Mask The mask used for attribute. The corresponding field in Attribute is ignored if that in Mask is 0.\r
- @param[out] IsModified TRUE means page table is modified. FALSE means page table is not modified.\r
+ @param[in, out] IsModified Change IsModified to True if page table is modified and input parameter Modify is TRUE.\r
\r
@retval RETURN_INVALID_PARAMETER For non-present range, Mask->Bits.Present is 0 but some other attributes are provided.\r
@retval RETURN_INVALID_PARAMETER For non-present range, Mask->Bits.Present is 1, Attribute->Bits.Present is 1 but some other attributes are not provided.\r
IN UINT64 Offset,\r
IN IA32_MAP_ATTRIBUTE *Attribute,\r
IN IA32_MAP_ATTRIBUTE *Mask,\r
- OUT BOOLEAN *IsModified\r
+ IN OUT BOOLEAN *IsModified\r
)\r
{\r
RETURN_STATUS Status;\r
OriginalCurrentPagingEntry.Uint64 = CurrentPagingEntry->Uint64;\r
PageTableLibSetPle (Level, CurrentPagingEntry, Offset, Attribute, &CurrentMask);\r
\r
- if (OriginalCurrentPagingEntry.Uint64 != CurrentPagingEntry->Uint64) {\r
+ if (Modify && (OriginalCurrentPagingEntry.Uint64 != CurrentPagingEntry->Uint64)) {\r
+ //\r
+ // The page table entry can be changed by this function only when Modify is true.\r
+ //\r
*IsModified = TRUE;\r
}\r
}\r
// Check if ParentPagingEntry entry is modified here is enough. Except the changes happen in leaf PagingEntry during\r
// the while loop, if there is any other change happens in page table, the ParentPagingEntry must has been modified.\r
//\r
- if (OriginalParentPagingEntry.Uint64 != ParentPagingEntry->Uint64) {\r
+ if (Modify && (OriginalParentPagingEntry.Uint64 != ParentPagingEntry->Uint64)) {\r
+ //\r
+ // The page table entry can be changed by this function only when Modify is true.\r
+ //\r
*IsModified = TRUE;\r
}\r
\r
Page table entries that map the linear address range are reset to 0 before set to the new attribute\r
when a new physical base address is set.\r
@param[in] Mask The mask used for attribute. The corresponding field in Attribute is ignored if that in Mask is 0.\r
- @param[out] IsModified TRUE means page table is modified. FALSE means page table is not modified.\r
+ @param[out] IsModified TRUE means page table is modified by software or hardware. FALSE means page table is not modified by software.\r
+ If the output IsModified is FALSE, there is possibility that the page table is changed by hardware. It is ok\r
+ because page table can be changed by hardware anytime, and caller don't need to Flush TLB.\r
\r
@retval RETURN_UNSUPPORTED PagingMode is not supported.\r
@retval RETURN_INVALID_PARAMETER PageTable, BufferSize, Attribute or Mask is NULL.\r