audk/UefiCpuPkg/PiSmmCpuDxeSmm
Dun Tan 51edd4830d UefiCpuPkg: fix issue when SMM profile is enabled
This commit is to fix smm code assert issue when SMM Profile
is enabled.

When SMM Profile is enabled, the function InitProtectedMemRange()
retrives MMIO ranges from GCD and store the MMIO ranges in the
mProtectionMemRange. When ReadyToLock, the function InitPaging()
modifies the page table based on the mProtectionMemRange. If the
MMIO ranges in mProtectionMemRange is not 4k aligned, code will
assert when modifying page table.

In this commit, we skip the MMIO ranges that BaseAddress and Length
are not 4k aligned when creating mProtectionMemRange. This will only
cause each access to the skipped MMIO range to be logged. In current
failure case on QEMU and QSP SimicsOpenBoard, the skipped MMIO range
is [0xFED00000, 0xFED00400] for HPET. Considering that the probability
of HPET MMIO range being accessed is very small in SMM, the solution
in this commit is acceptable and simple.

Signed-off-by: Dun Tan <dun.tan@intel.com>
2024-07-29 03:48:53 +00:00
..
Ia32 UefiCpuPkg:Remove code to wakeup AP and relocate ap 2024-06-04 07:40:27 +00:00
X64 UefiCpuPkg:Remove code to wakeup AP and relocate ap 2024-06-04 07:40:27 +00:00
Cet.inc UefiCpuPkg: Add macro definitions for CET feature for NASM files. 2023-12-07 09:43:43 +00:00
CpuS3.c UefiCpuPkg: Remove GetAcpiCpuData() in CpuS3.c 2024-06-04 07:40:27 +00:00
CpuService.c UefiCpuPkg/PiSmmCpuDxeSmm: Get processor extended information 2023-12-08 13:25:11 +00:00
CpuService.h UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
MpService.c UefiCpuPkg/PiSmmCpuDxeSmm: Consume PcdCpuSmmApSyncTimeout2 2024-07-05 17:55:48 +00:00
PiSmmCpuDxeSmm.c UefiCpuPkg: Remove GetAcpiCpuData() in CpuS3.c 2024-06-04 07:40:27 +00:00
PiSmmCpuDxeSmm.h UefiCpuPkg/PiSmmCpuDxeSmm: Consume PcdCpuSmmApSyncTimeout2 2024-07-05 17:55:48 +00:00
PiSmmCpuDxeSmm.inf UefiCpuPkg/PiSmmCpuDxeSmm: Consume PcdCpuSmmApSyncTimeout2 2024-07-05 17:55:48 +00:00
PiSmmCpuDxeSmm.uni UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
PiSmmCpuDxeSmmExtra.uni UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00
SmmCpuMemoryManagement.c UefiCpuPkg: Revert "UefiCpuPkg/PiSmmCpuDxeSmm:Map SMRAM in 4K..." 2024-07-23 09:38:47 +00:00
SmmMp.c UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmMp.h UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmMpPerf.c UefiCpuPkg/SmmCpu: Add PcdSmmApPerfLogEnable control AP perf-logging 2023-06-21 04:37:17 +00:00
SmmMpPerf.h UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic 2024-05-08 01:53:58 +00:00
SmmProfile.c UefiCpuPkg: fix issue when SMM profile is enabled 2024-07-29 03:48:53 +00:00
SmmProfile.h UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmProfileInternal.h UefiCpuPkg: Remove UefiCpuLib from module INFs. 2023-03-10 08:23:56 +00:00
SmramSaveState.c UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic 2024-05-08 01:53:58 +00:00
SyncTimer.c UefiCpuPkg/PiSmmCpuDxeSmm: Consume PcdCpuSmmApSyncTimeout2 2024-07-05 17:55:48 +00:00