* [edk2-devel] [PATCH 00/14] Platform/ARM: FVP, Juno: Move DynamicTablesPkg obj to Arch Common @ 2024-03-21 16:08 PierreGondois 2024-03-21 16:08 ` [edk2-devel] [PATCH 01/14] Platform/ARM: FVP,Juno: Add Arch Common objects handler PierreGondois 2024-03-21 16:08 ` [edk2-devel] [PATCH 02/14] Platform/ARM: FVP,Juno: Move Power Mgmt Profile info to Arch Common PierreGondois 0 siblings, 2 replies; 4+ messages in thread From: PierreGondois @ 2024-03-21 16:08 UTC (permalink / raw) To: devel Cc: Pierre Gondois, Sami Mujawar, Pierre Gondois, Yeo Reum Yun, Sunil V L, AbdulLateef Attar, Jeshua Smith, Jeff Brasen, Girish Mahadevan, Leif Lindholm, Meenakshi Aggarwal Following [1] and [2], other architectures than Arm aim to leverage the DynamicTablesPkg. The package uses namespaces/domains to split objects IDs. Currently most of the objects are part of the Arm namespace. Some objects are generic enough to be re-used by other architectures. [3] and [4] moved the objects that could be re-used to an Arch Common namespace. Update the following platforms which use the DynamicTablesPkg framework/objects: - Juno - VExpress The following platforms were not updated yet: - Platform/ARM/N1Sdp - Platform/ARM/Morello - Platform/NXP/ConfigurationManagerPkg A branch holding the whole patchset is available at: - https://github.com/pierregondois/edk2-platforms/tree/pg/arch_common_obj_sent [1] Branch to reorg Dynamic Tables & support other arch https://edk2.groups.io/g/devel/topic/104054584#116308 [2] DynamicTablesPkg: Arch Common Namespace https://edk2.groups.io/g/devel/message/116330 [3] https://edk2.groups.io/g/devel/message/116961 (first part) [4] https://edk2.groups.io/g/devel/message/116978 (second part) Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Pierre Gondois <Pierre.Gondois@arm.com> Cc: Yeo Reum Yun <YeoReum.Yun@arm.com> Cc: Sunil V L <sunilvl@ventanamicro.com> Cc: AbdulLateef Attar <AbdulLateef.Attar@amd.com> Cc: Jeshua Smith <jeshuas@nvidia.com> Cc: Jeff Brasen <jbrasen@nvidia.com> Cc: Girish Mahadevan <gmahadevan@nvidia.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com> Pierre Gondois (14): Platform/ARM: FVP,Juno: Add Arch Common objects handler Platform/ARM: FVP,Juno: Move Power Mgmt Profile info to Arch Common Platform/ARM: FVP,Juno:: Move Serial Port info to Arch Common Platform/ARM: FVP: Move Fixed Feat Flags info to Arch Common Platform/ARM: Juno: Move CmRef info to Arch Common Platform/ARM: FVP,Juno: Move Pci Config Space info to Arch Common Platform/ARM: Juno: Move Pci Address Map info to Arch Common Platform/ARM: Juno: Move Pci Interrupt Map info to Arch Common Platform/ARM: Juno: Move Lpi info to Arch Common Platform/ARM: Juno: Rename GicCToken Platform/ARM: Juno: Move Proc Hierarchy info to Arch Common Platform/ARM: Juno: Move Cache info to Arch Common Platform/ARM: Juno: Move Cpc info to Arch Common Platform/ARM: Juno: Move Psd info to Arch Common .../ConfigurationManager.c | 363 ++++++++++-------- .../ConfigurationManager.h | 38 +- .../ConfigurationManager.c | 169 +++++--- .../ConfigurationManager.h | 10 +- 4 files changed, 348 insertions(+), 232 deletions(-) -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116998): https://edk2.groups.io/g/devel/message/116998 Mute This Topic: https://groups.io/mt/105068390/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 4+ messages in thread
* [edk2-devel] [PATCH 01/14] Platform/ARM: FVP,Juno: Add Arch Common objects handler 2024-03-21 16:08 [edk2-devel] [PATCH 00/14] Platform/ARM: FVP, Juno: Move DynamicTablesPkg obj to Arch Common PierreGondois @ 2024-03-21 16:08 ` PierreGondois 2024-03-21 16:08 ` [edk2-devel] [PATCH 02/14] Platform/ARM: FVP,Juno: Move Power Mgmt Profile info to Arch Common PierreGondois 1 sibling, 0 replies; 4+ messages in thread From: PierreGondois @ 2024-03-21 16:08 UTC (permalink / raw) To: devel Cc: Pierre Gondois, Sami Mujawar, Pierre Gondois, Yeo Reum Yun, Sunil V L, AbdulLateef Attar, Jeshua Smith, Jeff Brasen, Girish Mahadevan, Leif Lindholm, Meenakshi Aggarwal Some DynamicTables objects have been moved from the Arm namespace to a new Arch Common namespace. Prepare the handling of these objects in the ConfigurationManagers by adding a function handler for these objects. This patch modifies the ConfigurationManager of the following platforms: - Juno - FVP Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Pierre Gondois <Pierre.Gondois@arm.com> Cc: Yeo Reum Yun <YeoReum.Yun@arm.com> Cc: AbdulLateef Attar <AbdulLateef.Attar@amd.com> Cc: Jeshua Smith <jeshuas@nvidia.com> Cc: Jeff Brasen <jbrasen@nvidia.com> Cc: Girish Mahadevan <gmahadevan@nvidia.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> --- .../ConfigurationManager.c | 56 ++++++++++++++++++- .../ConfigurationManager.c | 55 +++++++++++++++++- 2 files changed, 109 insertions(+), 2 deletions(-) diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c index 26d9da25065a..6cd1e6e1135b 100644 --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c @@ -1,7 +1,7 @@ /** @file Configuration Manager Dxe - Copyright (c) 2017 - 2023, Arm Limited. All rights reserved.<BR> + Copyright (c) 2017 - 2024, Arm Limited. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent @@ -1612,6 +1612,57 @@ GetStandardNameSpaceObject ( return Status; } + +/** Return an Arch Common namespace object. + + @param [in] This Pointer to the Configuration Manager Protocol. + @param [in] CmObjectId The Configuration Manager Object ID. + @param [in] Token An optional token identifying the object. If + unused this must be CM_NULL_TOKEN. + @param [in, out] CmObject Pointer to the Configuration Manager Object + descriptor describing the requested Object. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object information is not found. +**/ +EFI_STATUS +EFIAPI +GetArchCommonNameSpaceObject ( + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This, + IN CONST CM_OBJECT_ID CmObjectId, + IN CONST CM_OBJECT_TOKEN Token OPTIONAL, + IN OUT CM_OBJ_DESCRIPTOR * CONST CmObject + ) +{ + EFI_STATUS Status; + EDKII_PLATFORM_REPOSITORY_INFO * PlatformRepo; + + if ((This == NULL) || (CmObject == NULL)) { + ASSERT (This != NULL); + ASSERT (CmObject != NULL); + return EFI_INVALID_PARAMETER; + } + + Status = EFI_NOT_FOUND; + PlatformRepo = This->PlatRepoInfo; + + switch (GET_CM_OBJECT_ID (CmObjectId)) { + default: { + Status = EFI_NOT_FOUND; + DEBUG (( + DEBUG_INFO, + "INFO: Object 0x%x. Status = %r\n", + CmObjectId, + Status + )); + break; + } + } //switch + + return Status; +} + /** Return an ARM namespace object. @param [in] This Pointer to the Configuration Manager Protocol. @@ -1980,6 +2031,9 @@ ArmJunoPlatformGetObject ( case EObjNameSpaceStandard: Status = GetStandardNameSpaceObject (This, CmObjectId, Token, CmObject); break; + case EObjNameSpaceArchCommon: + Status = GetArchCommonNameSpaceObject (This, CmObjectId, Token, CmObject); + break; case EObjNameSpaceArm: Status = GetArmNameSpaceObject (This, CmObjectId, Token, CmObject); break; diff --git a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c index 5b5d1f9d04c0..f145205c4da0 100644 --- a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c +++ b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c @@ -1,7 +1,7 @@ /** @file Configuration Manager Dxe - Copyright (c) 2017 - 2023, Arm Limited. All rights reserved.<BR> + Copyright (c) 2017 - 2024, Arm Limited. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent @@ -730,6 +730,56 @@ GetStandardNameSpaceObject ( return Status; } +/** Return an Arch Common namespace object. + + @param [in] This Pointer to the Configuration Manager Protocol. + @param [in] CmObjectId The Configuration Manager Object ID. + @param [in] Token An optional token identifying the object. If + unused this must be CM_NULL_TOKEN. + @param [in, out] CmObject Pointer to the Configuration Manager Object + descriptor describing the requested Object. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object information is not found. +**/ +EFI_STATUS +EFIAPI +GetArchCommonNameSpaceObject ( + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This, + IN CONST CM_OBJECT_ID CmObjectId, + IN CONST CM_OBJECT_TOKEN Token OPTIONAL, + IN OUT CM_OBJ_DESCRIPTOR * CONST CmObject + ) +{ + EFI_STATUS Status; + EDKII_PLATFORM_REPOSITORY_INFO * PlatformRepo; + + if ((This == NULL) || (CmObject == NULL)) { + ASSERT (This != NULL); + ASSERT (CmObject != NULL); + return EFI_INVALID_PARAMETER; + } + + Status = EFI_NOT_FOUND; + PlatformRepo = This->PlatRepoInfo; + + switch (GET_CM_OBJECT_ID (CmObjectId)) { + default: { + Status = EFI_NOT_FOUND; + DEBUG (( + DEBUG_INFO, + "INFO: Object 0x%x. Status = %r\n", + CmObjectId, + Status + )); + break; + } + } //switch + + return Status; +} + /** Return an ARM namespace object. @param [in] This Pointer to the Configuration Manager Protocol. @@ -1101,6 +1151,9 @@ ArmVExpressPlatformGetObject ( case EObjNameSpaceStandard: Status = GetStandardNameSpaceObject (This, CmObjectId, Token, CmObject); break; + case EObjNameSpaceArchCommon: + Status = GetArchCommonNameSpaceObject (This, CmObjectId, Token, CmObject); + break; case EObjNameSpaceArm: Status = GetArmNameSpaceObject (This, CmObjectId, Token, CmObject); break; -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116999): https://edk2.groups.io/g/devel/message/116999 Mute This Topic: https://groups.io/mt/105068391/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [edk2-devel] [PATCH 02/14] Platform/ARM: FVP,Juno: Move Power Mgmt Profile info to Arch Common 2024-03-21 16:08 [edk2-devel] [PATCH 00/14] Platform/ARM: FVP, Juno: Move DynamicTablesPkg obj to Arch Common PierreGondois 2024-03-21 16:08 ` [edk2-devel] [PATCH 01/14] Platform/ARM: FVP,Juno: Add Arch Common objects handler PierreGondois @ 2024-03-21 16:08 ` PierreGondois 1 sibling, 0 replies; 4+ messages in thread From: PierreGondois @ 2024-03-21 16:08 UTC (permalink / raw) To: devel Cc: Pierre Gondois, Sami Mujawar, Pierre Gondois, Yeo Reum Yun, Sunil V L, AbdulLateef Attar, Jeshua Smith, Jeff Brasen, Girish Mahadevan, Leif Lindholm, Meenakshi Aggarwal Some DynamicTables objects have been moved from the Arm namespace to a new Arch Common namespace. Reflect this change by renaming/moving the relevant object. This patch modifies the ConfigurationManager of the following platforms: - Juno - FVP for the following Arch Common object Id: - EArchCommonObjPowerManagementProfileInfo Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Pierre Gondois <Pierre.Gondois@arm.com> Cc: Yeo Reum Yun <YeoReum.Yun@arm.com> Cc: AbdulLateef Attar <AbdulLateef.Attar@amd.com> Cc: Jeshua Smith <jeshuas@nvidia.com> Cc: Jeff Brasen <jbrasen@nvidia.com> Cc: Girish Mahadevan <gmahadevan@nvidia.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> --- .../ConfigurationManager.c | 19 ++++++++++--------- .../ConfigurationManager.h | 2 +- .../ConfigurationManager.c | 19 ++++++++++--------- .../ConfigurationManager.h | 2 +- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c index 6cd1e6e1135b..c1af3bac2458 100644 --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c @@ -1648,6 +1648,16 @@ GetArchCommonNameSpaceObject ( PlatformRepo = This->PlatRepoInfo; switch (GET_CM_OBJECT_ID (CmObjectId)) { + case EArchCommonObjPowerManagementProfileInfo: + Status = HandleCmObject ( + CmObjectId, + &PlatformRepo->PmProfileInfo, + sizeof (PlatformRepo->PmProfileInfo), + 1, + CmObject + ); + break; + default: { Status = EFI_NOT_FOUND; DEBUG (( @@ -1707,15 +1717,6 @@ GetArmNameSpaceObject ( CmObject ); break; - case EArmObjPowerManagementProfileInfo: - Status = HandleCmObject ( - CmObjectId, - &PlatformRepo->PmProfileInfo, - sizeof (PlatformRepo->PmProfileInfo), - 1, - CmObject - ); - break; case EArmObjGenericTimerInfo: Status = HandleCmObject ( diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h index 78452295a180..034d945f18c5 100644 --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h @@ -227,7 +227,7 @@ typedef struct PlatformRepositoryInfo { CM_ARM_BOOT_ARCH_INFO BootArchInfo; /// Power management profile information - CM_ARM_POWER_MANAGEMENT_PROFILE_INFO PmProfileInfo; + CM_ARCH_COMMON_POWER_MANAGEMENT_PROFILE_INFO PmProfileInfo; /// GIC CPU interface information CM_ARM_GICC_INFO GicCInfo[PLAT_CPU_COUNT]; diff --git a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c index f145205c4da0..dd7b068a335b 100644 --- a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c +++ b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c @@ -765,6 +765,16 @@ GetArchCommonNameSpaceObject ( PlatformRepo = This->PlatRepoInfo; switch (GET_CM_OBJECT_ID (CmObjectId)) { + case EArchCommonObjPowerManagementProfileInfo: + Status = HandleCmObject ( + CmObjectId, + &PlatformRepo->PmProfileInfo, + sizeof (PlatformRepo->PmProfileInfo), + 1, + CmObject + ); + break; + default: { Status = EFI_NOT_FOUND; DEBUG (( @@ -859,15 +869,6 @@ GetArmNameSpaceObject ( ); break; #endif - case EArmObjPowerManagementProfileInfo: - Status = HandleCmObject ( - CmObjectId, - &PlatformRepo->PmProfileInfo, - sizeof (PlatformRepo->PmProfileInfo), - 1, - CmObject - ); - break; case EArmObjGenericTimerInfo: Status = HandleCmObject ( diff --git a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h index be2b512911f8..f4d26242c27c 100644 --- a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h +++ b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.h @@ -118,7 +118,7 @@ typedef struct PlatformRepositoryInfo { #endif /// Power management profile information - CM_ARM_POWER_MANAGEMENT_PROFILE_INFO PmProfileInfo; + CM_ARCH_COMMON_POWER_MANAGEMENT_PROFILE_INFO PmProfileInfo; /// GIC CPU interface information CM_ARM_GICC_INFO GicCInfo[PLAT_CPU_COUNT]; -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117000): https://edk2.groups.io/g/devel/message/117000 Mute This Topic: https://groups.io/mt/105068400/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [edk2-devel] [RESEND PATCH 00/14] Platform/ARM: FVP, Juno: Move DynamicTablesPkg obj to Arch Common @ 2024-03-21 17:18 PierreGondois 2024-03-21 17:18 ` [edk2-devel] [PATCH 01/14] Platform/ARM: FVP,Juno: Add Arch Common objects handler PierreGondois 0 siblings, 1 reply; 4+ messages in thread From: PierreGondois @ 2024-03-21 17:18 UTC (permalink / raw) To: devel Cc: Pierre Gondois, Sami Mujawar, Pierre Gondois, Yeo Reum Yun, Sunil V L, AbdulLateef Attar, Jeshua Smith, Jeff Brasen, Girish Mahadevan, Leif Lindholm, Meenakshi Aggarwal Resend this patch since 'more than 40 messages in 30 minutes' have been sent and the mailing list blocked/rejected some patches. Following [1] and [2], other architectures than Arm aim to leverage the DynamicTablesPkg. The package uses namespaces/domains to split objects IDs. Currently most of the objects are part of the Arm namespace. Some objects are generic enough to be re-used by other architectures. [3] and [4] moved the objects that could be re-used to an Arch Common namespace. Update the following platforms which use the DynamicTablesPkg framework/objects: - Juno - VExpress The following platforms were not updated yet: - Platform/ARM/N1Sdp - Platform/ARM/Morello - Platform/NXP/ConfigurationManagerPkg A branch holding the whole patchset is available at: - https://github.com/pierregondois/edk2-platforms/tree/pg/arch_common_obj_sent [1] Branch to reorg Dynamic Tables & support other arch https://edk2.groups.io/g/devel/topic/104054584#116308 [2] DynamicTablesPkg: Arch Common Namespace https://edk2.groups.io/g/devel/message/116330 [3] https://edk2.groups.io/g/devel/message/116961 (first part) [4] https://edk2.groups.io/g/devel/message/116978 (second part) Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Pierre Gondois <Pierre.Gondois@arm.com> Cc: Yeo Reum Yun <YeoReum.Yun@arm.com> Cc: Sunil V L <sunilvl@ventanamicro.com> Cc: AbdulLateef Attar <AbdulLateef.Attar@amd.com> Cc: Jeshua Smith <jeshuas@nvidia.com> Cc: Jeff Brasen <jbrasen@nvidia.com> Cc: Girish Mahadevan <gmahadevan@nvidia.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com> Pierre Gondois (14): Platform/ARM: FVP,Juno: Add Arch Common objects handler Platform/ARM: FVP,Juno: Move Power Mgmt Profile info to Arch Common Platform/ARM: FVP,Juno:: Move Serial Port info to Arch Common Platform/ARM: FVP: Move Fixed Feat Flags info to Arch Common Platform/ARM: Juno: Move CmRef info to Arch Common Platform/ARM: FVP,Juno: Move Pci Config Space info to Arch Common Platform/ARM: Juno: Move Pci Address Map info to Arch Common Platform/ARM: Juno: Move Pci Interrupt Map info to Arch Common Platform/ARM: Juno: Move Lpi info to Arch Common Platform/ARM: Juno: Rename GicCToken Platform/ARM: Juno: Move Proc Hierarchy info to Arch Common Platform/ARM: Juno: Move Cache info to Arch Common Platform/ARM: Juno: Move Cpc info to Arch Common Platform/ARM: Juno: Move Psd info to Arch Common .../ConfigurationManager.c | 363 ++++++++++-------- .../ConfigurationManager.h | 38 +- .../ConfigurationManager.c | 169 +++++--- .../ConfigurationManager.h | 10 +- 4 files changed, 348 insertions(+), 232 deletions(-) -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117001): https://edk2.groups.io/g/devel/message/117001 Mute This Topic: https://groups.io/mt/105069934/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 4+ messages in thread
* [edk2-devel] [PATCH 01/14] Platform/ARM: FVP,Juno: Add Arch Common objects handler 2024-03-21 17:18 [edk2-devel] [RESEND PATCH 00/14] Platform/ARM: FVP, Juno: Move DynamicTablesPkg obj " PierreGondois @ 2024-03-21 17:18 ` PierreGondois 0 siblings, 0 replies; 4+ messages in thread From: PierreGondois @ 2024-03-21 17:18 UTC (permalink / raw) To: devel Cc: Pierre Gondois, Sami Mujawar, Pierre Gondois, Yeo Reum Yun, Sunil V L, AbdulLateef Attar, Jeshua Smith, Jeff Brasen, Girish Mahadevan, Leif Lindholm, Meenakshi Aggarwal Some DynamicTables objects have been moved from the Arm namespace to a new Arch Common namespace. Prepare the handling of these objects in the ConfigurationManagers by adding a function handler for these objects. This patch modifies the ConfigurationManager of the following platforms: - Juno - FVP Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Pierre Gondois <Pierre.Gondois@arm.com> Cc: Yeo Reum Yun <YeoReum.Yun@arm.com> Cc: AbdulLateef Attar <AbdulLateef.Attar@amd.com> Cc: Jeshua Smith <jeshuas@nvidia.com> Cc: Jeff Brasen <jbrasen@nvidia.com> Cc: Girish Mahadevan <gmahadevan@nvidia.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> --- .../ConfigurationManager.c | 56 ++++++++++++++++++- .../ConfigurationManager.c | 55 +++++++++++++++++- 2 files changed, 109 insertions(+), 2 deletions(-) diff --git a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c index 26d9da25065a..6cd1e6e1135b 100644 --- a/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c +++ b/Platform/ARM/JunoPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c @@ -1,7 +1,7 @@ /** @file Configuration Manager Dxe - Copyright (c) 2017 - 2023, Arm Limited. All rights reserved.<BR> + Copyright (c) 2017 - 2024, Arm Limited. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent @@ -1612,6 +1612,57 @@ GetStandardNameSpaceObject ( return Status; } + +/** Return an Arch Common namespace object. + + @param [in] This Pointer to the Configuration Manager Protocol. + @param [in] CmObjectId The Configuration Manager Object ID. + @param [in] Token An optional token identifying the object. If + unused this must be CM_NULL_TOKEN. + @param [in, out] CmObject Pointer to the Configuration Manager Object + descriptor describing the requested Object. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object information is not found. +**/ +EFI_STATUS +EFIAPI +GetArchCommonNameSpaceObject ( + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This, + IN CONST CM_OBJECT_ID CmObjectId, + IN CONST CM_OBJECT_TOKEN Token OPTIONAL, + IN OUT CM_OBJ_DESCRIPTOR * CONST CmObject + ) +{ + EFI_STATUS Status; + EDKII_PLATFORM_REPOSITORY_INFO * PlatformRepo; + + if ((This == NULL) || (CmObject == NULL)) { + ASSERT (This != NULL); + ASSERT (CmObject != NULL); + return EFI_INVALID_PARAMETER; + } + + Status = EFI_NOT_FOUND; + PlatformRepo = This->PlatRepoInfo; + + switch (GET_CM_OBJECT_ID (CmObjectId)) { + default: { + Status = EFI_NOT_FOUND; + DEBUG (( + DEBUG_INFO, + "INFO: Object 0x%x. Status = %r\n", + CmObjectId, + Status + )); + break; + } + } //switch + + return Status; +} + /** Return an ARM namespace object. @param [in] This Pointer to the Configuration Manager Protocol. @@ -1980,6 +2031,9 @@ ArmJunoPlatformGetObject ( case EObjNameSpaceStandard: Status = GetStandardNameSpaceObject (This, CmObjectId, Token, CmObject); break; + case EObjNameSpaceArchCommon: + Status = GetArchCommonNameSpaceObject (This, CmObjectId, Token, CmObject); + break; case EObjNameSpaceArm: Status = GetArmNameSpaceObject (This, CmObjectId, Token, CmObject); break; diff --git a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c index 5b5d1f9d04c0..f145205c4da0 100644 --- a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c +++ b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c @@ -1,7 +1,7 @@ /** @file Configuration Manager Dxe - Copyright (c) 2017 - 2023, Arm Limited. All rights reserved.<BR> + Copyright (c) 2017 - 2024, Arm Limited. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent @@ -730,6 +730,56 @@ GetStandardNameSpaceObject ( return Status; } +/** Return an Arch Common namespace object. + + @param [in] This Pointer to the Configuration Manager Protocol. + @param [in] CmObjectId The Configuration Manager Object ID. + @param [in] Token An optional token identifying the object. If + unused this must be CM_NULL_TOKEN. + @param [in, out] CmObject Pointer to the Configuration Manager Object + descriptor describing the requested Object. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object information is not found. +**/ +EFI_STATUS +EFIAPI +GetArchCommonNameSpaceObject ( + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST This, + IN CONST CM_OBJECT_ID CmObjectId, + IN CONST CM_OBJECT_TOKEN Token OPTIONAL, + IN OUT CM_OBJ_DESCRIPTOR * CONST CmObject + ) +{ + EFI_STATUS Status; + EDKII_PLATFORM_REPOSITORY_INFO * PlatformRepo; + + if ((This == NULL) || (CmObject == NULL)) { + ASSERT (This != NULL); + ASSERT (CmObject != NULL); + return EFI_INVALID_PARAMETER; + } + + Status = EFI_NOT_FOUND; + PlatformRepo = This->PlatRepoInfo; + + switch (GET_CM_OBJECT_ID (CmObjectId)) { + default: { + Status = EFI_NOT_FOUND; + DEBUG (( + DEBUG_INFO, + "INFO: Object 0x%x. Status = %r\n", + CmObjectId, + Status + )); + break; + } + } //switch + + return Status; +} + /** Return an ARM namespace object. @param [in] This Pointer to the Configuration Manager Protocol. @@ -1101,6 +1151,9 @@ ArmVExpressPlatformGetObject ( case EObjNameSpaceStandard: Status = GetStandardNameSpaceObject (This, CmObjectId, Token, CmObject); break; + case EObjNameSpaceArchCommon: + Status = GetArchCommonNameSpaceObject (This, CmObjectId, Token, CmObject); + break; case EObjNameSpaceArm: Status = GetArmNameSpaceObject (This, CmObjectId, Token, CmObject); break; -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117002): https://edk2.groups.io/g/devel/message/117002 Mute This Topic: https://groups.io/mt/105069936/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-03-21 17:18 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-03-21 16:08 [edk2-devel] [PATCH 00/14] Platform/ARM: FVP, Juno: Move DynamicTablesPkg obj to Arch Common PierreGondois 2024-03-21 16:08 ` [edk2-devel] [PATCH 01/14] Platform/ARM: FVP,Juno: Add Arch Common objects handler PierreGondois 2024-03-21 16:08 ` [edk2-devel] [PATCH 02/14] Platform/ARM: FVP,Juno: Move Power Mgmt Profile info to Arch Common PierreGondois -- strict thread matches above, loose matches on Subject: below -- 2024-03-21 17:18 [edk2-devel] [RESEND PATCH 00/14] Platform/ARM: FVP, Juno: Move DynamicTablesPkg obj " PierreGondois 2024-03-21 17:18 ` [edk2-devel] [PATCH 01/14] Platform/ARM: FVP,Juno: Add Arch Common objects handler PierreGondois
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox