From d1c1f7e35419d937ab937ab050107864401d8cd9 Mon Sep 17 00:00:00 2001 From: Star Zeng Date: Mon, 4 Aug 2025 14:22:47 +0800 Subject: [PATCH] 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 --- .../Drivers/StandaloneMmIplPei/StandaloneMmIplPei.c | 4 ++-- 1 file 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.
+ Copyright (c) 2024 - 2025, Intel Corporation. All rights reserved.
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 );