Add a check for platform specific arch common namespace object in ConfigurationManager.c file.
Signed-off-by: Himanshu Sharma <himanshu.sha...@arm.com> --- Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.h | 24 +++++++++- Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c | 49 +++++++++++--------- 2 files changed, 51 insertions(+), 22 deletions(-) diff --git a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.h b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.h index 744b6095c16c..4a393195ef1a 100644 --- a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.h +++ b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerFvp.h @@ -1,6 +1,6 @@ /** @file - Copyright (c) 2021, ARM Limited. All rights reserved.<BR> + Copyright (c) 2021 - 2024, ARM Limited. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent @@ -75,6 +75,28 @@ typedef struct PlatformRepositoryInfo { extern EDKII_COMMON_PLATFORM_REPOSITORY_INFO CommonPlatformInfo; +/** Return platform specific 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 +GetArchCommonNameSpaceObjectPlat ( + 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 + ); + /** Return platform specific ARM namespace object. @param [in] This Pointer to the Configuration Manager Protocol. diff --git a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c index d3624462aa8a..dce2c2e3801c 100644 --- a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c +++ b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c @@ -800,7 +800,12 @@ GetArchCommonNameSpaceObject ( PlatformRepo = This->PlatRepoInfo; CommonPlatRepo = This->PlatRepoInfo->CommonPlatRepoInfo; - switch (GET_CM_OBJECT_ID (CmObjectId)) { + // Search for the FVP platform specific Arch Common namespace objects + Status = GetArchCommonNameSpaceObjectPlat (This, CmObjectId, Token, CmObject); + + // Get the object if not found in the platform specific search + if (Status == EFI_NOT_FOUND) { + switch (GET_CM_OBJECT_ID (CmObjectId)) { case EArchCommonObjPowerManagementProfileInfo: Status = HandleCmObject ( CmObjectId, @@ -809,7 +814,7 @@ GetArchCommonNameSpaceObject ( 1, CmObject ); - break; + break; case EArchCommonObjConsolePortInfo: Status = HandleCmObject ( @@ -819,7 +824,7 @@ GetArchCommonNameSpaceObject ( 1, CmObject ); - break; + break; case EArchCommonObjSerialDebugPortInfo: Status = HandleCmObject ( @@ -829,9 +834,9 @@ GetArchCommonNameSpaceObject ( 1, CmObject ); - break; + break; -#ifdef HEADLESS_PLATFORM + #ifdef HEADLESS_PLATFORM case EArchCommonObjFixedFeatureFlags: Status = HandleCmObject ( CmObjectId, @@ -840,8 +845,8 @@ GetArchCommonNameSpaceObject ( 1, CmObject ); - break; -#endif + break; + #endif case EArchCommonObjCmRef: Status = HandleCmObjectSearchPlatformRepo ( @@ -851,7 +856,7 @@ GetArchCommonNameSpaceObject ( GetCmObjRefs, CmObject ); - break; + break; case EArchCommonObjProcHierarchyInfo: Status = HandleCmObject ( @@ -861,7 +866,7 @@ GetArchCommonNameSpaceObject ( PLAT_PROC_HIERARCHY_NODE_COUNT, CmObject ); - break; + break; case EArchCommonObjCacheInfo: Status = HandleCmObject ( @@ -871,19 +876,21 @@ GetArchCommonNameSpaceObject ( ARRAY_SIZE (CommonPlatRepo->CacheInfo), CmObject ); - break; + break; - default: { - Status = EFI_NOT_FOUND; - DEBUG (( - DEBUG_INFO, - "INFO: Object 0x%x. Status = %r\n", - CmObjectId, - Status - )); - break; - } - } //switch + default: + { + Status = EFI_NOT_FOUND; + DEBUG (( + DEBUG_INFO, + "INFO: Object 0x%x. Status = %r\n", + CmObjectId, + Status + )); + break; + } + } // switch + } // if return Status; } -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119951): https://edk2.groups.io/g/devel/message/119951 Mute This Topic: https://groups.io/mt/107268665/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-