* [edk2-platforms][PATCH V2 1/2] Platform/ARM/N1Sdp: Fix RemoteDdrSize cast
2023-05-02 8:32 [edk2-platforms][PATCH V2 0/2] Bug fix for RemoteDdrSize calculation sahil
@ 2023-05-02 8:32 ` sahil
2023-05-02 8:32 ` [edk2-platforms][PATCH V2 2/2] Silicon/ARM/NeoverseN1Soc: " sahil
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: sahil @ 2023-05-02 8:32 UTC (permalink / raw)
To: devel
Cc: Ard Biesheuvel, Leif Lindholm, Sami Mujawar,
Thomas Panakamattam Abraham, Sahil
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [edk2-platforms][PATCH V2 2/2] Silicon/ARM/NeoverseN1Soc: Fix RemoteDdrSize cast
2023-05-02 8:32 [edk2-platforms][PATCH V2 0/2] Bug fix for RemoteDdrSize calculation sahil
2023-05-02 8:32 ` [edk2-platforms][PATCH V2 1/2] Platform/ARM/N1Sdp: Fix RemoteDdrSize cast sahil
@ 2023-05-02 8:32 ` 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
3 siblings, 0 replies; 5+ messages in thread
From: sahil @ 2023-05-02 8:32 UTC (permalink / raw)
To: devel
Cc: Ard Biesheuvel, Leif Lindholm, Sami Mujawar,
Thomas Panakamattam Abraham, Sahil
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>
---
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);
if (PlatInfo->MultichipMode == 1) {
- RemoteDdrSize = ((PlatInfo->RemoteDdrSize - 2) * SIZE_1GB);
+ RemoteDdrSize = ((UINT64)(PlatInfo->RemoteDdrSize - 2) * SIZE_1GB);
BuildResourceDescriptorHob (
EFI_RESOURCE_SYSTEM_MEMORY,
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [edk2-platforms][PATCH V2 0/2] Bug fix for RemoteDdrSize calculation
2023-05-02 8:32 [edk2-platforms][PATCH V2 0/2] Bug fix for RemoteDdrSize calculation sahil
2023-05-02 8:32 ` [edk2-platforms][PATCH V2 1/2] Platform/ARM/N1Sdp: Fix RemoteDdrSize cast sahil
2023-05-02 8:32 ` [edk2-platforms][PATCH V2 2/2] Silicon/ARM/NeoverseN1Soc: " sahil
@ 2023-05-02 9:43 ` Sami Mujawar
2023-05-02 9:43 ` Sami Mujawar
3 siblings, 0 replies; 5+ messages in thread
From: Sami Mujawar @ 2023-05-02 9:43 UTC (permalink / raw)
To: sahil, devel
Cc: Ard Biesheuvel, Leif Lindholm, Thomas Panakamattam Abraham,
nd@arm.com
Hi Sahil,
Thank you for this fix.
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Regards,
Sami Mujawar
On 02/05/2023 09:32 am, sahil wrote:
> V2 delta changes:
> Split the patch in two for Platform/ARM/N1Sdp and Silicon/ARM/NeoverseN1Soc
>
> sahil (2):
> Platform/ARM/N1Sdp: Fix RemoteDdrSize cast
> Silicon/ARM/NeoverseN1Soc: Fix RemoteDdrSize cast
>
> Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c | 2 +-
> Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLibMem.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-platforms][PATCH V2 0/2] Bug fix for RemoteDdrSize calculation
2023-05-02 8:32 [edk2-platforms][PATCH V2 0/2] Bug fix for RemoteDdrSize calculation sahil
` (2 preceding siblings ...)
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
3 siblings, 0 replies; 5+ messages in thread
From: Sami Mujawar @ 2023-05-02 9:43 UTC (permalink / raw)
To: sahil, devel
Cc: Ard Biesheuvel, Leif Lindholm, Thomas Panakamattam Abraham,
nd@arm.com
Merged as d39c665fe302..35a84b1838ba
Thanks.
Sami Mujawar
On 02/05/2023 09:32 am, sahil wrote:
> V2 delta changes:
> Split the patch in two for Platform/ARM/N1Sdp and Silicon/ARM/NeoverseN1Soc
>
> sahil (2):
> Platform/ARM/N1Sdp: Fix RemoteDdrSize cast
> Silicon/ARM/NeoverseN1Soc: Fix RemoteDdrSize cast
>
> Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c | 2 +-
> Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLibMem.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
^ permalink raw reply [flat|nested] 5+ messages in thread