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.web10.123881.1683016363153368195 for ; Tue, 02 May 2023 01:32:43 -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 81818C14; Tue, 2 May 2023 01:33:26 -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 544873F5A1; Tue, 2 May 2023 01:32:40 -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 1/2] Platform/ARM/N1Sdp: Fix RemoteDdrSize cast Date: Tue, 2 May 2023 14:02:26 +0530 Message-Id: <20230502083227.3038317-2-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 Change-Id: Ic51269a8d67669684a5f056701cfbef6beb23da2 --- Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/Configurat= ionManager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDx= e/ConfigurationManager.c b/Platform/ARM/N1Sdp/ConfigurationManager/Configur= ationManagerDxe/ConfigurationManager.c index a6b4cb0ef482..fa6408a7dd1e 100644 --- a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/Confi= gurationManager.c +++ b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/Confi= gurationManager.c @@ -1254,7 +1254,7 @@ InitializePlatformRepository ( PlatRepoInfo->MemAffInfo[LOCAL_DDR_REGION2].Length =3D Dram2Size;=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 // Update Remote DDR Region1=0D PlatRepoInfo->MemAffInfo[REMOTE_DDR_REGION1].ProximityDomain =3D 1;=0D --=20 2.25.1