summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2025-08-04 14:22:47 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-08-06 20:36:39 +0000
commitd1c1f7e35419d937ab937ab050107864401d8cd9 (patch)
treed138241a08b26ac48e78b304ea6b4d2cc636e558
parent06627541341149fb9f22a5f45fd90c8a60d9e35a (diff)
downloadedk2-d1c1f7e35419d937ab937ab050107864401d8cd9.tar.gz
edk2-d1c1f7e35419d937ab937ab050107864401d8cd9.zip
StandaloneMmPkg/MmIpl: Call CreatMmHobList() with page aligned size
MmCore ImageSize may be not page aligned, it will be converted to page aligned for allocating MMRAM to hold MmCore image. This patch is to call CreatMmHobList() with page aligned size of ImageSize, otherwise ASSERT (IS_ALIGNED (Length, EFI_PAGE_SIZE)) in MmIplBuildMmCoreModuleHob() will happen if the input MmCore ImageSize is not page aligned. Signed-off-by: Star Zeng <star.zeng@intel.com>
-rw-r--r--StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c b/StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c
index eda47b93ef..38837b9bb6 100644
--- a/StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c
+++ b/StandaloneMmPkg/Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c
@@ -1,7 +1,7 @@
/** @file
MM IPL that load the MM Core into MMRAM at PEI stage
- Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2024 - 2025, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -795,7 +795,7 @@ ExecuteMmCoreFromMmram (
MmFvSize,
&MmCoreFileName,
ImageContext.ImageAddress,
- ImageContext.ImageSize,
+ EFI_PAGES_TO_SIZE (PageCount),
ImageContext.EntryPoint,
Block
);