From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.123298.1683016365121906322 for ; Tue, 02 May 2023 01:32:45 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: sahil@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F10C1150C; Tue, 2 May 2023 01:33:28 -0700 (PDT) Received: from usa.arm.com (a077434.blr.arm.com [10.162.17.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C47273F5A1; Tue, 2 May 2023 01:32:42 -0700 (PDT) From: "sahil" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Sami Mujawar , Thomas Panakamattam Abraham , Sahil Subject: [edk2-platforms][PATCH V2 2/2] Silicon/ARM/NeoverseN1Soc: Fix RemoteDdrSize cast Date: Tue, 2 May 2023 14:02:27 +0530 Message-Id: <20230502083227.3038317-3-sahil@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230502083227.3038317-1-sahil@arm.com> References: <20230502083227.3038317-1-sahil@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable RemoteDdrSize calculation wraps around when booting N1Sdp in multichip mode. Casting it to UINT64 to fix the issue. Signed-off-by: sahil --- Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLibMem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLibMem.c= b/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLibMem.c index 339fa07b3217..9e8a1efc557d 100644 --- a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLibMem.c +++ b/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLibMem.c @@ -58,7 +58,7 @@ ArmPlatformGetVirtualMemoryMap ( DramBlock2Size);=0D =0D if (PlatInfo->MultichipMode =3D=3D 1) {=0D - RemoteDdrSize =3D ((PlatInfo->RemoteDdrSize - 2) * SIZE_1GB);=0D + RemoteDdrSize =3D ((UINT64)(PlatInfo->RemoteDdrSize - 2) * SIZE_1GB);= =0D =0D BuildResourceDescriptorHob (=0D EFI_RESOURCE_SYSTEM_MEMORY,=0D --=20 2.25.1