Re: [edk2-devel] [edk2-platforms][PATCH V4 4/4] Silicon/ARM/NeoverseN1Soc: Consume N1SdpNtFwConfigPei supplied data
Hi Sahil, Thank you for this patch. This patch can clearly be split into 2, one for the Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/* changes and the other for the Silicon/ARM/NeoverseN1Soc/* changes. I am going to do that before merging. With that, Reviewed-by: Sami Mujawar Regards, Sami Mujawar -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116256): https://edk2.groups.io/g/devel/message/116256 Mute This Topic: https://groups.io/mt/103521648/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [edk2-platforms][PATCH V4 4/4] Silicon/ARM/NeoverseN1Soc: Consume N1SdpNtFwConfigPei supplied data
Hi All, Please find the links to previous discussions below : V1 - https://edk2.groups.io/g/devel/topic/96088980#100022 V2 - https://edk2.groups.io/g/devel/topic/96671861#103652 V3 - https://edk2.groups.io/g/devel/topic/100912169#112452 Thanks, Sahil On Thu, 4 Jan 2024 at 18:46, sahil wrote: > > N1SdpNtFwConfigPei PEIM extracts platform information from NT_FW_CONFIG > and provides it to other modules as a PPI and a HOB. PlatformLibMem > then consumes these values in the form of a PPI during PEI phase and > ConfigurationManagerDxe as a HOB during DXE phase. The previous > approach of fetching platform information from a fixed address > is also removed in this patch. > > Signed-off-by: sahil > --- > > Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerDxe.inf > | 6 +++- > Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf >| 1 + > > Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h > | 5 ++- > Silicon/ARM/NeoverseN1Soc/Include/NeoverseN1Soc.h >| 5 --- > > Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c > | 33 +- > Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLibMem.c >| 35 +++- > 6 files changed, 55 insertions(+), 30 deletions(-) > > diff --git > a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerDxe.inf > > b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerDxe.inf > index 4f8e7f13021a..e4aaed3e9dd5 100644 > --- > a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerDxe.inf > +++ > b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerDxe.inf > @@ -1,7 +1,7 @@ > ## @file > # Configuration Manager Dxe > # > -# Copyright (c) 2021, ARM Limited. All rights reserved. > +# Copyright (c) 2021 - 2024, ARM Limited. All rights reserved. > # > # SPDX-License-Identifier: BSD-2-Clause-Patent > # > @@ -42,6 +42,7 @@ > > [LibraryClasses] >ArmPlatformLib > + HobLib >PrintLib >UefiBootServicesTableLib >UefiDriverEntryPoint > @@ -170,5 +171,8 @@ >gArmNeoverseN1SocTokenSpaceGuid.PcdRemotePcieMmio64Translation >gArmNeoverseN1SocTokenSpaceGuid.PcdRemotePcieSegmentNumber > > +[Guids] > + gArmNeoverseN1SocPlatformInfoDescriptorGuid > + > [Depex] >TRUE > diff --git a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf > b/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf > index ead7f11ec964..e7af4c711817 100644 > --- a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf > +++ b/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf > @@ -64,3 +64,4 @@ > [Ppis] >gArmMpCoreInfoPpiGuid >gArmNeoverseN1SocParameterPpiGuid > + gArmNeoverseN1SocPlatformInfoDescriptorPpiGuid > diff --git > a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h > > b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h > index 303c38dcaee9..ea9cb20ba752 100644 > --- > a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h > +++ > b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h > @@ -1,6 +1,6 @@ > /** @file > > - Copyright (c) 2021, ARM Limited. All rights reserved. > + Copyright (c) 2021-2024, ARM Limited. All rights reserved. > >SPDX-License-Identifier: BSD-2-Clause-Patent > > @@ -302,6 +302,9 @@ typedef struct PlatformRepositoryInfo { >/// Memory Affinity Info >CM_ARM_MEMORY_AFFINITY_INFO MemAffInfo[DDR_REGION_COUNT]; > > + /// N1Sdp Platform Info > + NEOVERSEN1SOC_PLAT_INFO *PlatInfo; > + > } EDKII_PLATFORM_REPOSITORY_INFO; > > #endif // CONFIGURATION_MANAGER_H_ > diff --git a/Silicon/ARM/NeoverseN1Soc/Include/NeoverseN1Soc.h > b/Silicon/ARM/NeoverseN1Soc/Include/NeoverseN1Soc.h > index 2bddf5007431..5483e7bc5f68 100644 > --- a/Silicon/ARM/NeoverseN1Soc/Include/NeoverseN1Soc.h > +++ b/Silicon/ARM/NeoverseN1Soc/Include/NeoverseN1Soc.h > @@ -41,11 +41,6 @@ > #define NEOVERSEN1SOC_EXP_PERIPH_BASE0 0x1C00 > #define NEOVERSEN1SOC_EXP_PERIPH_BASE0_SZ0x130 > > -// Base address to a structure of type NEOVERSEN1SOC_PLAT_INFO which is > -// pre-populated by a earlier boot stage > -#define NEOVERSEN1SOC_PLAT_INFO_STRUCT_BASE > (NEOVERSEN1SOC_NON_SECURE_SRAM_BASE + \ > - 0x8000) > - > /* > * Platform information structure stored in Non-secure SRAM. Platform > * information are passed from the trusted firmware with the below structure > diff --git > a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c > > b/P
[edk2-devel] [edk2-platforms][PATCH V4 4/4] Silicon/ARM/NeoverseN1Soc: Consume N1SdpNtFwConfigPei supplied data
N1SdpNtFwConfigPei PEIM extracts platform information from NT_FW_CONFIG and provides it to other modules as a PPI and a HOB. PlatformLibMem then consumes these values in the form of a PPI during PEI phase and ConfigurationManagerDxe as a HOB during DXE phase. The previous approach of fetching platform information from a fixed address is also removed in this patch. Signed-off-by: sahil --- Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerDxe.inf | 6 +++- Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf | 1 + Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h | 5 ++- Silicon/ARM/NeoverseN1Soc/Include/NeoverseN1Soc.h | 5 --- Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c | 33 +- Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLibMem.c | 35 +++- 6 files changed, 55 insertions(+), 30 deletions(-) diff --git a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerDxe.inf b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerDxe.inf index 4f8e7f13021a..e4aaed3e9dd5 100644 --- a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerDxe.inf +++ b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerDxe.inf @@ -1,7 +1,7 @@ ## @file # Configuration Manager Dxe # -# Copyright (c) 2021, ARM Limited. All rights reserved. +# Copyright (c) 2021 - 2024, ARM Limited. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -42,6 +42,7 @@ [LibraryClasses] ArmPlatformLib + HobLib PrintLib UefiBootServicesTableLib UefiDriverEntryPoint @@ -170,5 +171,8 @@ gArmNeoverseN1SocTokenSpaceGuid.PcdRemotePcieMmio64Translation gArmNeoverseN1SocTokenSpaceGuid.PcdRemotePcieSegmentNumber +[Guids] + gArmNeoverseN1SocPlatformInfoDescriptorGuid + [Depex] TRUE diff --git a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf b/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf index ead7f11ec964..e7af4c711817 100644 --- a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf +++ b/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf @@ -64,3 +64,4 @@ [Ppis] gArmMpCoreInfoPpiGuid gArmNeoverseN1SocParameterPpiGuid + gArmNeoverseN1SocPlatformInfoDescriptorPpiGuid diff --git a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h index 303c38dcaee9..ea9cb20ba752 100644 --- a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h +++ b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h @@ -1,6 +1,6 @@ /** @file - Copyright (c) 2021, ARM Limited. All rights reserved. + Copyright (c) 2021-2024, ARM Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent @@ -302,6 +302,9 @@ typedef struct PlatformRepositoryInfo { /// Memory Affinity Info CM_ARM_MEMORY_AFFINITY_INFO MemAffInfo[DDR_REGION_COUNT]; + /// N1Sdp Platform Info + NEOVERSEN1SOC_PLAT_INFO *PlatInfo; + } EDKII_PLATFORM_REPOSITORY_INFO; #endif // CONFIGURATION_MANAGER_H_ diff --git a/Silicon/ARM/NeoverseN1Soc/Include/NeoverseN1Soc.h b/Silicon/ARM/NeoverseN1Soc/Include/NeoverseN1Soc.h index 2bddf5007431..5483e7bc5f68 100644 --- a/Silicon/ARM/NeoverseN1Soc/Include/NeoverseN1Soc.h +++ b/Silicon/ARM/NeoverseN1Soc/Include/NeoverseN1Soc.h @@ -41,11 +41,6 @@ #define NEOVERSEN1SOC_EXP_PERIPH_BASE0 0x1C00 #define NEOVERSEN1SOC_EXP_PERIPH_BASE0_SZ0x130 -// Base address to a structure of type NEOVERSEN1SOC_PLAT_INFO which is -// pre-populated by a earlier boot stage -#define NEOVERSEN1SOC_PLAT_INFO_STRUCT_BASE (NEOVERSEN1SOC_NON_SECURE_SRAM_BASE + \ - 0x8000) - /* * Platform information structure stored in Non-secure SRAM. Platform * information are passed from the trusted firmware with the below structure diff --git a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c index fa6408a7dd1e..966a83294c00 100644 --- a/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c +++ b/Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c @@ -1,7 +1,7 @@ /** @file Configuration Manager Dxe - Copyright (c) 2021, ARM Limited. All rights reserved. + Copyright (c) 2021 - 2024, ARM Limited. All rights reserved. SPDX-License-Identifier: