public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "PierreGondois" <pierre.gondois@arm.com>
To: Himanshu Sharma <Himanshu.Sharma@arm.com>, devel@edk2.groups.io
Cc: Sami Mujawar <sami.mujawar@arm.com>, Yeo Reum Yun <YeoReum.Yun@arm.com>
Subject: Re: [edk2-devel] [platforms/devel-dynamictables-reorg PATCH V1 1/1] Platform/ARM/Morello: Check platform specific arch common namespace objects
Date: Fri, 26 Jul 2024 13:05:27 +0200	[thread overview]
Message-ID: <949f9c80-7130-4744-93f6-337aaec6169c@arm.com> (raw)
In-Reply-To: <20240717104300.3770463-1-Himanshu.Sharma@arm.com>

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]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-07-26 11:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2024-07-29 13:42   ` Sami Mujawar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=949f9c80-7130-4744-93f6-337aaec6169c@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox