diff options
author | Dun Tan <dun.tan@intel.com> | 2024-08-01 09:53:20 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-08-05 06:59:09 +0000 |
commit | cff06413604a980bd3f04782c4a745f7c02ccd7b (patch) | |
tree | 12dc92695aceaa5dc847d56cfccecac0f62d8420 | |
parent | 8b8ac5d986dd78ee729a3fd32c833ff2235feeb9 (diff) | |
download | edk2-cff06413604a980bd3f04782c4a745f7c02ccd7b.tar.gz |
UefiCpuPkg: remove unneeded code in SmmProfilePFHandler
Remove unneeded calling of SmmProfileMapPFAddress () in
SmmProfileMapPFAddress if SMM profile is not started.
Previously, before SMM profile is started at ReadyToLock,
SMM page table only covers [0, 4G]. The access to the range
above 4G will cause PF. SmmProfileMapPFAddress is needed
here to map the PF address before SMM profile is started.
Now we always create full mapping SMM page table in the
SmmInitPageTable(). When SMM profile is enabled, before
SMM profile is started at ReadyToLock, SMM page table
covers [0, MaxSupportedPhysicalAddress]. So the case that
access to the range above 4G causes PF won't happen
anymore.
Then we can remove the calling of SmmProfileMapPFAddress
before SMM profile is started.
Signed-off-by: Dun Tan <dun.tan@intel.com>
-rw-r--r-- | UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c index 351afc9638..2dd166d39c 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c @@ -1333,14 +1333,6 @@ SmmProfilePFHandler ( UINT8 SoftSmiValue;
EFI_SMM_SAVE_STATE_IO_INFO IoInfo;
- if (!mSmmProfileStart) {
- //
- // If SMM profile does not start, call original page fault handler.
- //
- SmmProfileMapPFAddress ();
- return;
- }
-
if (mBtsSupported) {
DisableBTS ();
}
|