mirror of https://github.com/acidanthera/audk.git
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> |
||
---|---|---|
.. | ||
Application/Cpuid | ||
CpuDxe | ||
CpuDxeRiscV64 | ||
CpuFeatures | ||
CpuIo2Dxe | ||
CpuIo2Smm | ||
CpuIoPei | ||
CpuMmio2Dxe | ||
CpuMpPei | ||
CpuS3DataDxe | ||
CpuTimerDxeRiscV64 | ||
Include | ||
Library | ||
MicrocodeMeasurementDxe | ||
PiSmmCommunication | ||
PiSmmCpuDxeSmm | ||
ResetVector | ||
SecCore | ||
SecMigrationPei | ||
Test | ||
Universal/Acpi/S3Resume2Pei | ||
UefiCpuPkg.ci.yaml | ||
UefiCpuPkg.dec | ||
UefiCpuPkg.dsc | ||
UefiCpuPkg.uni | ||
UefiCpuPkgExtra.uni |