mirror of https://github.com/acidanthera/audk.git
UefiCpuPkg/PiSmmCpuDxeSmm: Correct SetPageTableAttributes func usage
SetPageTableAttributes() will use the IfReadOnlyPageTableNeeded() to determine whether it is necessary to set the page table itself to read-only. And IfReadOnlyPageTableNeeded() has already token into account the status of IsRestrictedMemoryAccess(). Therefore, there is no need for an additional call to IsRestrictedMemoryAccess() before calling the SetPageTableAttributes(). Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
This commit is contained in:
parent
f6eb069e17
commit
4f6614fc18
|
@ -95,12 +95,10 @@ PerformRemainingTasks (
|
|||
SetMemMapAttributes (MemoryAttributesTable);
|
||||
}
|
||||
|
||||
if (IsRestrictedMemoryAccess ()) {
|
||||
//
|
||||
// Set page table itself to be read-only
|
||||
//
|
||||
SetPageTableAttributes ();
|
||||
}
|
||||
//
|
||||
// Set page table itself to be read-only
|
||||
//
|
||||
SetPageTableAttributes ();
|
||||
|
||||
//
|
||||
// Configure SMM Code Access Check feature if available.
|
||||
|
|
|
@ -70,12 +70,10 @@ PerformRemainingTasks (
|
|||
SetMemMapAttributes (MemoryAttributesTable);
|
||||
}
|
||||
|
||||
if (IsRestrictedMemoryAccess ()) {
|
||||
//
|
||||
// Set page table itself to be read-only
|
||||
//
|
||||
SetPageTableAttributes ();
|
||||
}
|
||||
//
|
||||
// Set page table itself to be read-only
|
||||
//
|
||||
SetPageTableAttributes ();
|
||||
|
||||
//
|
||||
// Measure performance of SmmCpuFeaturesCompleteSmmReadyToLock() from caller side
|
||||
|
|
Loading…
Reference in New Issue