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 CE4207803D7 for ; Thu, 4 Apr 2024 13:33:52 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Ggavd4QogxrXg7V2lsKLcg5ygPfr0iHkYNNGvWFL1hw=; 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:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1712237631; v=1; b=yaNNQoc3Csmh6olqWDAvMD1qYVja8XCbg0YbyT6iQw0SRZEL4fHaBA88mS7zYVeBU2k/v4qw CKICSx8XHXTLJ4K9HlHMVaIL1hLsR9jBU/o/4ilHpoRziCY5sRj5yf5FTaAV8XEeshXR2SA7uh2 M64O9u22xKZHp3diH9NBUxtD4v4dRGFyBoluUyFettGxo0jl2CXwuUtizDdPs2N/Y6tiyPI5NoE 81VDCq6w4gKHXOJc2ZOHIuB9X4iVO0k0buKv4pLP70FpZ38fzz+byYofIL/Lub9WmRw1KXJkZ8M bn0UGH1xfqutrK2P3WCz3usiLUjTTKAuZkMPBye9Fc9iQ== X-Received: by 127.0.0.2 with SMTP id bqs4YY7687511xvU1kw0nlfB; Thu, 04 Apr 2024 06:33:51 -0700 X-Received: from NAM04-DM6-obe.outbound.protection.outlook.com (NAM04-DM6-obe.outbound.protection.outlook.com [40.107.102.133]) by mx.groups.io with SMTP id smtpd.web10.38190.1712237630710284964 for ; Thu, 04 Apr 2024 06:33:51 -0700 X-Received: from BLAPR10MB5185.namprd10.prod.outlook.com (2603:10b6:208:328::16) by SJ0PR10MB5552.namprd10.prod.outlook.com (2603:10b6:a03:3da::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Thu, 4 Apr 2024 13:33:47 +0000 X-Received: from BLAPR10MB5185.namprd10.prod.outlook.com ([fe80::a03f:4d36:9713:33d0]) by BLAPR10MB5185.namprd10.prod.outlook.com ([fe80::a03f:4d36:9713:33d0%5]) with mapi id 15.20.7409.042; Thu, 4 Apr 2024 13:33:47 +0000 From: "Igor Kulchytskyy via groups.io" To: "abner.chang@amd.com" , "devel@edk2.groups.io" CC: Nickle Wang Subject: Re: [edk2-devel] [PATCH V3 3/6] RedfishPkg/RedfishPlatformConfigDxe:Add RefishDebugLib support Thread-Topic: [EXTERNAL] [PATCH V3 3/6] RedfishPkg/RedfishPlatformConfigDxe:Add RefishDebugLib support Thread-Index: AQHahnlysm7FU1pc4kyC8MSFa3GXGLFYHHkg Date: Thu, 4 Apr 2024 13:33:47 +0000 Message-ID: References: <20240404101758.84-1-abner.chang@amd.com> <20240404101758.84-4-abner.chang@amd.com> In-Reply-To: <20240404101758.84-4-abner.chang@amd.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BLAPR10MB5185:EE_|SJ0PR10MB5552:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: 5YuyOjFUQBwuzTy6SP7E7xZ2vbk/JBaMB4FGZ8/BKOOwRiSfyyxi0X4frDVX5UR99S+JC5miGlzPN9wwOwdFymJdBGxfUONOz1qIrJ6cqrOjEVF5Z5v2FTM5x+S/vFicia9T8KFmtdrkc2hanjiK80vePmYJhzrSVS8WCYiu+k/Bqrjyl21AdBhI3AxXcrgNl5CVvh+rxNa+XDU5bsa3MIqI+Yg6H+JS/ZDDkDzCNwTfCIjYqDL8UusCDQQMqfoT3IeFZSnz9N41p1tEXN7PtAU+lodl/29spnjvCH6cZ9T2LPHCA43cMndpMzExkw3mmNSa7JdL6+uKWYUc0NAO9ApTJjA1kx3HeawbRV8CB5pIPn4l0ZTs0T7wAlg6kzUMR3x3kxQgSz+mXrAOzEeq410uh1vh5E+OwGLD1kgpH7q5Ymm0516qtG4x5c8iTAYpphRSSUKy0tlS05ipmefxtq8d1AEj989jWU2qzKOU8EAdrh2WPd0VZC6cmMdSzkGdNmIOdzHdKi40xaIu8WcJHNZOwDnwXxCVJPiPL0fpbcYDz3JumFg2OUsB67b7rfpxbyojduEZbvkLo0OPmNeANFAkqJ3qvOYfq9iS3Hp5AZgsRsvnMhGmJIaJz5F2KhwDZVHDVU59OudGEbu7BUZoaeSaGGkTXdsZhT0l2+i57Ik= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?w46BtG2DYaqzi7Cd1iNGKgJtt2tx/Oo/xNaSoOA/Lxh6ed9rRYk2U6waEh3i?= =?us-ascii?Q?o/xJ2azBECObrazQ98LA6xKB32JY6gzZmBlwiB+xQGd+n/B4hzI6wzYzl7LQ?= =?us-ascii?Q?sDULPrUddkCOtTxRA6Fwz92XBnF+oCIMJ8pwf1Z0+QLnv+Mp0s4PyoRDzCiA?= =?us-ascii?Q?DMQoLyuHIHk45sJ4xrTtu0A1slc0bVjMXU+pQdaRXKkDviY55XxVoAZYyBDp?= =?us-ascii?Q?g87bzdufvggbrl3394/m8XVicxhYwMD0FAARVFKayqB2D18ixtko2jfmfUzN?= =?us-ascii?Q?jml73YrVjX8dkOUklrTuYLRgt7uBbgauox+6Si83zuenOsT1kYpkJUCPrvXJ?= =?us-ascii?Q?q/72TL5/jyUZmGOl8iqJvwENFEuo/8h0DOCe19GxZjKTnVRpEfZ37REUR8VT?= =?us-ascii?Q?Oq7b45eDS24aC8A4baKG1RujxD1QPBY0nVGSPToVnkOWqMFbhOuCjp3gFYb3?= =?us-ascii?Q?imav9JelRuso4DgdKcp3evBtgjepYVXAOWv5hEqF8h1sK3pSPWi+eR1oM/3k?= =?us-ascii?Q?b4g1H4sIc8IkRXebp/z/qZjOqPBeV/b+20u0hrMeps7O9yVt9DPPG/sD4grb?= =?us-ascii?Q?HBJNGWlT6lkFsQkLMlTyO6VV8kMhUbmivqNxMFxTdXjMFwVL8zn6PkdXP3VZ?= =?us-ascii?Q?r/EJfZ398jbXM372agcYi5m+et/QuLxDBwyhTw0SEgLIYBvdHxY6C96hl72i?= =?us-ascii?Q?nTyWnV4Zz2xu8Gl15ki8ggXDwnSislFabqQAG7hUJa1ROQBLJFFvfwHsHgrK?= =?us-ascii?Q?lLQqKKPlcVJ8BT+wC2t232nBjul0w/Q8nbyJCHShS1yiNRLxpp9VwoAIoiiA?= =?us-ascii?Q?4DG9o2LfqhTBt5/gYJ19tOnq5vb15jLRLkHuXvRiBO3+c8jlvyNT3ahB1eH7?= =?us-ascii?Q?OpWyeAbRDgxKzQSArUTZbkImJVIUfw4kydNnkzjyc2rUS9F+/1gOcM/z3dS5?= =?us-ascii?Q?G+4cdWWIXnO3Sn8iu17zP8q/0Cs7kegMyeOE9odyxqPylJX+Wn1tN/HHlb+P?= =?us-ascii?Q?KD84qfU9dt00SiE3s/C1UJJnVjbteMCCHvVef6mequCH94s/9YTT55xT9Lg4?= =?us-ascii?Q?4l7ewmwlpEL1dSrBwYTT8f7JDCDBX21f2laD1iuua4mmoZxhLXreq/k6vVUj?= =?us-ascii?Q?awClhk9iJZlQxrLNJQhRPROf8v71QI+s2mkeyqT4Pl/Mz/O9Ve+89F3ffg+b?= =?us-ascii?Q?/o1SfuaMRA20cgJC8i8xaJlanwAPAliMDj/eOBRIKe7ckU1PJeMIK7rnnZFg?= =?us-ascii?Q?BcOZJn2afuavRR/ZqL6hBl95c9BRXwXiwzSDIMp+S8GheyKfqZDJ6MlsACmx?= =?us-ascii?Q?pArEMLeTzejSrGbkbNRY9p6EYoGujidcSAMiNOLQ4xUp/DDpTBuhbCRwdfLI?= =?us-ascii?Q?zUDOsRk0adQv2xEFyyEGpe461wGTUfFs8fdaDarEvFtTJikOBQ8xTNPKuL77?= =?us-ascii?Q?oPCD5mTCFK5DM89tPf1O49UpNhrlghWyXG7XsTo39hGpqelHdYzQv16F+IuG?= =?us-ascii?Q?7dnihphOblvdool9NN3lTHyx/+4jSzpxwow85BCqfhPPykxQY7yTEv5161BJ?= =?us-ascii?Q?joEPS9ywud1o2X6PO70=3D?= MIME-Version: 1.0 X-OriginatorOrg: ami.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BLAPR10MB5185.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3ae3fe5e-7ecd-4f55-3ab3-08dc54abdb83 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Apr 2024 13:33:47.8637 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 27e97857-e15f-486c-b58e-86c2b3040f93 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: /6ylBjsYhxH8LiNKDtd/xhgL3iiNqqjYZQ3LYvXGLXGq1p7YFMx9i9elYOcth8IE X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB5552 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: Thu, 04 Apr 2024 06:33:51 -0700 Resent-From: igork@ami.com Reply-To: devel@edk2.groups.io,igork@ami.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: orIbb9caYVCjrQHgQEhMRtrsx7686176AA= 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=yaNNQoc3; 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: Igor Kulchytskyy Regards, Igor -----Original Message----- From: abner.chang@amd.com Sent: Thursday, April 4, 2024 6:18 AM To: devel@edk2.groups.io Cc: Nickle Wang ; Igor Kulchytskyy Subject: [EXTERNAL] [PATCH V3 3/6] RedfishPkg/RedfishPlatformConfigDxe:Add = RefishDebugLib support **CAUTION: The e-mail below is from an external source. Please exercise cau= tion before opening attachments, clicking links, or following guidance.** From: Abner Chang Add RedfishPlatformConfigDxe debug capability that aligns with edk2 Redfish debug mechanism. - PcdRedfishPlatformConfigDebugProperty, add PCD to control RedfishPlatformConfigDxe subordinate of Redfish debug capabilities. - PcdRedfishPlatformConfigFeatureProperty, add PCD to manage RedfishPlatformConfigDxe features. Signed-off-by: Abner Chang Co-authored-by: Nickle Wang Cc: Igor Kulchytskyy Reviewed-by: Nickle Wang --- 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/RedfishPlatformConf= igCapability.c 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. # gEfiRedfishPkgTokenSpaceGuid.PcdRedfishDebugCategory|0|UINT64|0x00001012 + # + # 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 sear= ching result + # + gEfiRedfishPkgTokenSpaceGuid.PcdRedfishPlatformConfigDebugProperty|0|UIN= T32|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|U= INT32|0x00001014 diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.i= nf 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 reserve= d. +# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -23,6 +24,7 @@ RedfishPkg/RedfishPkg.dec [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 +[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 @@ (C) Copyright 2021 Hewlett Packard Enterprise Development LP
Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights res= erved. + Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -20,7 +21,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -37,6 +40,41 @@ // #include +// +// 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 /** Convert input unicode string to ascii string. It's caller's diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.= h b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.h index 8b8c544d58e..24a7dae5173 100644 --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.h +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.h @@ -418,4 +418,32 @@ HiiStrSize ( IN CONST CHAR16 *String ); +/** + 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/RedfishPlatformConfigCapab= ility.c b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigCapabili= ty.c new file mode 100644 index 00000000000..753c4d393f3 --- /dev/null +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigCapability.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 0d1c96e7125..99e7827eeaf 100644 --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c @@ -315,7 +315,7 @@ DumpHiiStatementPrompt ( **/ CHAR8 * -BuildMenPath ( +BuildMenuPath ( IN REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE *StatementPrivate ) { @@ -345,7 +345,7 @@ BuildMenPath ( } 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)); } FormPrivate =3D (REDFISH_PLATFORM_CONFIG_FORM_PRIVATE *)PopRedfishStac= k (FormStack); @@ -1061,12 +1061,12 @@ DumpOrderedListValue ( return; } - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "Value.Type=3D 0x%x\n", OrderedLi= stStatement->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", Orde= redListStatement->Value.BufferLen)); - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "Value.Buffer=3D 0x%x\n", Ordered= ListStatement->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", Ordered= ListStatement->StorageWidth)); + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "Value.Type=3D 0x%x\n", OrderedLi= stStatement->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", Orde= redListStatement->Value.BufferLen)); + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "Value.Buffer=3D 0x%x\n", Ordered= ListStatement->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", Ordered= ListStatement->StorageWidth)); 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])); } 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])); } 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])); } 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])); } 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])); } break; } - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "\n")); + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "\n")); } /** @@ -2013,6 +2013,8 @@ RedfishPlatformConfigProtocolGetConfigureLang ( UINTN Index; CHAR8 *FullSchema; + 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 (V= ersion) || (Count =3D=3D NULL) || (ConfigureLangList =3D=3D NULL) || IS_EMP= TY_STRING (RegexPattern)) { return EFI_INVALID_PARAMETER; } @@ -2072,6 +2074,22 @@ RedfishPlatformConfigProtocolGetConfigureLang ( *Count =3D StatementList.Count; *ConfigureLangList =3D TmpConfigureLangList; + 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: Numbe= r of configure language strings harvested: %d\n", __func__, StatementList.C= ount); + for (Index =3D 0; Index < *Count; Index++) { + DEBUG_REDFISH (DEBUG_REDFISH_COMPONENT_PLATFORM_CONFIG_DXE, " (%d) %= s\n", Index, TmpConfigureLangList[Index]); + } + + ); + RELEASE_RESOURCE: if (FullSchema !=3D NULL) { @@ -2082,6 +2100,7 @@ RELEASE_RESOURCE: ReleaseStatementList (&StatementList); } + DEBUG ((DEBUG_INFO, "%a: exit.\n", __func__)); return Status; } @@ -2296,6 +2315,7 @@ RedfishPlatformConfigProtocolGetAttribute ( CHAR8 *FullSchema; CHAR8 *Buffer; + DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__)); if ((This =3D=3D NULL) || IS_EMPTY_STRING (Schema) || IS_EMPTY_STRING (V= ersion) || IS_EMPTY_STRING (ConfigureLang) || (AttributeValue =3D=3D NULL))= { 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", __f= unc__, 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)); + } } // @@ -2370,6 +2392,7 @@ RELEASE_RESOURCE: FreePool (FullSchema); } + DEBUG ((DEBUG_INFO, "%a: Exit\n", __func__)); return Status; } diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.= c b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c index 36e5da24f0a..03dcc8dbcd1 100644 --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c @@ -32,7 +32,7 @@ DumpHiiString ( EFI_STRING String; if ((HiiHandle =3D=3D NULL) || (StringId =3D=3D 0)) { - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "???")); + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "???")); return EFI_INVALID_PARAMETER; } @@ -41,7 +41,7 @@ DumpHiiString ( return EFI_NOT_FOUND; } - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%s", String)); + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%s", String)); FreePool (String); return EFI_SUCCESS; @@ -79,18 +79,18 @@ DumpFormset ( HiiFormPrivate =3D REDFISH_PLATFORM_CONFIG_FORM_FROM_LINK (HiiFormLin= k); HiiNextFormLink =3D GetNextNode (&FormsetPrivate->HiiFormList, HiiForm= Link); - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, " [%d] form: %d title: ", ++In= dex, HiiFormPrivate->Id)); + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, " [%d] form: %d title: ", ++In= dex, HiiFormPrivate->Id)); DumpHiiString (FormsetPrivate->HiiHandle, HiiFormPrivate->Title); - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "\n")); + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "\n")); HiiStatementLink =3D GetFirstNode (&HiiFormPrivate->StatementList); while (!IsNull (&HiiFormPrivate->StatementList, HiiStatementLink)) { HiiStatementPrivate =3D REDFISH_PLATFORM_CONFIG_STATEMENT_FROM_LINK= (HiiStatementLink); HiiNextStatementLink =3D GetNextNode (&HiiFormPrivate->StatementList= , HiiStatementLink); - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, " QID: 0x%x Prompt: ", Hii= StatementPrivate->QuestionId)); + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, " QID: 0x%x Prompt: ", Hii= StatementPrivate->QuestionId)); DumpHiiString (FormsetPrivate->HiiHandle, HiiStatementPrivate->Descr= iption); - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "\n")); + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "\n")); HiiStatementLink =3D HiiNextStatementLink; } @@ -125,7 +125,7 @@ DumpFormsetList ( } if (IsListEmpty (FormsetList)) { - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%a: Empty formset list\n", __f= unc__)); + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%a: Empty formset list\n", __f= unc__)); return EFI_SUCCESS; } @@ -135,7 +135,7 @@ DumpFormsetList ( HiiFormsetNextLink =3D GetNextNode (FormsetList, HiiFormsetLink); HiiFormsetPrivate =3D REDFISH_PLATFORM_CONFIG_FORMSET_FROM_LINK (HiiF= ormsetLink); - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "[%d] HII Handle: 0x%x formset:= %g at %s\n", ++Index, HiiFormsetPrivate->HiiHandle, &HiiFormsetPrivate->Gu= id, HiiFormsetPrivate->DevicePathStr)); + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "[%d] HII Handle: 0x%x formset:= %g at %s\n", ++Index, HiiFormsetPrivate->HiiHandle, &HiiFormsetPrivate->Gu= id, HiiFormsetPrivate->DevicePathStr)); DumpFormset (HiiFormsetPrivate); HiiFormsetLink =3D HiiFormsetNextLink; @@ -622,7 +622,9 @@ GetStatementPrivateByConfigureLangRegex ( HiiNextStatementLink =3D GetNextNode (&HiiFormPrivate->StatementLi= st, HiiStatementLink); HiiStatementPrivate =3D REDFISH_PLATFORM_CONFIG_STATEMENT_FROM_LI= NK (HiiStatementLink); - if ((HiiStatementPrivate->Description !=3D 0) && !HiiStatementPriv= ate->Suppressed) { + if ((HiiStatementPrivate->Description !=3D 0) && + (RedfishPlatformConfigFeatureProp (REDFISH_PLATFORM_CONFIG_ALL= OW_SUPPRESSED) || !HiiStatementPrivate->Suppressed)) + { TmpString =3D HiiStatementPrivate->XuefiRedfishStr; 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; if ((FormsetList =3D=3D NULL) || IS_EMPTY_STRING (Schema) || IS_EMPTY_ST= RING (ConfigureLang)) { return NULL; @@ -707,6 +710,7 @@ GetStatementPrivateByConfigureLang ( return NULL; } + 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->StatementLi= st, HiiStatementLink); HiiStatementPrivate =3D REDFISH_PLATFORM_CONFIG_STATEMENT_FROM_LI= NK (HiiStatementLink); - DEBUG_CODE ( - STATIC UINTN Index =3D 0; - Index++; - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%a: [%d] search %s in QI= D: 0x%x form: 0x%x formset: %g\n", __func__, Index, ConfigureLang, HiiState= mentPrivate->QuestionId, HiiFormPrivate->Id, &HiiFormsetPrivate->Guid)); - ); - - if (HiiStatementPrivate->Description !=3D 0) { + if ((HiiStatementPrivate->Description !=3D 0) && + (RedfishPlatformConfigFeatureProp (REDFISH_PLATFORM_CONFIG_ALL= OW_SUPPRESSED) || !HiiStatementPrivate->Suppressed)) + { TmpString =3D HiiStatementPrivate->XuefiRedfishStr; 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; } @@ -1020,7 +1031,7 @@ NewRedfishXuefiStringArray ( **/ REDFISH_X_UEFI_STRING_DATABASE * -GetExitOrCreateXuefiStringDatabase ( +GetExistOrCreateXuefiStringDatabase ( IN REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE *FormsetPrivate, IN EFI_HII_STRING_PACKAGE_HDR *HiiStringPackageHeader ) @@ -1029,8 +1040,6 @@ GetExitOrCreateXuefiStringDatabase ( BOOLEAN CreateNewOne; REDFISH_X_UEFI_STRING_DATABASE *XuefiRedfishStringDatabase; - DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__)); - CreateNewOne =3D TRUE; XuefiRedfishStringDatabase =3D NULL; if (!IsListEmpty (&FormsetPrivate->XuefiRedfishStringDatabase)) { @@ -1052,7 +1061,7 @@ GetExitOrCreateXuefiStringDatabase ( } 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 *)Alloc= ateZeroPool (sizeof (REDFISH_X_UEFI_STRING_DATABASE)); if (XuefiRedfishStringDatabase =3D=3D NULL) { DEBUG ((DEBUG_ERROR, " Failed to allocate REDFISH_X_UEFI_STRING_DAT= ABASE.\n")); @@ -1071,7 +1080,7 @@ GetExitOrCreateXuefiStringDatabase ( } DEBUG (( - REDFISH_PLATFORM_CONFIG_DEBUG, + DEBUG_REDFISH_PLATFORM_CONFIG, " x-uefi-redfish (%a):\n String array is added to XuefiRedfishSt= ringDatabase, total %d arrays now.\n", XuefiRedfishStringDatabase->XuefiRedfishLanguage, XuefiRedfishStringDatabase->StringsArrayBlocks @@ -1143,7 +1152,7 @@ RedfishXuefiStringInsertDatabase ( REDFISH_X_UEFI_STRING_DATABASE *XuefiRedfishStringDatabase; REDFISH_X_UEFI_STRINGS_ARRAY *ThisArray; - XuefiRedfishStringDatabase =3D GetExitOrCreateXuefiStringDatabase (Forms= etPrivate, HiiStringPackageHeader); + XuefiRedfishStringDatabase =3D GetExistOrCreateXuefiStringDatabase (Form= setPrivate, 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->Langu= age)); ReleaseXuefiStringDatabase (FormsetPrivate); @@ -1169,21 +1178,22 @@ RedfishXuefiStringInsertDatabase ( (ThisArray->ArrayEntryAddress + StringIdOffset)->StringId =3D StringId; (ThisArray->ArrayEntryAddress + StringIdOffset)->UcsString =3D StringTex= tPtr; - 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; } /** Get x-uefi-redfish string and language by string ID. - @param[in] FormsetPrivate Pointer to HII form-set private = instance. - @param[in] HiiStringPackageHeader HII string package header. + @param[in] FormsetPrivate Pointer to HII form-set private= instance. + @param[in] HiiStringPackageHeader HII string package header. + @param[out] TotalStringAdded Return the total strings added = to database. @retval TRUE x-uefi-redfish string and ID map is inserted to database= . FALSE Something is wrong when insert x-uefi-redfish string and= ID map. @@ -1191,8 +1201,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; @@ -1208,6 +1219,9 @@ CreateXuefiLanguageStringIdMap ( EFI_HII_SIBT_EXT2_BLOCK Ext2; UINT32 Length32; UINT8 *StringBlockInfo; + UINTN StringsAdded; + + StringsAdded =3D 0; // // Parse the string blocks to get the string text and font. @@ -1279,6 +1293,8 @@ CreateXuefiLanguageStringIdMap ( DEBUG ((DEBUG_ERROR, "%a: Failed to insert x-uefi-redfish stri= ng %s.\n", __func__, StringTextPtr)); return FALSE; } + + StringsAdded++; } BlockSize +=3D (Offset + HiiStrSize ((CHAR16 *)StringTextPtr)); @@ -1370,6 +1386,7 @@ CreateXuefiLanguageStringIdMap ( BlockHdr =3D (UINT8 *)(StringBlockInfo + BlockSize); } + *TotalStringAdded =3D StringsAdded; return TRUE; } @@ -1483,6 +1500,8 @@ BuildXUefiRedfishStringDatabase ( UINTN SupportedSchemaLangCount; CHAR8 **SupportedSchemaLang; BOOLEAN StringIdMapIsBuilt; + UINTN TotalStringsAdded; + UINTN NumberPackageStrings; DEBUG ((DEBUG_INFO, "%a: Building x-uefi-redfish string database, HII Fo= rmset GUID - %g.\n", __func__, FormsetPrivate->Guid)); @@ -1514,6 +1533,7 @@ BuildXUefiRedfishStringDatabase ( return; } + TotalStringsAdded =3D 0; // // Finding the string package. // @@ -1538,14 +1558,18 @@ BuildXUefiRedfishStringDatabase ( AsciiStrLen (HiiStringPackageHeader->Language) ) =3D=3D 0) { - StringIdMapIsBuilt =3D CreateXuefiLanguageStringIdMap (Formset= Private, HiiStringPackageHeader); + StringIdMapIsBuilt =3D CreateXuefiLanguageStringIdMap (Formset= Private, HiiStringPackageHeader, &NumberPackageStrings); + if (StringIdMapIsBuilt) { + TotalStringsAdded +=3D NumberPackageStrings; + } + break; } } 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-u= efi-redfish string ID map for HII language %a\n", HiiStringPackageHeader->L= anguage)); + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, " No need to build x-u= efi-redfish string ID map for HII language %a\n", HiiStringPackageHeader->L= anguage)); } else { DEBUG ((DEBUG_ERROR, " Failed to build x-uefi-redfish string = ID map of HII language %a\n", HiiStringPackageHeader->Language)); } @@ -1555,6 +1579,8 @@ BuildXUefiRedfishStringDatabase ( PackageHeader =3D (EFI_HII_PACKAGE_HEADER *)((UINTN)PackageHeader = + PackageHeader->Length); } } + + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, " Total %d x-uefi-redfish config= language are added.\n", TotalStringsAdded)); } /** @@ -1620,7 +1646,7 @@ LoadFormset ( FormsetPrivate->DevicePathStr =3D ConvertDevicePathToText (HiiFormSet->D= evicePath, FALSE, FALSE); Status =3D GetSupportedSchema (FormsetPrivate->Hi= iHandle, &FormsetPrivate->SupportedSchema); if (EFI_ERROR (Status)) { - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%a: No x-uefi-redfish configur= ation found on the formset - %g\n", __func__, FormsetPrivate->Guid)); + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%a: No x-uefi-redfish configur= ation found on the formset - %g\n", __func__, FormsetPrivate->Guid)); return EFI_UNSUPPORTED; // Can't build AttributeRegistry Meni path wit= h returning EFI_UNSUPPORTED. } else { // Building x-uefi-redfish string database @@ -1788,7 +1814,10 @@ LoadFormsetList ( InsertTailList (FormsetList, &FormsetPrivate->Link); DEBUG_CODE ( + if (RedfishPlatformConfigDebugProp (REDFISH_PLATFORM_CONFIG_DEBUG_DUMP= _FORMSET)) { DumpFormsetList (FormsetList); + } + ); return EFI_SUCCESS; @@ -1908,7 +1937,7 @@ NotifyFormsetUpdate ( if (TargetPendingList !=3D NULL) { TargetPendingList->IsDeleted =3D FALSE; DEBUG_CODE ( - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%a: HII handle: 0x%x is upda= ted\n", __func__, HiiHandle)); + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%a: HII handle: 0x%x is upda= ted\n", __func__, HiiHandle)); ); return EFI_SUCCESS; } @@ -1924,7 +1953,7 @@ NotifyFormsetUpdate ( InsertTailList (PendingList, &TargetPendingList->Link); DEBUG_CODE ( - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%a: HII handle: 0x%x is create= d\n", __func__, HiiHandle)); + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%a: HII handle: 0x%x is create= d\n", __func__, HiiHandle)); ); return EFI_SUCCESS; @@ -1961,7 +1990,7 @@ NotifyFormsetDeleted ( if (TargetPendingList !=3D NULL) { TargetPendingList->IsDeleted =3D TRUE; DEBUG_CODE ( - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%a: HII handle: 0x%x is upda= ted and deleted\n", __func__, HiiHandle)); + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%a: HII handle: 0x%x is upda= ted and deleted\n", __func__, HiiHandle)); ); return EFI_SUCCESS; } @@ -1977,7 +2006,7 @@ NotifyFormsetDeleted ( InsertTailList (PendingList, &TargetPendingList->Link); DEBUG_CODE ( - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%a: HII handle: 0x%x is delete= d\n", __func__, HiiHandle)); + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%a: HII handle: 0x%x is delete= d\n", __func__, HiiHandle)); ); return EFI_SUCCESS; @@ -2026,12 +2055,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__, FormsetPrivat= e->Guid)); + DEBUG ((DEBUG_REDFISH_PLATFORM_CONFIG, "%a: formset: %g is removed= because driver release HII resource it already\n", __func__, FormsetPrivat= e->Guid)); RemoveEntryList (&FormsetPrivate->Link); ReleaseFormset (FormsetPrivate); FreePool (FormsetPrivate); } else { - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%a: formset on HII handle = 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 { // @@ -2042,7 +2071,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 -The information contained in this message may be confidential and propriet= ary to American Megatrends (AMI). This communication is intended to be read= only by the individual or entity to whom it is addressed or by their desig= nee. If the reader of this message is not the intended recipient, you are o= n notice that any distribution of this message, in any form, is strictly pr= ohibited. Please promptly notify the sender by reply e-mail or by telephone= at 770-246-8600, and then delete or destroy all copies of the transmission= . -=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 (#117432): https://edk2.groups.io/g/devel/message/117432 Mute This Topic: https://groups.io/mt/105326105/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-