From b689c387e21b6624ed1067ccfa7d2eeadca059df Mon Sep 17 00:00:00 2001 From: Kun Qin Date: Thu, 10 Oct 2024 16:21:45 -0700 Subject: [PATCH] ArmPkg: ArmLib: Update function to match header file Update function implementation to match interface definition. The return should be bound to 0xffff0000, which is guaranteed to be a UINT32. Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Sami Mujawar Signed-off-by: Kun Qin --- ArmPkg/Library/ArmLib/ArmLib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ArmPkg/Library/ArmLib/ArmLib.c b/ArmPkg/Library/ArmLib/ArmLib.c index 30849564fc72..b75df6488588 100644 --- a/ArmPkg/Library/ArmLib/ArmLib.c +++ b/ArmPkg/Library/ArmLib/ArmLib.c @@ -71,15 +71,15 @@ ArmInstructionCacheLineLength ( return 4 << (ArmCacheInfo () & 0xf); // CTR_EL0.IminLine } -UINTN +UINT32 EFIAPI ArmCacheWritebackGranule ( VOID ) { - UINTN CWG; + UINT32 CWG; - CWG = (ArmCacheInfo () >> 24) & 0xf; // CTR_EL0.CWG + CWG = (UINT32)((ArmCacheInfo () >> 24) & 0xf); // CTR_EL0.CWG if (CWG == 0) { return SIZE_2KB;