From 33cd70de1d473361919adc46c7c2b375df88ea44 Mon Sep 17 00:00:00 2001 From: Yeoreum Yun Date: Fri, 15 May 2026 09:10:06 +0100 Subject: [PATCH] ArmPkg/StandaloneMmMmuLib: fix reverse condition of ASSERT In GetMemoryPermissions(), PageCount from FFA_MEM_PERM_GET couldn't be over EFI_SIZE_TO_PAGES(Length) otherwise that's bug of SPMC. But, current ASSERT() checks PageCount > EFI_SIZE_TO_PAGES(Length) which is reverse condition for validation. Signed-off-by: Yeoreum Yun --- ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c b/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c index eefed6ddb1..efa4bbdd14 100644 --- a/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c +++ b/ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.c @@ -222,7 +222,7 @@ GetMemoryPermissions ( * 2.8 FFA_MEM_PERM_GET */ *PageCount = SvcArgs.Arg3 + 1; - ASSERT (*PageCount > EFI_SIZE_TO_PAGES (Length)); + ASSERT (*PageCount <= EFI_SIZE_TO_PAGES (Length)); } else { *PageCount = 1; }