* [edk2-devel] [platforms/devel-dynamictables-reorg PATCH V1 1/1] Platform/ARM/Morello: Check platform specific arch common namespace objects
@ 2024-07-17 10:43 Himanshu Sharma
2024-07-26 11:05 ` PierreGondois
0 siblings, 1 reply; 3+ messages in thread
From: Himanshu Sharma @ 2024-07-17 10:43 UTC (permalink / raw)
To: devel; +Cc: Sami Mujawar, Pierre Gondois, Yeo Reum Yun
Add a check for platform specific arch common namespace object in
ConfigurationManager.c file.
Signed-off-by: Himanshu Sharma <Himanshu.Sharma@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/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] 3+ messages in thread
* Re: [edk2-devel] [platforms/devel-dynamictables-reorg PATCH V1 1/1] Platform/ARM/Morello: Check platform specific arch common namespace objects
2024-07-17 10:43 [edk2-devel] [platforms/devel-dynamictables-reorg PATCH V1 1/1] Platform/ARM/Morello: Check platform specific arch common namespace objects Himanshu Sharma
@ 2024-07-26 11:05 ` PierreGondois
2024-07-29 13:42 ` Sami Mujawar
0 siblings, 1 reply; 3+ messages in thread
From: PierreGondois @ 2024-07-26 11:05 UTC (permalink / raw)
To: Himanshu Sharma, devel; +Cc: Sami Mujawar, Yeo Reum Yun
Hello Himanshu,
Thanks for the patch:
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Pierre
On 7/17/24 12:43, Himanshu Sharma wrote:
> Add a check for platform specific arch common namespace object in
> ConfigurationManager.c file.
>
> Signed-off-by: Himanshu Sharma <Himanshu.Sharma@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;
> }
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120046): https://edk2.groups.io/g/devel/message/120046
Mute This Topic: https://groups.io/mt/107268665/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [edk2-devel] [platforms/devel-dynamictables-reorg PATCH V1 1/1] Platform/ARM/Morello: Check platform specific arch common namespace objects
2024-07-26 11:05 ` PierreGondois
@ 2024-07-29 13:42 ` Sami Mujawar
0 siblings, 0 replies; 3+ messages in thread
From: Sami Mujawar @ 2024-07-29 13:42 UTC (permalink / raw)
To: PierreGondois, devel
[-- Attachment #1: Type: text/plain, Size: 494 bytes --]
Hi Himanshu,
These changes look good to me.
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Regards,
Sami Mujawar
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120064): https://edk2.groups.io/g/devel/message/120064
Mute This Topic: https://groups.io/mt/107268665/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 1035 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-29 13:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-17 10:43 [edk2-devel] [platforms/devel-dynamictables-reorg PATCH V1 1/1] Platform/ARM/Morello: Check platform specific arch common namespace objects Himanshu Sharma
2024-07-26 11:05 ` PierreGondois
2024-07-29 13:42 ` Sami Mujawar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox