From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 8685C94179E for ; Wed, 17 Jul 2024 10:43:09 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=IvSaoXYlMPQ71lf2WvmWXXvE8j6I17P+b43DzFhMGKI=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1721212989; v=1; b=3V3oz4/wReRi3zKQuuAfkB/sVjFEum+g1zrtPHiNnreFm7zBzf7eWtECWnWuWVKAGN1ANHTR CZo4yRRUJG1N2Xxcy0/2p1QinYezUt+Hon336ljapkOXba27vkbngElajAXlPO055v6Hrnmhb6t ik9Sj8t5s/lXzqlXuMO0xnJZdHIyTzzqmGEv9HMbh8jBsOk8K27/C3zPFRpY2V/5jzbkR71Ni6p ZcmfNdhAxvult/Yq4h0iFIoWo5EH31xA0a883ipGWpwDNEDb/LSwdX0KV0/a3gydHjDZKTPLzQt WKAAFeNzkK21I3bblmszDS1Wt9I9UEJCiWcwZGZAWo8SQ== X-Received: by 127.0.0.2 with SMTP id MxAWYY7687511xGo2F60lOeZ; Wed, 17 Jul 2024 03:43:08 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.12345.1721212987235118386 for ; Wed, 17 Jul 2024 03:43:07 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DAA2A1063; Wed, 17 Jul 2024 03:43:31 -0700 (PDT) X-Received: from usa.arm.com (a076756.arm.com [10.162.16.85]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0B41D3F73F; Wed, 17 Jul 2024 03:43:04 -0700 (PDT) From: "Himanshu Sharma" To: devel@edk2.groups.io Cc: Sami Mujawar , Pierre Gondois , Yeo Reum Yun Subject: [edk2-devel] [platforms/devel-dynamictables-reorg PATCH V1 1/1] Platform/ARM/Morello: Check platform specific arch common namespace objects Date: Wed, 17 Jul 2024 16:13:00 +0530 Message-Id: <20240717104300.3770463-1-Himanshu.Sharma@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Wed, 17 Jul 2024 03:43:07 -0700 Resent-From: Himanshu.Sharma@arm.com Reply-To: devel@edk2.groups.io,Himanshu.Sharma@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: q2DxIQVg5d5G04fm3Ix5e8bdx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b="3V3oz4/w"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io Add a check for platform specific arch common namespace object in ConfigurationManager.c file. Signed-off-by: Himanshu Sharma --- Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Configur= ationManagerFvp.h | 24 +++++++++- Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Configur= ationManager.c | 49 +++++++++++--------- 2 files changed, 51 insertions(+), 22 deletions(-) diff --git a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManager= Dxe/ConfigurationManagerFvp.h b/Platform/ARM/Morello/ConfigurationManager/C= onfigurationManagerDxe/ConfigurationManagerFvp.h index 744b6095c16c..4a393195ef1a 100644 --- a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Con= figurationManagerFvp.h +++ b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Con= figurationManagerFvp.h @@ -1,6 +1,6 @@ /** @file=0D =0D - Copyright (c) 2021, ARM Limited. All rights reserved.
=0D + Copyright (c) 2021 - 2024, ARM Limited. All rights reserved.
=0D =0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D @@ -75,6 +75,28 @@ typedef struct PlatformRepositoryInfo { =0D extern EDKII_COMMON_PLATFORM_REPOSITORY_INFO CommonPlatformInfo;=0D =0D +/** Return platform specific arch common namespace object.=0D +=0D + @param [in] This Pointer to the Configuration Manager Protoc= ol.=0D + @param [in] CmObjectId The Configuration Manager Object ID.=0D + @param [in] Token An optional token identifying the object. I= f=0D + unused this must be CM_NULL_TOKEN.=0D + @param [in, out] CmObject Pointer to the Configuration Manager Object= =0D + descriptor describing the requested Object.= =0D +=0D + @retval EFI_SUCCESS Success.=0D + @retval EFI_INVALID_PARAMETER A parameter is invalid.=0D + @retval EFI_NOT_FOUND The required object information is not fou= nd.=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +GetArchCommonNameSpaceObjectPlat (=0D + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This,=0D + IN CONST CM_OBJECT_ID CmObjectId,=0D + IN CONST CM_OBJECT_TOKEN Token OPTIONAL,= =0D + IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject=0D + );=0D +=0D /** Return platform specific ARM namespace object.=0D =0D @param [in] This Pointer to the Configuration Manager Protoc= ol.=0D diff --git a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManager= Dxe/ConfigurationManager.c b/Platform/ARM/Morello/ConfigurationManager/Conf= igurationManagerDxe/ConfigurationManager.c index d3624462aa8a..dce2c2e3801c 100644 --- a/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Con= figurationManager.c +++ b/Platform/ARM/Morello/ConfigurationManager/ConfigurationManagerDxe/Con= figurationManager.c @@ -800,7 +800,12 @@ GetArchCommonNameSpaceObject ( PlatformRepo =3D This->PlatRepoInfo;=0D CommonPlatRepo =3D This->PlatRepoInfo->CommonPlatRepoInfo;=0D =0D - switch (GET_CM_OBJECT_ID (CmObjectId)) {=0D + // Search for the FVP platform specific Arch Common namespace objects=0D + Status =3D GetArchCommonNameSpaceObjectPlat (This, CmObjectId, Token, Cm= Object);=0D +=0D + // Get the object if not found in the platform specific search=0D + if (Status =3D=3D EFI_NOT_FOUND) {=0D + switch (GET_CM_OBJECT_ID (CmObjectId)) {=0D case EArchCommonObjPowerManagementProfileInfo:=0D Status =3D HandleCmObject (=0D CmObjectId,=0D @@ -809,7 +814,7 @@ GetArchCommonNameSpaceObject ( 1,=0D CmObject=0D );=0D - break;=0D + break;=0D =0D case EArchCommonObjConsolePortInfo:=0D Status =3D HandleCmObject (=0D @@ -819,7 +824,7 @@ GetArchCommonNameSpaceObject ( 1,=0D CmObject=0D );=0D - break;=0D + break;=0D =0D case EArchCommonObjSerialDebugPortInfo:=0D Status =3D HandleCmObject (=0D @@ -829,9 +834,9 @@ GetArchCommonNameSpaceObject ( 1,=0D CmObject=0D );=0D - break;=0D + break;=0D =0D -#ifdef HEADLESS_PLATFORM=0D + #ifdef HEADLESS_PLATFORM=0D case EArchCommonObjFixedFeatureFlags:=0D Status =3D HandleCmObject (=0D CmObjectId,=0D @@ -840,8 +845,8 @@ GetArchCommonNameSpaceObject ( 1,=0D CmObject=0D );=0D - break;=0D -#endif=0D + break;=0D + #endif=0D =0D case EArchCommonObjCmRef:=0D Status =3D HandleCmObjectSearchPlatformRepo (=0D @@ -851,7 +856,7 @@ GetArchCommonNameSpaceObject ( GetCmObjRefs,=0D CmObject=0D );=0D - break;=0D + break;=0D =0D case EArchCommonObjProcHierarchyInfo:=0D Status =3D HandleCmObject (=0D @@ -861,7 +866,7 @@ GetArchCommonNameSpaceObject ( PLAT_PROC_HIERARCHY_NODE_COUNT,=0D CmObject=0D );=0D - break;=0D + break;=0D =0D case EArchCommonObjCacheInfo:=0D Status =3D HandleCmObject (=0D @@ -871,19 +876,21 @@ GetArchCommonNameSpaceObject ( ARRAY_SIZE (CommonPlatRepo->CacheInfo),=0D CmObject=0D );=0D - break;=0D + break;=0D =0D - default: {=0D - Status =3D EFI_NOT_FOUND;=0D - DEBUG ((=0D - DEBUG_INFO,=0D - "INFO: Object 0x%x. Status =3D %r\n",=0D - CmObjectId,=0D - Status=0D - ));=0D - break;=0D - }=0D - } //switch=0D + default:=0D + {=0D + Status =3D EFI_NOT_FOUND;=0D + DEBUG ((=0D + DEBUG_INFO,=0D + "INFO: Object 0x%x. Status =3D %r\n",=0D + CmObjectId,=0D + Status=0D + ));=0D + break;=0D + }=0D + } // switch=0D + } // if=0D =0D return Status;=0D }=0D --=20 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] -=-=-=-=-=-=-=-=-=-=-=-