public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "sahil" <sahil@arm.com>
To: devel@edk2.groups.io
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Leif Lindholm <leif@nuviainc.com>,
	Sami Mujawar <sami.mujawar@arm.com>,
	Thomas Panakamattam Abraham <thomas.abraham@arm.com>,
	Sahil <sahil@arm.com>
Subject: [edk2-platforms][PATCH V2 1/2] Platform/ARM/N1Sdp: Fix RemoteDdrSize cast
Date: Tue,  2 May 2023 14:02:26 +0530	[thread overview]
Message-ID: <20230502083227.3038317-2-sahil@arm.com> (raw)
In-Reply-To: <20230502083227.3038317-1-sahil@arm.com>

RemoteDdrSize calculation wraps around when booting N1Sdp in
multichip mode. Casting it to UINT64 to fix the issue.

Signed-off-by: sahil <sahil@arm.com>
Change-Id: Ic51269a8d67669684a5f056701cfbef6beb23da2
---
 Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
index a6b4cb0ef482..fa6408a7dd1e 100644
--- a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
+++ b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
@@ -1254,7 +1254,7 @@ InitializePlatformRepository (
   PlatRepoInfo->MemAffInfo[LOCAL_DDR_REGION2].Length = Dram2Size;
 
   if (PlatInfo->MultichipMode == 1) {
-    RemoteDdrSize = ((PlatInfo->RemoteDdrSize - 2) * SIZE_1GB);
+    RemoteDdrSize = ((UINT64)(PlatInfo->RemoteDdrSize - 2) * SIZE_1GB);
 
     // Update Remote DDR Region1
     PlatRepoInfo->MemAffInfo[REMOTE_DDR_REGION1].ProximityDomain = 1;
-- 
2.25.1


  reply	other threads:[~2023-05-02  8:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-02  8:32 [edk2-platforms][PATCH V2 0/2] Bug fix for RemoteDdrSize calculation sahil
2023-05-02  8:32 ` sahil [this message]
2023-05-02  8:32 ` [edk2-platforms][PATCH V2 2/2] Silicon/ARM/NeoverseN1Soc: Fix RemoteDdrSize cast sahil
2023-05-02  9:43 ` [edk2-platforms][PATCH V2 0/2] Bug fix for RemoteDdrSize calculation Sami Mujawar
2023-05-02  9:43 ` Sami Mujawar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230502083227.3038317-2-sahil@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox