From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id C80437803CC for ; Wed, 27 Mar 2024 07:38:52 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=SKj4ioBwkgGYfj9vRDa4gNR2u27UwtNcPDolTZABsRM=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1711525131; v=1; b=azTLcULTG+aPNeWMii0j2XoAhblB/u1z5xjxqpNLM70uje+WeLMxmHSykJJBZpv5uUwcllZk mkevJuQAIlNzvVl6R//FIPIhs8GXJy7DJANy9X9Z0e4POYSzGXDNF3Oq4ATRBBTw0bt9Jqz20td rpRzlceEtC4/If8vkDuGy35zkzr1x+qwirYrsBrGnk8YB1Mn3nSmdn5A/FOF8JGY07i4LXRwerA Uv1r+Pcjiay7FHo6pKa1FA/v/r2Si74KMSMQkAS2xFfxOa3Zat0Ir2g0sa+6rMhkCWYMVqKER1n xN0S5gBmQvxJ90C1GLa9QeCM/FmCBPs8Fsrr+CmaoJUXQ== X-Received: by 127.0.0.2 with SMTP id ciczYY7687511xyNWWcwfpLM; Wed, 27 Mar 2024 00:38:51 -0700 X-Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [40.107.94.86]) by mx.groups.io with SMTP id smtpd.web10.32064.1711525130750763383 for ; Wed, 27 Mar 2024 00:38:50 -0700 X-Received: from MW4PR12MB7031.namprd12.prod.outlook.com (2603:10b6:303:1ef::6) by DS0PR12MB8318.namprd12.prod.outlook.com (2603:10b6:8:f6::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Wed, 27 Mar 2024 07:38:47 +0000 X-Received: from MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::fef9:2c9c:21b5:6f50]) by MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::fef9:2c9c:21b5:6f50%2]) with mapi id 15.20.7409.031; Wed, 27 Mar 2024 07:38:47 +0000 From: "Nickle Wang via groups.io" To: "abner.chang@amd.com" , "devel@edk2.groups.io" CC: Igor Kulchytskyy Subject: Re: [edk2-devel] [PATCH V2 3/6] RedfishPkg/RedfishPlatformConfigDxe:Add RefishDebugLib support Thread-Topic: [PATCH V2 3/6] RedfishPkg/RedfishPlatformConfigDxe:Add RefishDebugLib support Thread-Index: AQHaf5B7e6NtZf6BwkykLUn5cpYRkbFLNGAQ Date: Wed, 27 Mar 2024 07:38:47 +0000 Message-ID: References: <20240326151503.106-1-abner.chang@amd.com> <20240326151503.106-4-abner.chang@amd.com> In-Reply-To: <20240326151503.106-4-abner.chang@amd.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR12MB7031:EE_|DS0PR12MB8318:EE_ x-ms-office365-filtering-correlation-id: 65ea84f3-c743-4a79-1f02-08dc4e30eff9 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: QYdG3SAqLPJiferG9BWlovvLK8mDNkNodAwDq1o7QvQwsyM3/nQT5nq2fRpKsl1x2n6gPsNn0nam3e1w3eAeWtPQ2YthpPSLMEEeNWLABfCkKM7wTVW+0Z6k3rTvYMkoQ466rDJFPA4NPt0aQa1ZkYD4XVhNGqahkOUQWAVOKcBms9mg50CFpS7tpyaMAdkk0WW5nDxWVCLqrwFYLgNgGIcSF6EX2wtHcrIEMZa5X9S8996e7IyORrGUCt8yCakLeqZ0UxyCXkqoI/C1Nxzxv1Hem47gPf1kl6sKvn2h5mAIdQCmKbXWZxKvOR9WY3vOem7HkeT/dmz+QtxmlHfa5Z7lThdCSkAuA5O2Uk3JKyuNzSdA/9e7K3yODa8sVCG1+j5t5cUVhGfo6uuTj3Sp+DNaoySejNW7x199V2y+UZpaOGP6JjL263/Eez4pNd7cqGcNajmhNDSQd7MC7pTretHYSRCfDucQuj+cNi90LXi6L7LtoaUjldecM2NqBph5Tucb/Z6CB4oHsL3YxKBFGTQNKSuUISXAezMgo5R0OtR63AOQfziv3sTM62zk6MpL8CcrW8oKVkf9d4NBeUWJH1/1moRTVwdqZ+/WGb53gIxhZaXx/C8t1Ey3BId9Mgjssdze4TNcMYx0T18fW6QHMYCsLCBKjf1Ar4ZyJP1IoULJsB3r/363ahB71BVS+THgDew06q5CbdvURJW58iPHFTU9emWFz4jtcArZOQSuD8U= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/WDVMbD0D97uaX+yO1sL1p4SWrTIi4lRCMLCxI5pX7oA4Mr5xYiO4zQaxBT8?= =?us-ascii?Q?m2KCc77O71+7A3p43EfENYQQptl/0T/52h/bmpZRkfW0T5rSEQ8didblFLMg?= =?us-ascii?Q?br+x83FZU+30VTXKlVOhpHARUiBxMjOgr5AbfzZ+Ngz65XXaDY7z96PBY+3V?= =?us-ascii?Q?lOdH5O8aISU0CSOuwLmhU8/Kg6sNtFpFvQ8gbSjttTupCE7lt8gCX5gs9LY+?= =?us-ascii?Q?zUvkjR9ssElCO83YCPu8wHfkQFPRfdATfFTYiAe7wLWZuqPUpv3XEU5Ke8LQ?= =?us-ascii?Q?BQB29AIs+jFc+yYeb4a/xwR1elWMxObUqQ4oVezcKmGk252rFp3uaKSJtNTN?= =?us-ascii?Q?wGrAH/K5gTiPZqthxKCTpd0e0dXebfkURDbUPrSJ2GvRT5IkcCxdgWp8VXAn?= =?us-ascii?Q?u+9xBxiGuRASihBKBpBgpCQwlWoyBx6ai+IWV+t4fzrf1F+W0aNihPFRdh7R?= =?us-ascii?Q?p/7m0BEi8udJoFTVC/bCDinJbgOxEytd4dCMq5vDc0Qc0xEaGb2Gn1Kwt3LO?= =?us-ascii?Q?37s3yVQpg6jVfGlNF/aMGrwvZdMz8oC9kfRvyo3U3YjW3MawYvy/d+kRsbFk?= =?us-ascii?Q?fNy/LHUqI+3AU3vY0+1cZY15u3Yue5XnEaR6y7IamPZSJu2xnZxzLaxrWm2p?= =?us-ascii?Q?LmAviEL/y742W5pC7EL6ULiMbeYz87rxT6HDObdWr1fu7/oojAHrilBQH90g?= =?us-ascii?Q?EjfTo9vyCAWgum5Vd5wZ3Uux8jy5xPiToNpEwdttUH0Zzgzi/23M4dJz350z?= =?us-ascii?Q?IPEUx3ZOoc3czUpDwXHvg8i1vGTRxWGbZfsAu7R1fokuE2mlzvsPCsBirk1V?= =?us-ascii?Q?x083EJzPxOA9nVGM4+4+y/7+8SVIwIkSCqTp/zKlU81AhJ03M6mhXPN+x17y?= =?us-ascii?Q?CcPipCzJbxgH/z56yeIfB00zfaM2WPED6nzru8sxZNzj2YE/zUWpggYaqIMO?= =?us-ascii?Q?fTd58yWw6BjPswz1xp0lbtCVahnBpqHQFIsEPxwsLqHtpzSrlJhJoKXzeH/R?= =?us-ascii?Q?TZFQmpK3u/QPdX4424mNBe8jNxi2i0zgJDSw8YFz7kZ61FmHn5CrjJ3M7B9M?= =?us-ascii?Q?gl3u0GCRwhhzGFtMftp8O69P85Q6fEEU6Q8biUyhS1rdst7O+0rKIdb7NzP0?= =?us-ascii?Q?94m3OeX6k1S+YLOJ+9eqMpuD5BQ55wbof51X1yUy003IAacoyRIuNW/7w9qJ?= =?us-ascii?Q?a6BpJSh99y6Od+HjzYUk8qyo+ZjPyEWkkdDXW9rUp9SAMNQUyMgPn7SX4qJ1?= =?us-ascii?Q?OjC/vHbCyfNHnI9r6uuztBrf9K8oUiJTdQOYtFd4sSmUufSo4gE+4NvpGof2?= =?us-ascii?Q?Ljeq9tVssIfaSoZMj8KpifxUbHC/Y/p6UXvhSJincTscZvpJ2B9Yj3zELRYz?= =?us-ascii?Q?SeUzufBKG6l+7MKzg70kuqOpfMbz+hnYM/5ENHS4lI0/ncWccSsU8w+HUmDQ?= =?us-ascii?Q?apgNAmiYiOfWRaU5nF0rGO2B+LS5VBwpIx9Z5gj2IXuRYoQpFCa6Z7HrS2kC?= =?us-ascii?Q?4aNUkw72AiCt81LuH0k6x/5fvQHmHjfpckbKR843G79E3MYioX+D+xoiUjkX?= =?us-ascii?Q?3pu0kpTp9/axNeJ1MHY=3D?= MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR12MB7031.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 65ea84f3-c743-4a79-1f02-08dc4e30eff9 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Mar 2024 07:38:47.1227 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: /bRceoilwISdl0t9BbVCQAS8nivgCoRIYZ8Ltivci4b397+2fygKb1I26cY8DVCLHjMQO9camP+V0SOrn+/LmQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB8318 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, 27 Mar 2024 00:38:50 -0700 Reply-To: devel@edk2.groups.io,nicklew@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: Qx4OGf9JMmcJR7cPmmCARD39x7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" 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=azTLcULT; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Reviewed-by: Nickle Wang Regards, Nickle > -----Original Message----- > From: abner.chang@amd.com > Sent: Tuesday, March 26, 2024 11:15 PM > To: devel@edk2.groups.io > Cc: Nickle Wang ; Igor Kulchytskyy > Subject: [PATCH V2 3/6] RedfishPkg/RedfishPlatformConfigDxe:Add > RefishDebugLib support >=20 > External email: Use caution opening links or attachments >=20 >=20 > From: Abner Chang >=20 > Add RedfishPlatformConfigDxe debug capability that aligns with edk2 Redfi= sh > debug mechanism. >=20 > - PcdRedfishPlatformConfigDebugProperty, add PCD to control > RedfishPlatformConfigDxe subordinate of Redfish debug > capabilities. > - PcdRedfishPlatformConfigFeatureProperty, add PCD to > manage RedfishPlatformConfigDxe features. >=20 > Signed-off-by: Abner Chang > Co-authored-by: Nickle Wang > Cc: Igor Kulchytskyy > --- > RedfishPkg/RedfishPkg.dec | 15 +++ > .../RedfishPlatformConfigDxe.inf | 8 ++ > .../RedfishPlatformConfigDxe.h | 46 +++++++- > .../RedfishPlatformConfigImpl.h | 28 +++++ > .../RedfishPlatformConfigCapability.c | 58 ++++++++++ > .../RedfishPlatformConfigDxe.c | 59 +++++++--- > .../RedfishPlatformConfigImpl.c | 107 +++++++++++------- > 7 files changed, 262 insertions(+), 59 deletions(-) create mode 100644 > RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigCapability.c >=20 > diff --git a/RedfishPkg/RedfishPkg.dec b/RedfishPkg/RedfishPkg.dec index > a9665ff68ef..c048e43f53b 100644 > --- a/RedfishPkg/RedfishPkg.dec > +++ b/RedfishPkg/RedfishPkg.dec > @@ -193,3 +193,18 @@ > # 0x0000000000000001 RedfishPlatformConfigDxe driver debug enabled. > # >=20 > gEfiRedfishPkgTokenSpaceGuid.PcdRedfishDebugCategory|0|UINT64|0x0000101 > 2 > + # > + # Redfish RedfishPlatformConfigDxe Debug Properties > + # 0x00000001 x-uefi-redfish string database message enabled > + # 0x00000002 Debug Message for dumping formset > + # 0x00000004 Debug Message for x-uefi-redfish searching result > + # 0x00000008 Debug Message for x-uefi-redfish Regular Expression se= arching > result > + # > + > + gEfiRedfishPkgTokenSpaceGuid.PcdRedfishPlatformConfigDebugProperty|0|U > + INT32|0x00001013 > + # > + # RedfishPlatformConfigDxe feature enablement > + # 0x00000001 Enable building Redfish Attribute Registry menu path. > + # 0x00000002 Allow supressed HII option to be exposed on Redfish. > + # > + # Redfish RedfishPlatformConfigDxe feature Properties > + > + gEfiRedfishPkgTokenSpaceGuid.PcdRedfishPlatformConfigFeatureProperty|0 > + |UINT32|0x00001014 > diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe= .inf > b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.inf > index 5a249c8c3bc..2db47c2cffc 100644 > --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.inf > +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.inf > @@ -3,6 +3,7 @@ > # > # (C) Copyright 2021 Hewlett Packard Enterprise Development LP
# > Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. > +# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights > +reserved.
> # > # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -23,6 +24,7 @@ > RedfishPkg/RedfishPkg.dec >=20 > [Sources] > + RedfishPlatformConfigCapability.c > RedfishPlatformConfigDxe.h > RedfishPlatformConfigDxe.c > RedfishPlatformConfigImpl.h > @@ -36,7 +38,9 @@ > HiiLib > HiiUtilityLib > MemoryAllocationLib > + PcdLib > PrintLib > + RedfishDebugLib > UefiLib > UefiBootServicesTableLib > UefiRuntimeServicesTableLib > @@ -51,5 +55,9 @@ > [Guids] > gEfiRegexSyntaxTypePerlGuid ## CONSUMED >=20 > +[FixedPcd] > + gEfiRedfishPkgTokenSpaceGuid.PcdRedfishPlatformConfigFeatureProperty > + gEfiRedfishPkgTokenSpaceGuid.PcdRedfishPlatformConfigDebugProperty > + > [Depex] > TRUE > diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe= .h > b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.h > index 38adea04c5b..688f2067bff 100644 > --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.h > +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.h > @@ -3,6 +3,7 @@ >=20 > (C) Copyright 2021 Hewlett Packard Enterprise Development LP
> Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights > reserved. > + Copyright (C) 2024 Advanced Micro Devices, Inc. All rights > + reserved.
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @@ -20,7 +21,9 @@ > #include > #include > #include > +#include > #include > +#include > #include > #include > #include @@ -37,6 +40,41 @@ // #inclu= de > >=20 > +// > +// Debug message in DEBUG_REDFISH_COMPONENT_PLATFORM_CONFIG_DXE > scope. > +// To enable the debug message for this module, below PCDs must be set. > +// > +// 1. DEBUG_MANAGEABILITY must be set PcdDebugPrintErrorLevel. > +// > +// 2 RedfishPlatformConfigDxe debug enablement must be set in > +// PcdRedfishDebugCategory (defined in RedfishPkg.dec) > +// > +// 3. The suborinate debug enablement for RedfishPlatformConfigDxe > +// must be set in PcdRedfishPlatformConfigDebugPropert (defined > +// in RedfishPkg.dec). > +// > +#define DEBUG_REDFISH_THIS_MODULE(DebugSubordinate, ...) \ > + while (RedfishPlatformConfigDebugProp (DebugSubordinate)) { \ > + DEBUG_REDFISH(DEBUG_REDFISH_COMPONENT_PLATFORM_CONFIG_DXE, > ##__VA_ARGS__); \ > + break; \ > + } > + > +#define DEBUG_REDFISH_THIS_MODULE_CODE_BEGIN(DebugSubordinate) \ > + if (RedfishPlatformConfigDebugProp (DebugSubordinate)) { > + > +#define DEBUG_REDFISH_THIS_MODULE_CODE_END() } > + > +#define DEBUG_REDFISH_THIS_MODULE_CODE(DebugSubordinate, Expression) > \ > + DEBUG_REDFISH_THIS_MODULE_CODE_BEGIN(DebugSubordinate) \ > + Expression \ > + DEBUG_REDFISH_THIS_MODULE_CODE_END() > + > +// Subordinate debug property for DEBUG_REDFISH_PLATFORM_CONFIG_DXE > +#define REDFISH_PLATFORM_CONFIG_DEBUG_STRING_DATABASE > 0x00000001 > +#define REDFISH_PLATFORM_CONFIG_DEBUG_DUMP_FORMSET > 0x00000002 > +#define REDFISH_PLATFORM_CONFIG_DEBUG_CONFIG_LANG_SEARCH > 0x00000004 > +#define REDFISH_PLATFORM_CONFIG_DEBUG_CONFIG_LANG_REGEX > 0x00000008 > + > /// > /// Definition of EDKII_REDFISH_PLATFORM_CONFIG_NOTIFY. > /// > @@ -75,8 +113,12 @@ typedef struct { > #define REGULAR_EXPRESSION_INCLUDE_ALL L".*" > #define CONFIGURE_LANGUAGE_PREFIX "x-uefi-redfish-" > #define REDFISH_PLATFORM_CONFIG_VERSION 0x00010000 > -#define REDFISH_PLATFORM_CONFIG_DEBUG DEBUG_MANAGEABILITY > -#define REDFISH_MENU_PATH_SIZE 8 > + > +#define REDFISH_MENU_PATH_SIZE 8 > + > +// Definitions of Redfish platform config capbility > +#define REDFISH_PLATFORM_CONFIG_BUILD_MENU_PATH 0x000000001 > +#define REDFISH_PLATFORM_CONFIG_ALLOW_SUPPRESSED 0x000000002 >=20 > /** > Convert input unicode string to ascii string. It's caller's diff --git > a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.h > b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.h > index 6e6c7fdb8a9..09d9789f574 100644 > --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.h > +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.h > @@ -418,4 +418,32 @@ HiiStrSize ( > IN CONST CHAR16 *String > ); >=20 > +/** > + Check if the debug property is enabled or not. > + > + @param[in] DebugType Debug enablement type > + > + @retval TRUE, the debug property is enabled. > + FALSE, the debug property is not enabled. > + > +**/ > +BOOLEAN > +RedfishPlatformConfigDebugProp ( > + IN UINT64 DebugProp > + ); > + > +/** > + Check if the Platform Configure feature is enabled or not. > + > + @param[in] FeatureType Redfish platform config feature enablement > + > + @retval TRUE, the feature is enabled. > + FALSE, the feature is not enabled. > + > +**/ > +BOOLEAN > +RedfishPlatformConfigFeatureProp ( > + IN UINT64 FeatureProp > + ); > + > #endif > diff --git > a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigCapability.c > b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigCapability.c > new file mode 100644 > index 00000000000..753c4d393f3 > --- /dev/null > +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigCapabilit > +++ y.c > @@ -0,0 +1,58 @@ > +/** @file > + The implementation of EDKII Redfish Platform Config Capability. > + Copyright (C) 2024 Advanced Micro Devices, Inc. All rights > +reserved.
> + > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#include "RedfishPlatformConfigDxe.h" > +#include "RedfishPlatformConfigImpl.h" > + > +/** > + Check if the debug property is enabled or not. > + > + @param[in] DebugType Debug enablement type > + > + @retval TRUE, the debug property is enabled. > + FALSE, the debug property is not enabled. > + > +**/ > +BOOLEAN > +RedfishPlatformConfigDebugProp ( > + IN UINT64 DebugType > + ) > +{ > + UINT64 DebugProp; > + > + DebugProp =3D FixedPcdGet64 (PcdRedfishPlatformConfigDebugProperty); > + if ((DebugProp & DebugType) !=3D 0) { > + return TRUE; > + } > + > + return FALSE; > +} > + > +/** > + Check if the Platform Configure feature is enabled or not. > + > + @param[in] FeatureType Redfish platform config feature enablement > + > + @retval TRUE, the feature is enabled. > + FALSE, the feature is not enabled. > + > +**/ > +BOOLEAN > +RedfishPlatformConfigFeatureProp ( > + IN UINT64 FeatureType > + ) > +{ > + UINT64 FeatureProp; > + > + FeatureProp =3D FixedPcdGet64 > + (PcdRedfishPlatformConfigFeatureProperty); > + if ((FeatureProp & FeatureType) !=3D 0) { > + return TRUE; > + } > + > + return FALSE; > +} > diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe= .c > b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c > index 664b48eb50e..8a02c839035 100644 > --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c > +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c > @@ -315,7 +315,7 @@ DumpHiiStatementPrompt ( >=20 > **/ > CHAR8 * > -BuildMenPath ( > +BuildMenuPath ( > IN REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE *StatementPrivate > ) > { > @@ -345,7 +345,7 @@ BuildMenPath ( > } >=20 > do { > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "F(%d) <-", FormPrivate->Id))= ; > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "F(%d) <-", > + FormPrivate->Id)); > FormPrivate =3D FindFormLinkToThis (FormPrivate); > if (FormPrivate =3D=3D NULL) { > break; > @@ -387,7 +387,7 @@ BuildMenPath ( > AsciiStrCatS (Buffer, OldBufferSize, "/"); > AsciiStrCatS (Buffer, OldBufferSize, FormTitle); > FreePool (FormTitle); > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, " %a\n", Buffer)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, " %a\n", Buffer)); > } >=20 > FormPrivate =3D (REDFISH_PLATFORM_CONFIG_FORM_PRIVATE > *)PopRedfishStack (FormStack); @@ -1061,12 +1061,12 @@ > DumpOrderedListValue ( > return; > } >=20 > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "Value.Type=3D 0x%x\n", > OrderedListStatement->Value.Type)); > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "Value.BufferValueType=3D > 0x%x\n", OrderedListStatement->Value.BufferValueType)); > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "Value.BufferLen=3D 0x%x\n", > OrderedListStatement->Value.BufferLen)); > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "Value.Buffer=3D 0x%x\n", > OrderedListStatement->Value.Buffer)); > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "Value.MaxContainers=3D > 0x%x\n", OrderedListStatement->ExtraData.OrderListData.MaxContainers)); > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "StorageWidth=3D 0x%x\n", > OrderedListStatement->StorageWidth)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "Value.Type=3D 0x%x\n", > + OrderedListStatement->Value.Type)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "Value.BufferValueType=3D > + 0x%x\n", OrderedListStatement->Value.BufferValueType)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "Value.BufferLen=3D 0x%x\n", > + OrderedListStatement->Value.BufferLen)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "Value.Buffer=3D 0x%x\n", > + OrderedListStatement->Value.Buffer)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "Value.MaxContainers=3D > 0x%x\n", > + OrderedListStatement->ExtraData.OrderListData.MaxContainers)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "StorageWidth=3D 0x%x\n", > + OrderedListStatement->StorageWidth)); >=20 > if (OrderedListStatement->Value.Buffer =3D=3D NULL) { > return; > @@ -1083,7 +1083,7 @@ DumpOrderedListValue ( > Value8 =3D (UINT8 *)OrderedListStatement->Value.Buffer; > Count =3D OrderedListStatement->StorageWidth / sizeof (UINT8); > for (Index =3D 0; Index < Count; Index++) { > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%d ", Value8[Index])); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%d ", Value8[Index])); > } >=20 > break; > @@ -1091,7 +1091,7 @@ DumpOrderedListValue ( > Value16 =3D (UINT16 *)OrderedListStatement->Value.Buffer; > Count =3D OrderedListStatement->StorageWidth / sizeof (UINT16); > for (Index =3D 0; Index < Count; Index++) { > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%d ", Value16[Index])); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%d ", Value16[Index])); > } >=20 > break; > @@ -1099,7 +1099,7 @@ DumpOrderedListValue ( > Value32 =3D (UINT32 *)OrderedListStatement->Value.Buffer; > Count =3D OrderedListStatement->StorageWidth / sizeof (UINT32); > for (Index =3D 0; Index < Count; Index++) { > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%d ", Value32[Index])); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%d ", Value32[Index])); > } >=20 > break; > @@ -1107,7 +1107,7 @@ DumpOrderedListValue ( > Value64 =3D (UINT64 *)OrderedListStatement->Value.Buffer; > Count =3D OrderedListStatement->StorageWidth / sizeof (UINT64); > for (Index =3D 0; Index < Count; Index++) { > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%d ", Value64[Index])); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%d ", Value64[Index])); > } >=20 > break; > @@ -1115,13 +1115,13 @@ DumpOrderedListValue ( > Value8 =3D (UINT8 *)OrderedListStatement->Value.Buffer; > Count =3D OrderedListStatement->StorageWidth / sizeof (UINT8); > for (Index =3D 0; Index < Count; Index++) { > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%d ", Value8[Index])); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%d ", Value8[Index])); > } >=20 > break; > } >=20 > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "\n")); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "\n")); > } >=20 > /** > @@ -2013,6 +2013,8 @@ RedfishPlatformConfigProtocolGetConfigureLang ( > UINTN Index; > CHAR8 *FullSchema; >=20 > + DEBUG ((DEBUG_INFO, "%a: Harvest config language of %a_%a (Regex: > + %s).\n", __func__, Schema, Version, RegexPattern)); > + > if ((This =3D=3D NULL) || IS_EMPTY_STRING (Schema) || IS_EMPTY_STRING > (Version) || (Count =3D=3D NULL) || (ConfigureLangList =3D=3D NULL) || > IS_EMPTY_STRING (RegexPattern)) { > return EFI_INVALID_PARAMETER; > } > @@ -2072,6 +2074,22 @@ RedfishPlatformConfigProtocolGetConfigureLang ( > *Count =3D StatementList.Count; > *ConfigureLangList =3D TmpConfigureLangList; >=20 > + DEBUG_REDFISH_THIS_MODULE ( > + REDFISH_PLATFORM_CONFIG_DEBUG_CONFIG_LANG_REGEX, > + "%a: Number of configure language strings harvested: %d\n", > + __func__, > + StatementList.Count > + ); > + > + DEBUG_REDFISH_THIS_MODULE_CODE ( > + REDFISH_PLATFORM_CONFIG_DEBUG_CONFIG_LANG_REGEX, > + DEBUG_REDFISH (DEBUG_REDFISH_COMPONENT_PLATFORM_CONFIG_DXE, > "%a: Number of configure language strings harvested: %d\n", __func__, > StatementList.Count); > + for (Index =3D 0; Index < *Count; Index++) { > + DEBUG_REDFISH (DEBUG_REDFISH_COMPONENT_PLATFORM_CONFIG_DXE, > " (%d) %s\n", Index, TmpConfigureLangList[Index]); > + } > + > + ); > + > RELEASE_RESOURCE: >=20 > if (FullSchema !=3D NULL) { > @@ -2082,6 +2100,7 @@ RELEASE_RESOURCE: > ReleaseStatementList (&StatementList); > } >=20 > + DEBUG ((DEBUG_INFO, "%a: exit.\n", __func__)); > return Status; > } >=20 > @@ -2296,6 +2315,7 @@ RedfishPlatformConfigProtocolGetAttribute ( > CHAR8 *FullSchema; > CHAR8 *Buffer; >=20 > + DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__)); > if ((This =3D=3D NULL) || IS_EMPTY_STRING (Schema) || IS_EMPTY_STRING > (Version) || IS_EMPTY_STRING (ConfigureLang) || (AttributeValue =3D=3D NU= LL)) { > return EFI_INVALID_PARAMETER; > } > @@ -2337,9 +2357,11 @@ RedfishPlatformConfigProtocolGetAttribute ( > // > // Build up menu path > // > - AttributeValue->MenuPath =3D BuildMenPath (TargetStatement); > - if (AttributeValue->MenuPath =3D=3D NULL) { > - DEBUG ((DEBUG_ERROR, "%a: failed to build menu path for \"%a\"\n", > __func__, AttributeValue->AttributeName)); > + if (RedfishPlatformConfigFeatureProp > (REDFISH_PLATFORM_CONFIG_BUILD_MENU_PATH)) { > + AttributeValue->MenuPath =3D BuildMenuPath (TargetStatement); > + if (AttributeValue->MenuPath =3D=3D NULL) { > + DEBUG ((DEBUG_ERROR, "%a: failed to build menu path for \"%a\"\n", > __func__, AttributeValue->AttributeName)); > + } > } >=20 > // > @@ -2370,6 +2392,7 @@ RELEASE_RESOURCE: > FreePool (FullSchema); > } >=20 > + DEBUG ((DEBUG_INFO, "%a: Exit\n", __func__)); > return Status; > } >=20 > diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImp= l.c > b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c > index 8b1ddf4360a..537ce09a2d3 100644 > --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c > +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c > @@ -32,7 +32,7 @@ DumpHiiString ( > EFI_STRING String; >=20 > if ((HiiHandle =3D=3D NULL) || (StringId =3D=3D 0)) { > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "???")); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "???")); > return EFI_INVALID_PARAMETER; > } >=20 > @@ -41,7 +41,7 @@ DumpHiiString ( > return EFI_NOT_FOUND; > } >=20 > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%s", String)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%s", String)); > FreePool (String); >=20 > return EFI_SUCCESS; > @@ -79,18 +79,18 @@ DumpFormset ( > HiiFormPrivate =3D REDFISH_PLATFORM_CONFIG_FORM_FROM_LINK > (HiiFormLink); > HiiNextFormLink =3D GetNextNode (&FormsetPrivate->HiiFormList, HiiFo= rmLink); >=20 > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, " [%d] form: %d title: ", > ++Index, HiiFormPrivate->Id)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, " [%d] form: %d title: ", > + ++Index, HiiFormPrivate->Id)); > DumpHiiString (FormsetPrivate->HiiHandle, HiiFormPrivate->Title); > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "\n")); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "\n")); >=20 > HiiStatementLink =3D GetFirstNode (&HiiFormPrivate->StatementList); > while (!IsNull (&HiiFormPrivate->StatementList, HiiStatementLink)) { > HiiStatementPrivate =3D > REDFISH_PLATFORM_CONFIG_STATEMENT_FROM_LINK (HiiStatementLink); > HiiNextStatementLink =3D GetNextNode (&HiiFormPrivate->StatementLi= st, > HiiStatementLink); >=20 > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, " QID: 0x%x Prompt: ", > HiiStatementPrivate->QuestionId)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, " QID: 0x%x Prompt: ", > HiiStatementPrivate->QuestionId)); > DumpHiiString (FormsetPrivate->HiiHandle, HiiStatementPrivate- > >Description); > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "\n")); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "\n")); >=20 > HiiStatementLink =3D HiiNextStatementLink; > } > @@ -125,7 +125,7 @@ DumpFormsetList ( > } >=20 > if (IsListEmpty (FormsetList)) { > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%a: Empty formset list\n", > __func__)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%a: Empty formset list\n", > + __func__)); > return EFI_SUCCESS; > } >=20 > @@ -135,7 +135,7 @@ DumpFormsetList ( > HiiFormsetNextLink =3D GetNextNode (FormsetList, HiiFormsetLink); > HiiFormsetPrivate =3D REDFISH_PLATFORM_CONFIG_FORMSET_FROM_LINK > (HiiFormsetLink); >=20 > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "[%d] HII Handle: 0x%x > formset: %g at %s\n", ++Index, HiiFormsetPrivate->HiiHandle, > &HiiFormsetPrivate->Guid, HiiFormsetPrivate->DevicePathStr)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "[%d] HII Handle: 0x%x > + formset: %g at %s\n", ++Index, HiiFormsetPrivate->HiiHandle, > + &HiiFormsetPrivate->Guid, HiiFormsetPrivate->DevicePathStr)); > DumpFormset (HiiFormsetPrivate); >=20 > HiiFormsetLink =3D HiiFormsetNextLink; @@ -622,7 +622,9 @@ > GetStatementPrivateByConfigureLangRegex ( > HiiNextStatementLink =3D GetNextNode (&HiiFormPrivate->Statement= List, > HiiStatementLink); > HiiStatementPrivate =3D > REDFISH_PLATFORM_CONFIG_STATEMENT_FROM_LINK (HiiStatementLink); >=20 > - if ((HiiStatementPrivate->Description !=3D 0) && !HiiStatementPr= ivate- > >Suppressed) { > + if ((HiiStatementPrivate->Description !=3D 0) && > + (RedfishPlatformConfigFeatureProp > (REDFISH_PLATFORM_CONFIG_ALLOW_SUPPRESSED) || !HiiStatementPrivate- > >Suppressed)) > + { > TmpString =3D HiiStatementPrivate->DescriptionStr; > if (TmpString !=3D NULL) { > Status =3D RegularExpressionProtocol->MatchString ( @@ -698,= 6 +700,7 > @@ GetStatementPrivateByConfigureLang ( > LIST_ENTRY *HiiNextStatementLink; > REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE *HiiStatementPrivate; > EFI_STRING TmpString; > + UINTN Index; >=20 > if ((FormsetList =3D=3D NULL) || IS_EMPTY_STRING (Schema) || IS_EMPTY_= STRING > (ConfigureLang)) { > return NULL; > @@ -707,6 +710,7 @@ GetStatementPrivateByConfigureLang ( > return NULL; > } >=20 > + Index =3D 0; > HiiFormsetLink =3D GetFirstNode (FormsetList); > while (!IsNull (FormsetList, HiiFormsetLink)) { > HiiFormsetNextLink =3D GetNextNode (FormsetList, HiiFormsetLink); @@= - > 731,15 +735,22 @@ GetStatementPrivateByConfigureLang ( > HiiNextStatementLink =3D GetNextNode (&HiiFormPrivate->Statement= List, > HiiStatementLink); > HiiStatementPrivate =3D > REDFISH_PLATFORM_CONFIG_STATEMENT_FROM_LINK (HiiStatementLink); >=20 > - DEBUG_CODE ( > - STATIC UINTN Index =3D 0; > - Index++; > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%a: [%d] search %s in > QID: 0x%x form: 0x%x formset: %g\n", __func__, Index, ConfigureLang, > HiiStatementPrivate->QuestionId, HiiFormPrivate->Id, &HiiFormsetPrivate- > >Guid)); > - ); > - > - if (HiiStatementPrivate->Description !=3D 0) { > + if ((HiiStatementPrivate->Description !=3D 0) && > + (RedfishPlatformConfigFeatureProp > (REDFISH_PLATFORM_CONFIG_ALLOW_SUPPRESSED) || !HiiStatementPrivate- > >Suppressed)) > + { > TmpString =3D HiiStatementPrivate->DescriptionStr; > if (TmpString !=3D NULL) { > + Index++; > + DEBUG_REDFISH_THIS_MODULE ( > + REDFISH_PLATFORM_CONFIG_DEBUG_CONFIG_LANG_SEARCH, > + "%a: [%d] check %s in QID: 0x%x form: 0x%x formset: %g\n", > + __func__, > + Index, > + ConfigureLang, > + HiiStatementPrivate->QuestionId, > + HiiFormPrivate->Id, > + &HiiFormsetPrivate->Guid > + ); > if (HiiStrCmp (TmpString, ConfigureLang) =3D=3D 0) { > return HiiStatementPrivate; > } > @@ -1022,7 +1033,7 @@ NewRedfishXuefiStringArray ( >=20 > **/ > REDFISH_X_UEFI_STRING_DATABASE * > -GetExitOrCreateXuefiStringDatabase ( > +GetExistOrCreateXuefiStringDatabase ( > IN REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE *FormsetPrivate, > IN EFI_HII_STRING_PACKAGE_HDR *HiiStringPackageHeader > ) > @@ -1031,8 +1042,6 @@ GetExitOrCreateXuefiStringDatabase ( > BOOLEAN CreateNewOne; > REDFISH_X_UEFI_STRING_DATABASE *XuefiRedfishStringDatabase; >=20 > - DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__)); > - > CreateNewOne =3D TRUE; > XuefiRedfishStringDatabase =3D NULL; > if (!IsListEmpty (&FormsetPrivate->XuefiRedfishStringDatabase)) { @@ -= 1054,7 > +1063,7 @@ GetExitOrCreateXuefiStringDatabase ( > } >=20 > if (CreateNewOne) { > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, " Creating x-uefi-redfish > (%a) string database...\n", HiiStringPackageHeader->Language)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, " Creating x-uefi-redfish > + (%a) string database...\n", HiiStringPackageHeader->Language)); > XuefiRedfishStringDatabase =3D (REDFISH_X_UEFI_STRING_DATABASE > *)AllocateZeroPool (sizeof (REDFISH_X_UEFI_STRING_DATABASE)); > if (XuefiRedfishStringDatabase =3D=3D NULL) { > DEBUG ((DEBUG_ERROR, " Failed to allocate > REDFISH_X_UEFI_STRING_DATABASE.\n")); > @@ -1073,7 +1082,7 @@ GetExitOrCreateXuefiStringDatabase ( > } >=20 > DEBUG (( > - REDFISH_PLATFORM_CONFIG_DEBUG, > + DEBUG_REDFISH_PLATFORM_CONFIG, > " x-uefi-redfish (%a):\n String array is added to XuefiRedfish= StringDatabase, > total %d arrays now.\n", > XuefiRedfishStringDatabase->XuefiRedfishLanguage, > XuefiRedfishStringDatabase->StringsArrayBlocks > @@ -1145,7 +1154,7 @@ RedfishXuefiStringInsertDatabase ( > REDFISH_X_UEFI_STRING_DATABASE *XuefiRedfishStringDatabase; > REDFISH_X_UEFI_STRINGS_ARRAY *ThisArray; >=20 > - XuefiRedfishStringDatabase =3D GetExitOrCreateXuefiStringDatabase > (FormsetPrivate, HiiStringPackageHeader); > + XuefiRedfishStringDatabase =3D GetExistOrCreateXuefiStringDatabase > + (FormsetPrivate, HiiStringPackageHeader); > if (XuefiRedfishStringDatabase =3D=3D NULL) { > DEBUG ((DEBUG_ERROR, "%a: Failed to get > REDFISH_X_UEFI_STRING_DATABASE of x-uefi-redfish language %a.\n", > __func__, HiiStringPackageHeader->Language)); > ReleaseXuefiStringDatabase (FormsetPrivate); @@ -1170,21 +1179,22 @@ > RedfishXuefiStringInsertDatabase ( > (ThisArray->ArrayEntryAddress + StringIdOffset)->StringId =3D StringI= d; > (ThisArray->ArrayEntryAddress + StringIdOffset)->UcsString =3D StringT= extPtr; >=20 > - DEBUG (( > - REDFISH_PLATFORM_CONFIG_DEBUG, > + DEBUG_REDFISH_THIS_MODULE ( > + REDFISH_PLATFORM_CONFIG_DEBUG_STRING_DATABASE, > " Insert string ID: (%d) to database\n x-uefi-string: \"%s\"\n = Language: > %a.\n", > StringId, > StringTextPtr, > HiiStringPackageHeader->Language > - )); > + ); > return EFI_SUCCESS; > } >=20 > /** > Get x-uefi-redfish string and language by string ID. >=20 > - @param[in] FormsetPrivate Pointer to HII form-set privat= e instance. > - @param[in] HiiStringPackageHeader HII string package header. > + @param[in] FormsetPrivate Pointer to HII form-set priva= te instance. > + @param[in] HiiStringPackageHeader HII string package header. > + @param[out] TotalStringAdded Return the total strings adde= d to > database. >=20 > @retval TRUE x-uefi-redfish string and ID map is inserted to databa= se. > FALSE Something is wrong when insert x-uefi-redfish string a= nd ID map. > @@ -1192,8 +1202,9 @@ RedfishXuefiStringInsertDatabase ( **/ BOOLEAN > CreateXuefiLanguageStringIdMap ( > - IN REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE *FormsetPrivate, > - IN EFI_HII_STRING_PACKAGE_HDR *HiiStringPackageHeader > + IN REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE *FormsetPrivate, > + IN EFI_HII_STRING_PACKAGE_HDR *HiiStringPackageHeader= , > + OUT UINTN *TotalStringAdded > ) > { > EFI_STATUS Status; > @@ -1209,6 +1220,9 @@ CreateXuefiLanguageStringIdMap ( > EFI_HII_SIBT_EXT2_BLOCK Ext2; > UINT32 Length32; > UINT8 *StringBlockInfo; > + UINTN StringsAdded; > + > + StringsAdded =3D 0; >=20 > // > // Parse the string blocks to get the string text and font. > @@ -1280,6 +1294,8 @@ CreateXuefiLanguageStringIdMap ( > DEBUG ((DEBUG_ERROR, "%a: Failed to insert x-uefi-redfish st= ring %s.\n", > __func__, StringTextPtr)); > return FALSE; > } > + > + StringsAdded++; > } >=20 > BlockSize +=3D (Offset + HiiStrSize ((CHAR16 *)StringTextPtr)); = @@ -1371,6 > +1387,7 @@ CreateXuefiLanguageStringIdMap ( > BlockHdr =3D (UINT8 *)(StringBlockInfo + BlockSize); > } >=20 > + *TotalStringAdded =3D StringsAdded; > return TRUE; > } >=20 > @@ -1484,6 +1501,8 @@ BuildXUefiRedfishStringDatabase ( > UINTN SupportedSchemaLangCount; > CHAR8 **SupportedSchemaLang; > BOOLEAN StringIdMapIsBuilt; > + UINTN TotalStringsAdded; > + UINTN NumberPackageStrings; >=20 > DEBUG ((DEBUG_INFO, "%a: Building x-uefi-redfish string database, HII = Formset > GUID - %g.\n", __func__, FormsetPrivate->Guid)); >=20 > @@ -1515,6 +1534,7 @@ BuildXUefiRedfishStringDatabase ( > return; > } >=20 > + TotalStringsAdded =3D 0; > // > // Finding the string package. > // > @@ -1539,14 +1559,18 @@ BuildXUefiRedfishStringDatabase ( > AsciiStrLen (HiiStringPackageHeader->Language) > ) =3D=3D 0) > { > - StringIdMapIsBuilt =3D CreateXuefiLanguageStringIdMap (Forms= etPrivate, > HiiStringPackageHeader); > + StringIdMapIsBuilt =3D CreateXuefiLanguageStringIdMap (Forms= etPrivate, > HiiStringPackageHeader, &NumberPackageStrings); > + if (StringIdMapIsBuilt) { > + TotalStringsAdded +=3D NumberPackageStrings; > + } > + > break; > } > } >=20 > if (StringIdMapIsBuilt =3D=3D FALSE) { > if (AsciiStrStr (HiiStringPackageHeader->Language, > X_UEFI_SCHEMA_PREFIX) =3D=3D NULL) { > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, " No need to build x= - > uefi-redfish string ID map for HII language %a\n", HiiStringPackageHeader= - > >Language)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, " No need to build > + x-uefi-redfish string ID map for HII language %a\n", > + HiiStringPackageHeader->Language)); > } else { > DEBUG ((DEBUG_ERROR, " Failed to build x-uefi-redfish strin= g ID map of > HII language %a\n", HiiStringPackageHeader->Language)); > } > @@ -1556,6 +1580,8 @@ BuildXUefiRedfishStringDatabase ( > PackageHeader =3D (EFI_HII_PACKAGE_HEADER *)((UINTN)PackageHeade= r + > PackageHeader->Length); > } > } > + > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, " Total %d x-uefi-redfish > + config language are added.\n", TotalStringsAdded)); > } >=20 > /** > @@ -1621,7 +1647,7 @@ LoadFormset ( > FormsetPrivate->DevicePathStr =3D ConvertDevicePathToText (HiiFormSet- > >DevicePath, FALSE, FALSE); > Status =3D GetSupportedSchema (FormsetPrivate->= HiiHandle, > &FormsetPrivate->SupportedSchema); > if (EFI_ERROR (Status)) { > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%a: No x-uefi-redfish > configuration found on the formset - %g\n", __func__, FormsetPrivate->Gui= d)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%a: No x-uefi-redfish > + configuration found on the formset - %g\n", __func__, > + FormsetPrivate->Guid)); > return EFI_UNSUPPORTED; // Can't build AttributeRegistry Meni path w= ith > returning EFI_UNSUPPORTED. > } else { > // Building x-uefi-redfish string database @@ -1789,7 +1815,10 @@ > LoadFormsetList ( > InsertTailList (FormsetList, &FormsetPrivate->Link); >=20 > DEBUG_CODE ( > + if (RedfishPlatformConfigDebugProp > + (REDFISH_PLATFORM_CONFIG_DEBUG_DUMP_FORMSET)) { > DumpFormsetList (FormsetList); > + } > + > ); >=20 > return EFI_SUCCESS; > @@ -1909,7 +1938,7 @@ NotifyFormsetUpdate ( > if (TargetPendingList !=3D NULL) { > TargetPendingList->IsDeleted =3D FALSE; > DEBUG_CODE ( > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%a: HII handle: 0x%x is > updated\n", __func__, HiiHandle)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%a: HII handle: 0x%x is > + updated\n", __func__, HiiHandle)); > ); > return EFI_SUCCESS; > } > @@ -1925,7 +1954,7 @@ NotifyFormsetUpdate ( > InsertTailList (PendingList, &TargetPendingList->Link); >=20 > DEBUG_CODE ( > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%a: HII handle: 0x%x is > created\n", __func__, HiiHandle)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%a: HII handle: 0x%x is > + created\n", __func__, HiiHandle)); > ); >=20 > return EFI_SUCCESS; > @@ -1962,7 +1991,7 @@ NotifyFormsetDeleted ( > if (TargetPendingList !=3D NULL) { > TargetPendingList->IsDeleted =3D TRUE; > DEBUG_CODE ( > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%a: HII handle: 0x%x is > updated and deleted\n", __func__, HiiHandle)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%a: HII handle: 0x%x is > + updated and deleted\n", __func__, HiiHandle)); > ); > return EFI_SUCCESS; > } > @@ -1978,7 +2007,7 @@ NotifyFormsetDeleted ( > InsertTailList (PendingList, &TargetPendingList->Link); >=20 > DEBUG_CODE ( > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%a: HII handle: 0x%x is > deleted\n", __func__, HiiHandle)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%a: HII handle: 0x%x is > + deleted\n", __func__, HiiHandle)); > ); >=20 > return EFI_SUCCESS; > @@ -2027,12 +2056,12 @@ ProcessPendingList ( > // > FormsetPrivate =3D GetFormsetPrivateByHiiHandle (Target->HiiHandle= , > FormsetList); > if (FormsetPrivate !=3D NULL) { > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%a: formset: %g is > removed because driver release HII resource it already\n", __func__, > FormsetPrivate->Guid)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%a: formset: %g is > + removed because driver release HII resource it already\n", __func__, > + FormsetPrivate->Guid)); > RemoveEntryList (&FormsetPrivate->Link); > ReleaseFormset (FormsetPrivate); > FreePool (FormsetPrivate); > } else { > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%a: formset on HII handl= e > 0x%x was removed already\n", __func__, Target->HiiHandle)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%a: formset on HII > + handle 0x%x was removed already\n", __func__, Target->HiiHandle)); > } > } else { > // > @@ -2043,7 +2072,7 @@ ProcessPendingList ( > // > // HII formset already exist, release it and query again. > // > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%a: formset: %g is > updated. Release current formset\n", __func__, &FormsetPrivate->Guid)); > + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%a: formset: %g is > + updated. Release current formset\n", __func__, > + &FormsetPrivate->Guid)); > RemoveEntryList (&FormsetPrivate->Link); > ReleaseFormset (FormsetPrivate); > FreePool (FormsetPrivate); > -- > 2.37.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117153): https://edk2.groups.io/g/devel/message/117153 Mute This Topic: https://groups.io/mt/105159787/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-