audk/UefiCpuPkg
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
..
Application/Cpuid UefiCpuPkg: Calculate DisplayFamily correctly 2023-03-07 10:42:38 +00:00
CpuDxe UefiCpuPkg: Add CpuDxe driver for LoongArch64 2024-04-16 06:00:32 +00:00
CpuDxeRiscV64 UefiCpuPkg: Add cache operations support for Arch proto 2024-02-04 03:09:12 +00:00
CpuFeatures UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuIo2Dxe UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuIo2Smm UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuIoPei UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CpuMmio2Dxe UefiCpuPkg: Add a new CPU IO 2 driver named CpuMmio2Dxe 2024-02-06 23:51:47 +08:00
CpuMpPei UefiCpuPkg/CpuMpPei: Don't write CR3 in ConvertMemoryPageToNotPresent 2024-02-22 03:28:55 +00:00
CpuS3DataDxe UefiCpuPkg: Save MTRR by lockbox in CpuS3DataDxe 2024-06-04 07:40:27 +00:00
CpuTimerDxeRiscV64 UefiCpuPkg/CpuTimerDxeRiscV64: Add support for Sstc 2024-01-11 12:07:42 +00:00
Include UefiCpuPkg/MtrrLib.h: use cache type #defines from ArchitecturalMsr.h 2024-06-26 06:04:49 +00:00
Library UefiCpuPkg/MpInitLib: Reduce compiler dependencies for LoongArch 2024-07-25 06:17:09 +00:00
MicrocodeMeasurementDxe UefiCpuPkg/MicrocodeMeasurementDxe: Fix exception 2023-03-10 07:13:14 +00:00
PiSmmCommunication UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PiSmmCpuDxeSmm UefiCpuPkg: fix issue when SMM profile is enabled 2024-07-29 03:48:53 +00:00
ResetVector UefiCpuPkg/ResetVector: Remove AP waking vector from ResetVector 2023-09-18 02:39:25 +00:00
SecCore UefiCpuPkg: auto-generate SEC ProcessLibraryConstructorList() decl 2024-03-08 09:09:22 +00:00
SecMigrationPei UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Test UefiCpuPkg: Update code to be more C11 compliant by using __func__ 2023-04-10 14:19:57 +00:00
Universal/Acpi/S3Resume2Pei UefiCpuPkg: Remove unneeded MpService2Ppi assignment 2024-06-04 07:40:27 +00:00
UefiCpuPkg.ci.yaml UefiCpuPkg/UefiCpuPkg.ci.yaml: Ignore RISC-V file 2023-02-16 05:53:28 +00:00
UefiCpuPkg.dec UefiCpuPkg: Refine the PCD usage comment 2024-06-14 07:02:37 +00:00
UefiCpuPkg.dsc UefiCpuPkg: Add locbox lib instance in DSC 2024-06-04 07:40:27 +00:00
UefiCpuPkg.uni UefiCpuPkg: Refine the PCD usage comment 2024-06-14 07:02:37 +00:00
UefiCpuPkgExtra.uni UefiCpuPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:28 -07:00