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 3B0D17803D1 for ; Wed, 27 Mar 2024 07:38:01 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=hKHtvy4F1w/UetKLSc2nsnu86dfjQt4J+f7L3rMhX4s=; 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=1711525079; v=1; b=N2fIMx6xVs2W7C0qWGOX31mgWovstcJJo7SyzE/QiT5Vx5RCJmrMdJP40IZBExsiuClOyEpx NWhuTzWWHrbPivYi0MIJ0Z0neYAc3Mf07A1t/WkdRpxFkvC7Jhaj27tNGSjdJoeVsqBIpD99tP8 T/pX5hmhvvDOQ5hiELtO7HP4aQPuCltWz82vtxf3hh0q+L49v8vV0wKUn2YDkd4UJb3sCUBcgBZ 1vKNkjh1j86FV0CBh85LfJt7Fxdy26hd9ZDRJ1GUy4R5eFt0NTwM6RmtxtZozJFA08dn7oL1/md 5bnAqMt8NtkWFM9cLYNlv/mZyIKgb4A11lJqnkySpKxnQ== X-Received: by 127.0.0.2 with SMTP id nGLwYY7687511xaZaMADzoFw; Wed, 27 Mar 2024 00:37:59 -0700 X-Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [40.107.94.56]) by mx.groups.io with SMTP id smtpd.web11.31870.1711525078795808464 for ; Wed, 27 Mar 2024 00:37:58 -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:37:53 +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:37:53 +0000 From: "Nickle Wang via groups.io" To: "devel@edk2.groups.io" , Nickle Wang , "abner.chang@amd.com" CC: Igor Kulchytskyy Subject: Re: [edk2-devel] [PATCH V2 1/6] RedfishPkg/RedfishPlatformConfigDxe: Config language searching optimization Thread-Topic: [edk2-devel] [PATCH V2 1/6] RedfishPkg/RedfishPlatformConfigDxe: Config language searching optimization Thread-Index: AQHaf5B43FOsoNjhM0ygHBzoksV9xbFK4JEQgABTT3A= Date: Wed, 27 Mar 2024 07:37:53 +0000 Message-ID: References: <20240326151503.106-1-abner.chang@amd.com> <20240326151503.106-2-abner.chang@amd.com> <17C07EC03FCD57FF.6405@groups.io> In-Reply-To: <17C07EC03FCD57FF.6405@groups.io> 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: 195d685b-9786-4347-0baa-08dc4e30d000 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: ndSxpbXh7rJeYTwUfKeQIqq8k9oFsV5az75Sg6KXNxRyAuI8MLIcRR6/0TLVc7ig8l80vmLv6hphxOeHcbleJud6NG1tL9ReMqUnPxFYuAVNQAr2BnziyHw5cYtnHB2VciytIh/1EL8qZU/rbLL8symi84h0S+92LTaTWgYgBdHNdgjJCSl5DXCDZWRYV1NZBjTfSuLsSSggQ19JHyr+QLB10ABlBPURzxHQeZP1qmhFBJhHyCwVxiAEzHqTM0K42m3UA1/7QtdYpvQgW5ri1n/YbFpL1pzxV0TgKJ976CpvXM0VILeBB66atQVq8V/ZLpiPF11ZFnxZyMHaPY6BjyXE3hApcr6ElDyLtJpMnvIsuFKhO5pledUbRZ0b+T3jYYaKmRLjckenUOgyJgS/nWMzG7buNHBs3w2vbhDYXEWIzIgehjKl4dOD8w+mGx6Tbvene4f/RQLob72XC5Hx6Gd3jwWOpSVBPNIu2hKgU5uZOOFZVhQs45ZT+pFGKWlyAgO1hcp3bnaxEH615792jSfQce8rQ4ERNsKDXjasbFX5suzfn6ydfdXgOIqy/rZDSEXUJFBmB4XWlpy0+AMfbpDM42F7zUhcSyeBUz3gKGaWjM/dVWjKZncrF6nAdrp4WTFxr0W5bLQBVKDyr9zfHrdSMK77QWSxJLUVYIaQ2oc= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?XNlUKboyWFxj0yvx3i0k/jHV9MSmgE4avfVdX+vXNq8WHuLdzAxsvIgcJk9q?= =?us-ascii?Q?E5iKJ0wU0ZzPrH9oFzp4obhBE5ZcVf+f9YdJRTeuJ2iLj5ZgqdkZUWGMfZb/?= =?us-ascii?Q?4A93SU4nMEJrli+5FYewbPTN6dpAw9UbM0EYeXNGMLXIc1ZCyb6igg/b+Nkz?= =?us-ascii?Q?BOphL/0DO5dD4w+DdCvc8Abi29QUd70fYUAtMMZdd56Q2NbMS6o75UAw4P+e?= =?us-ascii?Q?p2lqVCrZpL885NphUMQBwfSq8Q83H9plJb1ThGZG4amdr0+jifo0kGZsBBdi?= =?us-ascii?Q?W1waR+TcqHVIdF9b9BQFFBz5lQqmn0+pB30FcK5GzZMYZ6VFNPhmMAGH+LVy?= =?us-ascii?Q?/qXXkQpF6W9w6Aq+bQyDOW5r/nUbdn1YawrR6vD8dN1zh73NGIQG5rJa4IVt?= =?us-ascii?Q?Z3XGATEB4MPNuIdJ98CGS5Ql1/MFm35by5VkS5NaPnWG7mul+NAUd2P1QiVX?= =?us-ascii?Q?xs0MIF0EbAywgtTYvYrIwH0UtdRHKwQUWfdv8PO6PU9bcXHXAoHqnmWE1GXd?= =?us-ascii?Q?EJTHxN4HMRP64QI1efEI1M3zIAYlx499t8I+BLu7SL0O+RI8N0JqDaJfjHvT?= =?us-ascii?Q?Qz2B33vfdyS2NKdegtYZZx5wbzl8ubUdc1+R5ZaDGhY/T1/RGTgQP0qL7s3x?= =?us-ascii?Q?dCS0/s+KPc6DmnrnQcUXplounBsSuSNnZH8zccWL7grGJVjgefpuVljJZ06+?= =?us-ascii?Q?NYsnHrC98MAJGNKd3Zj+IvAVqvEaenDOc9fzDD9GyRzU8l3/y8p/nJS/qz9v?= =?us-ascii?Q?bwK6jtUkH7mFA0WRpCzqa4MnSG/Du9w5Y6PGcm8Dlq/TnUQjXK9jGYeh1V8f?= =?us-ascii?Q?R60G4Iq2pyszRSpsnh46bwyKvoDY6X2xWBWwAQpy8jFrIZeiN8Tzhyp/wBKN?= =?us-ascii?Q?tSIJXtPHkzOeU1ZGb4Xf98InTh1LupsLEHPSGiy0jTKp5jJjCzZm/zMCZyq9?= =?us-ascii?Q?iMXuk++1OTEFnJ32ZF1dPR1Y6OKommykALQ1yQzMNfzLPJAy8HpnZNudN9Zx?= =?us-ascii?Q?8taFQCTUDJHYJNBg3EequMV3pu5cwDmTpN4pN6Krd6HLhOMYq5n14N1LdqVj?= =?us-ascii?Q?Kgs0T5sVBAC0mdkvkFHYKYq9erfcPI5GFKIK7ariObINr6z5A6q4fLnBkncm?= =?us-ascii?Q?avhN/l2eaA2DOwZ64TN4Eai69CkYcDyGUZMT9nAdLx7iUQ5Xab736MwBqMVl?= =?us-ascii?Q?cQAwSeanG0pu+yTlWI1JcROscq5yZXV6tHHXR93WqUsIe3uegnzh+RFrwbwn?= =?us-ascii?Q?S5YMH7n1PtsSqruyeDrrd6qpVJSprtJshB0pNHMOmlkwpfmEqdD8mDi2Gw6A?= =?us-ascii?Q?oS/mjsFExG5x27TqJo4LkLlI0C/ejxTAbfDnRNKOON+h9lbc5yf6qMjGAAZw?= =?us-ascii?Q?pJnnLouvz8Halht+lCy+EaZbafjAFEGF8OXnddOTHCD/C2xMX/ufOG+l88z4?= =?us-ascii?Q?MjUBmzY0nhAu3bBu0BQcGLqAVKNnppe6j1aB78GP4FNzCbyaJ5VUIIUnRaBJ?= =?us-ascii?Q?C5TbxvXXLhEVGvvSpqX2LFvizb6ntBviJWiYoE34qLXCb2t8cT0fndoDrXId?= =?us-ascii?Q?SLPnw697O2fxhTy9sII=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: 195d685b-9786-4347-0baa-08dc4e30d000 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Mar 2024 07:37:53.4430 (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: Q1Kl8d3fOoL0yBxRUxb+bcTGlNUk+G/KwpJo6+4c89V0nU3cBqWpP3BVvlj3mrjYyWmevt0XEmFXauBgbhfePQ== 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:37:59 -0700 Reply-To: devel@edk2.groups.io,nicklew@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: SyiLMoqJR1scHz7iXr7ANd61x7686176AA= 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=N2fIMx6x; 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 Per offline discussion with Abner, this will be addressed by separated patc= h since there is no function impact to performance improvements. Reviewed-by: Nickle Wang Regards, Nickle > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Nickle Wan= g > via groups.io > Sent: Wednesday, March 27, 2024 10:40 AM > To: abner.chang@amd.com; devel@edk2.groups.io > Cc: Igor Kulchytskyy > Subject: Re: [edk2-devel] [PATCH V2 1/6] RedfishPkg/RedfishPlatformConfig= Dxe: > Config language searching optimization >=20 > External email: Use caution opening links or attachments >=20 >=20 > Hi Abner, >=20 > Could we change "DescriptionStr" below to something like "XuefiString", s= o > people don't think it is a regular English string of HII statement? >=20 > > + EFI_STRING_ID Description; // Strin= g token of this > question. > > + CHAR16 *DescriptionStr; // Strin= g of this question. > > + EFI_STRING_ID Help; // Strin= g token of help message. >=20 >=20 > Thanks, > Nickle >=20 > > -----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 1/6] RedfishPkg/RedfishPlatformConfigDxe: Config lan= guage > > searching optimization > > > > External email: Use caution opening links or attachments > > > > > > From: abnchang > > > > Build up the x-uefi-redfish string database for the Redfish confg langu= age > > searching, instead of using HII String protocol. > > This can improve the time consumption lot on searching strings. > > > > Signed-off-by: Abner Chang > > Co-authored-by: Nickle Wang > > Cc: Igor Kulchytskyy > > --- > > .../RedfishPlatformConfigImpl.h | 107 ++- > > .../RedfishPlatformConfigDxe.c | 23 +- > > .../RedfishPlatformConfigImpl.c | 820 +++++++++++++++++- > > 3 files changed, 878 insertions(+), 72 deletions(-) > > > > diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigI= mpl.h > > b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.h > > index 9f4312decf5..6e6c7fdb8a9 100644 > > --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.h > > +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.h > > @@ -2,7 +2,8 @@ > > This file defines the EDKII Redfish Platform Config Protocol private= structure. > > > > (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP > > - Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights > > reserved. > > + Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights > > reserved. > > + Copyright (C) 2024 Advanced Micro Devices, Inc. All rights > > + reserved.
> > > > SPDX-License-Identifier: BSD-2-Clause-Patent > > > > @@ -30,6 +31,10 @@ > > #define ENGLISH_LANGUAGE_CODE "en-US" > > #define X_UEFI_SCHEMA_PREFIX "x-uefi-redfish-" > > > > +#define MAX_X_UEFI_REDFISH_STRING_SIZE (128 * 2)// 128 character in > UCS. > > + > > +typedef struct _REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE > > +REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE; > > + > > // > > // Definition of REDFISH_PLATFORM_CONFIG_PRIVATE. > > // > > @@ -46,17 +51,49 @@ typedef struct { > > CHAR8 **SchemaList; // Schema list > > } REDFISH_PLATFORM_CONFIG_SCHEMA; > > > > +// Defines the number of elements in array #define > > +X_UEFI_REDFISH_STRING_ARRAY_ENTRY_NUMBER 1024 > > + > > +// > > +// Definition of x-uefi-redfish string element. > > +// > > +typedef struct { > > + EFI_STRING_ID StringId; > > + CHAR16 *UcsString; > > +} REDFISH_X_UEFI_STRINGS_ARRAY_ELEMENT; > > + > > +// > > +// Discrete string array buffer, each has > > X_UEFI_REDFISH_STRING_ARRAY_NUMBER element. > > +// > > +typedef struct { > > + LIST_ENTRY NextArray; > > + REDFISH_X_UEFI_STRINGS_ARRAY_ELEMENT *ArrayEntryAddress; > > +} REDFISH_X_UEFI_STRINGS_ARRAY; > > + > > +// > > +// x-uefi-redfish string database, x-uefi-redfish language based. > > +// > > +typedef struct { > > + LIST_ENTRY NextXuefiRedfishLanguage; = // Link to the > > next suppoted x-uefi-Redfish language. > > + CHAR8 *XuefiRedfishLanguage; = // x-uefi-redfish > > language. > > + UINTN StringsArrayBlocks; = // Number of the > array > > blocks that accommodate X_UEFI_REDFISH_STRING_ARRAY_NUMBER > > + = // elements in each. > > + LIST_ENTRY XuefiRedfishStringArrays; = // Link entry of x- > > uefi-redfish string array. > > +} REDFISH_X_UEFI_STRING_DATABASE; > > + > > // > > // Definition of REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE > > // > > typedef struct { > > LIST_ENTRY Link; > > - HII_FORMSET *HiiFormSet; // Pointer to HII= formset data. > > - EFI_GUID Guid; // Formset GUID. > > - EFI_HII_HANDLE HiiHandle; // Hii Handle of = this formset. > > - LIST_ENTRY HiiFormList; // Form list that= keep form data > under > > this formset. > > - CHAR16 *DevicePathStr; // Device path of= this formset. > > - REDFISH_PLATFORM_CONFIG_SCHEMA SupportedSchema; // Schema that > is > > supported in this formset. > > + HII_FORMSET *HiiFormSet; // Poi= nter to HII formset > data. > > + EFI_GUID Guid; // For= mset GUID. > > + EFI_HII_HANDLE HiiHandle; // Hii= Handle of this formset. > > + EFI_HII_PACKAGE_LIST_HEADER *HiiPackageListHeader; // Hii > Package > > list header. > > + LIST_ENTRY HiiFormList; // For= m list that keep form > data > > under this formset. > > + CHAR16 *DevicePathStr; // Dev= ice path of this formset. > > + REDFISH_PLATFORM_CONFIG_SCHEMA SupportedSchema; // > Schema > > that is supported in this formset. > > + LIST_ENTRY XuefiRedfishStringDatabase; // x-u= efi-redfish > > string/Id data base; > > } REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE; > > > > #define REDFISH_PLATFORM_CONFIG_FORMSET_FROM_LINK(a) BASE_CR (a, > > REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE, Link) @@ -90,19 +127,19 > > @@ typedef struct { // // Definition of > > REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE > > // > > -typedef struct { > > +struct _REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE { > > LIST_ENTRY Link; > > REDFISH_PLATFORM_CONFIG_FORM_PRIVATE *ParentForm; > > - HII_STATEMENT *HiiStatement; // Pointer= to HII statement > > data. > > - EFI_QUESTION_ID QuestionId; // Questio= n ID of this > > statement. > > - EFI_STRING_ID Description; // String = token of this question. > > - EFI_STRING_ID Help; // String = token of help message. > > - EFI_STRING DesStringCache; // The str= ing cache for search > > function. > > - UINT8 Flags; // The sta= tement flag. > > - REDFISH_PLATFORM_CONFIG_STATEMENT_DATA StatementData; // The > > max/min for statement value. > > - BOOLEAN Suppressed; // Stateme= nt is suppressed. > > - BOOLEAN GrayedOut; // Stateme= nt is GrayedOut. > > -} REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE; > > + HII_STATEMENT *HiiStatement; // Point= er to HII statement > > data. > > + EFI_QUESTION_ID QuestionId; // Quest= ion ID of this > > statement. > > + EFI_STRING_ID Description; // Strin= g token of this > question. > > + CHAR16 *DescriptionStr; // Strin= g of this question. > > + EFI_STRING_ID Help; // Strin= g token of help message. > > + UINT8 Flags; // The s= tatement flag. > > + REDFISH_PLATFORM_CONFIG_STATEMENT_DATA StatementData; // The > > max/min for statement value. > > + BOOLEAN Suppressed; // State= ment is suppressed. > > + BOOLEAN GrayedOut; // State= ment is GrayedOut. > > +}; > > > > #define REDFISH_PLATFORM_CONFIG_STATEMENT_FROM_LINK(a) BASE_CR > (a, > > REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE, Link) > > > > @@ -347,4 +384,38 @@ ReleaseStatementList ( > > IN REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE_LIST *StatementList > > ); > > > > +/** > > + Return the HII string length. We don't check word alignment > > + of the input string as the same as the checking in StrLen > > + function. Because the HII string in the database is compact > > + at the byte alignment. > > + > > + @param[in] String Input UCS format string. > > + > > + @retval Length of > > + > > +**/ > > +UINTN > > +EFIAPI > > +HiiStrLen ( > > + IN CONST CHAR16 *String > > + ); > > + > > +/** > > + Return the HII string size. We don't check word alignment > > + of the input string as the same as the checking in StrLen > > + function. Because the HII string in the database is compact > > + at the byte alignment. > > + > > + @param[in] String Input UCS format string. > > + > > + @retval Size of the string. > > + > > +**/ > > +UINTN > > +EFIAPI > > +HiiStrSize ( > > + IN CONST CHAR16 *String > > + ); > > + > > #endif > > diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigD= xe.c > > b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c > > index f970e317b3f..664b48eb50e 100644 > > --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c > > +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigDxe.c > > @@ -2,7 +2,8 @@ > > The implementation of EDKII Redfish Platform Config Protocol. > > > > (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP > > - Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights > > reserved. > > + Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights > > reserved. > > + Copyright (C) 2024 Advanced Micro Devices, Inc. All rights > > + reserved.
> > > > SPDX-License-Identifier: BSD-2-Clause-Patent > > > > @@ -928,6 +929,10 @@ HiiStringToOneOfOptionValue ( > > Option =3D HII_QUESTION_OPTION_FROM_LINK (Link); > > > > TmpString =3D HiiGetRedfishString (Statement->ParentForm->ParentFo= rmset- > > >HiiHandle, Schema, Option->Text); > > + if (TmpString =3D=3D NULL) { > > + TmpString =3D HiiGetRedfishString (Statement->ParentForm->Parent= Formset- > > >HiiHandle, ENGLISH_LANGUAGE_CODE, Option->Text); > > + } > > + > > if (TmpString !=3D NULL) { > > if (StrCmp (TmpString, HiiString) =3D=3D 0) { > > CopyMem (Value, &Option->Value, sizeof (HII_STATEMENT_VALUE));= @@ - > > 1227,6 +1232,10 @@ HiiStringToOrderedListOptionValue ( > > Option =3D HII_QUESTION_OPTION_FROM_LINK (Link); > > > > TmpString =3D HiiGetRedfishString (Statement->ParentForm->ParentFo= rmset- > > >HiiHandle, Schema, Option->Text); > > + if (TmpString =3D=3D NULL) { > > + TmpString =3D HiiGetRedfishString (Statement->ParentForm->Parent= Formset- > > >HiiHandle, ENGLISH_LANGUAGE_CODE, Option->Text); > > + } > > + > > if (TmpString !=3D NULL) { > > if (StrCmp (TmpString, HiiString) =3D=3D 0) { > > *Value =3D ExtendHiiValueToU64 (&Option->Value); @@ -1491,7 +1= 500,7 > @@ > > StrToAsciiStr ( > > return NULL; > > } > > > > - StringLen =3D StrLen (UnicodeString) + 1; > > + StringLen =3D HiiStrLen (UnicodeString) + 1; > > Buffer =3D AllocatePool (StringLen * sizeof (CHAR8)); > > if (Buffer =3D=3D NULL) { > > return NULL; > > @@ -2000,7 +2009,6 @@ RedfishPlatformConfigProtocolGetConfigureLang ( > > REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE_LIST StatementList; > > REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE_REF *StatementRef; > > LIST_ENTRY *NextLink; > > - EFI_STRING TmpString; > > EFI_STRING *TmpConfigureLangLis= t; > > UINTN Index; > > CHAR8 *FullSchema; > > @@ -2054,12 +2062,9 @@ RedfishPlatformConfigProtocolGetConfigureLang ( > > > > ASSERT (StatementRef->Statement->Description !=3D 0); > > if (StatementRef->Statement->Description !=3D 0) { > > - TmpString =3D HiiGetRedfishString (StatementRef->Statement->Pa= rentForm- > > >ParentFormset->HiiHandle, FullSchema, StatementRef->Statement- > > >Description); > > - ASSERT (TmpString !=3D NULL); > > - if (TmpString !=3D NULL) { > > - TmpConfigureLangList[Index] =3D TmpString; > > - ++Index; > > - } > > + ASSERT (StatementRef->Statement->DescriptionStr !=3D NULL); > > + TmpConfigureLangList[Index] =3D AllocateCopyPool (HiiStrSize > (StatementRef- > > >Statement->DescriptionStr), (VOID *)StatementRef->Statement- > > >DescriptionStr); > > + ++Index; > > } > > } > > } > > diff --git a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigI= mpl.c > > b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c > > index 47d35abc088..8b1ddf4360a 100644 > > --- a/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c > > +++ b/RedfishPkg/RedfishPlatformConfigDxe/RedfishPlatformConfigImpl.c > > @@ -3,6 +3,7 @@ > > > > (C) Copyright 2021-2022 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.
> > > > SPDX-License-Identifier: BSD-2-Clause-Patent > > > > @@ -143,6 +144,88 @@ DumpFormsetList ( > > return EFI_SUCCESS; > > } > > > > +/** > > + Return the HII string length. We don't check word alignment > > + of the input string as same as the checking in StrLen > > + function, because the HII string in the database is compact > > + at the byte alignment. > > + > > + @param[in] String Input UCS format string. > > + > > + @retval Length of the string. > > + > > +**/ > > +UINTN > > +EFIAPI > > +HiiStrLen ( > > + IN CONST CHAR16 *String > > + ) > > +{ > > + UINTN Length; > > + > > + ASSERT (String !=3D NULL); > > + > > + for (Length =3D 0; *String !=3D L'\0'; String++, Length++) { } > > + > > + return Length; > > +} > > + > > +/** > > + Return the HII string size. We don't check word alignment > > + of the input string as same as the checking in StrLen > > + function, because the HII string in the database is compact > > + at the byte alignment. > > + > > + @param[in] String Input UCS format string. > > + > > + @retval Size of the string. > > + > > +**/ > > +UINTN > > +EFIAPI > > +HiiStrSize ( > > + IN CONST CHAR16 *String > > + ) > > +{ > > + return (HiiStrLen (String) + 1) * sizeof (*String); } > > + > > +/** > > + Compare two HII strings. We don't check word alignment > > + of the input string as same as the checking in StrLen > > + function, because the HII string in the database is compact > > + at the byte alignment. > > + > > + @param[in] FirstString Input UCS format of string to search. > > + @param[in] SecondString Input UCS format of string to look for in > > + FirstString; > > + > > + @retval 0 The strings are identical. > > + !0 The strings are not identical. > > + > > +**/ > > +INTN > > +EFIAPI > > +HiiStrCmp ( > > + IN CONST CHAR16 *FirstString, > > + IN CONST CHAR16 *SecondString > > + ) > > +{ > > + // > > + // ASSERT both strings are less long than > > +PcdMaximumUnicodeStringLength > > + // > > + ASSERT (HiiStrSize (FirstString) !=3D 0); > > + ASSERT (HiiStrSize (SecondString) !=3D 0); > > + > > + while ((*FirstString !=3D L'\0') && (*FirstString =3D=3D *SecondStri= ng)) { > > + FirstString++; > > + SecondString++; > > + } > > + > > + return *FirstString - *SecondString; > > +} > > + > > /** > > Delete a string from HII Package List by given HiiHandle. > > > > @@ -301,28 +384,6 @@ HiiGetRedfishAsciiString ( > > return AsciiString; > > } > > > > -/** > > - Get string from HII database in English language. The returned strin= g is > allocated > > - using AllocatePool(). The caller is responsible for freeing the allo= cated buffer > > using > > - FreePool(). > > - > > - @param[in] HiiHandle A handle that was previously registere= d in the HII > > Database. > > - @param[in] StringId The identifier of the string to retrie= ved from the > > string > > - package associated with HiiHandle. > > - > > - @retval NULL The string specified by StringId is not present in th= e string > > package. > > - @retval Other The string was returned. > > - > > -**/ > > -EFI_STRING > > -HiiGetEnglishString ( > > - IN EFI_HII_HANDLE HiiHandle, > > - IN EFI_STRING_ID StringId > > - ) > > -{ > > - return HiiGetRedfishString (HiiHandle, ENGLISH_LANGUAGE_CODE, String= Id); > -} > > - > > /** > > Get ASCII string from HII database in English language. The returned= string is > > allocated > > using AllocatePool(). The caller is responsible for freeing the allo= cated buffer > > using @@ -562,7 +623,7 @@ GetStatementPrivateByConfigureLangRegex ( > > HiiStatementPrivate =3D > > REDFISH_PLATFORM_CONFIG_STATEMENT_FROM_LINK (HiiStatementLink); > > > > if ((HiiStatementPrivate->Description !=3D 0) && !HiiStatement= Private- > > >Suppressed) { > > - TmpString =3D HiiGetRedfishString (HiiFormsetPrivate->HiiHan= dle, Schema, > > HiiStatementPrivate->Description); > > + TmpString =3D HiiStatementPrivate->DescriptionStr; > > if (TmpString !=3D NULL) { > > Status =3D RegularExpressionProtocol->MatchString ( > > RegularExpressionPro= tocol, @@ -592,8 +653,9 @@ > > GetStatementPrivateByConfigureLangRegex ( > > InsertTailList (&StatementList->StatementList, &Statemen= tRef->Link); > > ++StatementList->Count; > > } > > - > > - FreePool (TmpString); > > + } else { > > + DEBUG ((DEBUG_ERROR, "%a: HiiStatementPrivate->Description= Str is > > NULL, x-uefi-string has something wrong.\n", __func__)); > > + ASSERT (FALSE); > > } > > } > > > > @@ -676,14 +738,11 @@ GetStatementPrivateByConfigureLang ( > > ); > > > > if (HiiStatementPrivate->Description !=3D 0) { > > - TmpString =3D HiiGetRedfishString (HiiFormsetPrivate->HiiHan= dle, Schema, > > HiiStatementPrivate->Description); > > + TmpString =3D HiiStatementPrivate->DescriptionStr; > > if (TmpString !=3D NULL) { > > - if (StrCmp (TmpString, ConfigureLang) =3D=3D 0) { > > - FreePool (TmpString); > > + if (HiiStrCmp (TmpString, ConfigureLang) =3D=3D 0) { > > return HiiStatementPrivate; > > } > > - > > - FreePool (TmpString); > > } > > } > > > > @@ -741,10 +800,74 @@ GetFormsetPrivateByHiiHandle ( > > return NULL; > > } > > > > +/** > > + Release x-uefi-string related information. > > + > > + @param[in] FormsetPrivate Pointer to HII form-set private insta= nce. > > + > > + @retval EFI_STATUS > > + > > +**/ > > +EFI_STATUS > > +ReleaseXuefiStringDatabase ( > > + IN REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE *FormsetPrivate > > + ) > > +{ > > + REDFISH_X_UEFI_STRING_DATABASE *ThisDatabase; > > + REDFISH_X_UEFI_STRING_DATABASE *PreDatabase; > > + REDFISH_X_UEFI_STRINGS_ARRAY *ThisStringArray; > > + REDFISH_X_UEFI_STRINGS_ARRAY *PreStringArray; > > + BOOLEAN EndDatabase; > > + BOOLEAN EndArray; > > + > > + if (FormsetPrivate->HiiPackageListHeader !=3D NULL) { > > + FreePool (FormsetPrivate->HiiPackageListHeader); > > + } > > + > > + // Walk through x-uefi-redfish string database. > > + if (!IsListEmpty (&FormsetPrivate->XuefiRedfishStringDatabase)) { > > + EndDatabase =3D FALSE; > > + ThisDatabase =3D (REDFISH_X_UEFI_STRING_DATABASE *)GetFirstNode > > (&FormsetPrivate->XuefiRedfishStringDatabase); > > + while (!EndDatabase) { > > + // Walk through string arrays. > > + if (!IsListEmpty (&ThisDatabase->XuefiRedfishStringArrays)) { > > + EndArray =3D FALSE; > > + ThisStringArray =3D (REDFISH_X_UEFI_STRINGS_ARRAY *)GetFirstNo= de > > (&ThisDatabase->XuefiRedfishStringArrays); > > + while (!EndArray) { > > + // Remove this array > > + FreePool (ThisStringArray->ArrayEntryAddress); > > + EndArray =3D IsNodeAtEnd (&ThisDatabase->XuefiRedfishS= tringArrays, > > &ThisStringArray->NextArray); > > + PreStringArray =3D ThisStringArray; > > + if (!EndArray) { > > + ThisStringArray =3D (REDFISH_X_UEFI_STRINGS_ARRAY *)GetNex= tNode > > (&ThisDatabase->XuefiRedfishStringArrays, &ThisStringArray->NextArray); > > + } > > + > > + RemoveEntryList (&PreStringArray->NextArray); > > + FreePool (PreStringArray); > > + } > > + } > > + > > + // > > + // Remove this database > > + // > > + EndDatabase =3D IsNodeAtEnd (&FormsetPrivate- > >XuefiRedfishStringDatabase, > > &ThisDatabase->NextXuefiRedfishLanguage); > > + PreDatabase =3D ThisDatabase; > > + if (!EndDatabase) { > > + ThisDatabase =3D (REDFISH_X_UEFI_STRING_DATABASE *)GetNextNode > > (&FormsetPrivate->XuefiRedfishStringDatabase, &ThisDatabase- > > >NextXuefiRedfishLanguage); > > + } > > + > > + RemoveEntryList (&PreDatabase->NextXuefiRedfishLanguage); > > + FreePool (PreDatabase); > > + } > > + } > > + > > + return EFI_SUCCESS; > > +} > > + > > /** > > Release formset and all the forms and statements that belong to this= formset. > > > > - @param[in] FormsetPrivate Pointer to HP_HII_FORM_SET_PRIVATE > > + @param[in] FormsetPrivate Pointer to HII form-set private insta= nce. > > > > @retval EFI_STATUS > > > > @@ -779,12 +902,6 @@ ReleaseFormset ( > > // > > // HiiStatementPrivate->HiiStatement will be released in Destroy= FormSet(). > > // > > - > > - if (HiiStatementPrivate->DesStringCache !=3D NULL) { > > - FreePool (HiiStatementPrivate->DesStringCache); > > - HiiStatementPrivate->DesStringCache =3D NULL; > > - } > > - > > RemoveEntryList (&HiiStatementPrivate->Link); > > FreePool (HiiStatementPrivate); > > HiiStatementLink =3D HiiNextStatementLink; @@ -821,6 +938,8 @@ > > ReleaseFormset ( > > FormsetPrivate->SupportedSchema.Count =3D 0; > > } > > > > + ReleaseXuefiStringDatabase (FormsetPrivate); > > + > > return EFI_SUCCESS; > > } > > > > @@ -846,17 +965,607 @@ NewFormsetPrivate ( > > // Initial newly created formset private data. > > // > > InitializeListHead (&NewFormsetPrivate->HiiFormList); > > + InitializeListHead (&NewFormsetPrivate->XuefiRedfishStringDatabase); > > > > return NewFormsetPrivate; > > } > > > > +/** > > + Create new x-uefi-redfish string array. > > + > > + @param[in] FormsetPrivate Pointer to HII form-set = private > instance. > > + @param[in] XuefiRedfishStringDatabase The x-uefi-redfish strin= g > database. > > + > > + @retval EFI_OUT_OF_RESOURCES Not enough memory for creating= a > > new array. > > + EFI_SUCCESS New array is created successfu= lly. > > + > > +**/ > > +EFI_STATUS > > +NewRedfishXuefiStringArray ( > > + IN REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE *FormsetPrivate, > > + IN REDFISH_X_UEFI_STRING_DATABASE *XuefiRedfishStringDat= abase > > + ) > > +{ > > + REDFISH_X_UEFI_STRINGS_ARRAY *ArrayAddress; > > + > > + // Initial first REDFISH_X_UEFI_STRINGS_ARRAY memory. > > + ArrayAddress =3D (REDFISH_X_UEFI_STRINGS_ARRAY *)AllocateZeroPool > > + (sizeof (REDFISH_X_UEFI_STRINGS_ARRAY)); if (ArrayAddress =3D=3D NUL= L) { > > + DEBUG ((DEBUG_ERROR, "%a: Failed to allocate > > REDFISH_X_UEFI_STRINGS_ARRAY.\n", __func__)); > > + return EFI_OUT_OF_RESOURCES; > > + } > > + > > + InitializeListHead (&ArrayAddress->NextArray); > > + > > + // Allocate memory buffer for REDFISH_X_UEFI_STRINGS_ARRAY_ELEMENT > > elements. > > + ArrayAddress->ArrayEntryAddress =3D \ > > + (REDFISH_X_UEFI_STRINGS_ARRAY_ELEMENT *)AllocateZeroPool (sizeof > > + (REDFISH_X_UEFI_STRINGS_ARRAY_ELEMENT) * > > + X_UEFI_REDFISH_STRING_ARRAY_ENTRY_NUMBER); > > + if (ArrayAddress->ArrayEntryAddress =3D=3D NULL) { > > + FreePool (ArrayAddress); > > + DEBUG ((DEBUG_ERROR, "%a: Failed to allocate array for > > REDFISH_X_UEFI_STRINGS_ARRAY_ELEMENTs.\n", __func__)); > > + return EFI_OUT_OF_RESOURCES; > > + } > > + > > + XuefiRedfishStringDatabase->StringsArrayBlocks++; > > + InsertTailList > > +(&XuefiRedfishStringDatabase->XuefiRedfishStringArrays, > > +&ArrayAddress->NextArray); > > + return EFI_SUCCESS; > > +} > > + > > +/** > > + Get the pointer of x-uefi-redfish database or create a new database. > > + > > + @param[in] FormsetPrivate Pointer to HII form-set priv= ate instance. > > + @param[in] HiiStringPackageHeader HII string package header. > > + > > + @retval Pointer to REDFISH_X_UEFI_STRING_DATABASE. > > + If NULL, it fails to obtain x-uefi-redfish database. > > + > > +**/ > > +REDFISH_X_UEFI_STRING_DATABASE * > > +GetExitOrCreateXuefiStringDatabase ( > > + IN REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE *FormsetPrivate, > > + IN EFI_HII_STRING_PACKAGE_HDR *HiiStringPackageHeade= r > > + ) > > +{ > > + EFI_STATUS Status; > > + 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)) { > > + XuefiRedfishStringDatabase =3D (REDFISH_X_UEFI_STRING_DATABASE > > + *)GetFirstNode (&FormsetPrivate->XuefiRedfishStringDatabase); > > + > > + while (TRUE) { > > + if (AsciiStriCmp (XuefiRedfishStringDatabase->XuefiRedfishLangua= ge, > > HiiStringPackageHeader->Language) =3D=3D 0) { > > + CreateNewOne =3D FALSE; > > + break; > > + } > > + > > + if (IsNodeAtEnd (&FormsetPrivate->XuefiRedfishStringDatabase, > > &XuefiRedfishStringDatabase->NextXuefiRedfishLanguage)) { > > + break; > > + } > > + > > + XuefiRedfishStringDatabase =3D \ > > + (REDFISH_X_UEFI_STRING_DATABASE *)GetNextNode (&FormsetPrivate= - > > >XuefiRedfishStringDatabase, &XuefiRedfishStringDatabase- > > >NextXuefiRedfishLanguage); > > + } > > + } > > + > > + if (CreateNewOne) { > > + DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, " 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")); > > + return NULL; > > + } > > + > > + InitializeListHead (&XuefiRedfishStringDatabase- > >NextXuefiRedfishLanguage); > > + InitializeListHead (&XuefiRedfishStringDatabase->XuefiRedfishStrin= gArrays); > > + XuefiRedfishStringDatabase->StringsArrayBlocks =3D 0; > > + XuefiRedfishStringDatabase->XuefiRedfishLanguage =3D > > + HiiStringPackageHeader->Language; > > + > > + Status =3D NewRedfishXuefiStringArray (FormsetPrivate, > > XuefiRedfishStringDatabase); > > + if (EFI_ERROR (Status)) { > > + FreePool (XuefiRedfishStringDatabase); > > + return NULL; > > + } > > + > > + DEBUG (( > > + REDFISH_PLATFORM_CONFIG_DEBUG, > > + " x-uefi-redfish (%a):\n String array is added to > > XuefiRedfishStringDatabase, total %d arrays now.\n", > > + XuefiRedfishStringDatabase->XuefiRedfishLanguage, > > + XuefiRedfishStringDatabase->StringsArrayBlocks > > + )); > > + > > + // Link string database to FormsetPrivate. > > + InsertTailList (&FormsetPrivate->XuefiRedfishStringDatabase, > > + &XuefiRedfishStringDatabase->NextXuefiRedfishLanguage); > > + } > > + > > + return XuefiRedfishStringDatabase; > > +} > > + > > +/** > > + Check and allocate a new x-uefi-redfish array if it is insufficient > > +for the > > + newly added x-uefi-redfish string. > > + > > + @param[in] FormsetPrivate Pointer to HII form-set = private > instance. > > + @param[in] XuefiRedfishStringDatabase Pointer to the x-uefi-re= dfish > > database. > > + @param[in] StringId String ID added to datab= ase. > > + > > + @retval EFI_SUCCESS The size of x-uefi-strin= g array is adjusted > or > > + is not required to be ad= justed. > > + Otherwise, refer to the error code returned from > > NewRedfishXuefiStringArray(). > > + > > +**/ > > +EFI_STATUS > > +RedfishXuefiStringAdjustArrays ( > > + IN REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE *FormsetPrivate, > > + IN REDFISH_X_UEFI_STRING_DATABASE *XuefiRedfishStringDat= abase, > > + IN EFI_STRING_ID StringId > > + ) > > +{ > > + EFI_STATUS Status; > > + > > + while (((StringId + X_UEFI_REDFISH_STRING_ARRAY_ENTRY_NUMBER) / > > X_UEFI_REDFISH_STRING_ARRAY_ENTRY_NUMBER) > > > (UINT16)XuefiRedfishStringDatabase->StringsArrayBlocks) { > > + Status =3D NewRedfishXuefiStringArray (FormsetPrivate, > > XuefiRedfishStringDatabase); > > + if (EFI_ERROR (Status)) { > > + DEBUG ((DEBUG_ERROR, "%a: Failed to adjust x-uefi-string array", > > __func__)); > > + return Status; > > + } > > + } > > + > > + return EFI_SUCCESS; > > +} > > + > > +/** > > + Insert a x-uefi-redfish string to database. > > + > > + @param[in] FormsetPrivate Pointer to HII form-set priv= ate instance. > > + @param[in] HiiStringPackageHeader Pointer to HII string packag= e. > > + @param[in] StringId The HII string ID > > + @param[in] StringTextPtr Pointer to HII string text. > > + > > + @retval EFI_SUCCESS The HII string is added to d= atabase. > > + EFI_LOAD_ERROR Something wrong when insert = an HII string > > + to database. > > + > > +**/ > > +EFI_STATUS > > +RedfishXuefiStringInsertDatabase ( > > + IN REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE *FormsetPrivate, > > + IN EFI_HII_STRING_PACKAGE_HDR *HiiStringPackageHeade= r, > > + IN EFI_STRING_ID StringId, > > + IN CHAR16 *StringTextPtr > > + ) > > +{ > > + EFI_STATUS Status; > > + UINTN StringIdOffset; > > + REDFISH_X_UEFI_STRING_DATABASE *XuefiRedfishStringDatabase; > > + REDFISH_X_UEFI_STRINGS_ARRAY *ThisArray; > > + > > + XuefiRedfishStringDatabase =3D GetExitOrCreateXuefiStringDatabase > > + (FormsetPrivate, HiiStringPackageHeader); if (XuefiRedfishStringData= base =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); > > + return EFI_LOAD_ERROR; > > + } > > + > > + Status =3D RedfishXuefiStringAdjustArrays (FormsetPrivate, > > + XuefiRedfishStringDatabase, StringId); if (EFI_ERROR (Status)) { > > + DEBUG ((DEBUG_ERROR, "%a: Failed to adjust x-uefi-redfish string > array.\n", > > __func__)); > > + return EFI_LOAD_ERROR; > > + } > > + > > + // Insert string to x-uefi-redfish string array. > > + StringIdOffset =3D (UINTN)StringId; > > + ThisArray =3D (REDFISH_X_UEFI_STRINGS_ARRAY *)GetFirstNode > > (&XuefiRedfishStringDatabase->XuefiRedfishStringArrays); > > + while (StringIdOffset >=3D X_UEFI_REDFISH_STRING_ARRAY_ENTRY_NUMBER) > { > > + ThisArray =3D (REDFISH_X_UEFI_STRINGS_ARRAY *)GetNextNode > > (&XuefiRedfishStringDatabase->XuefiRedfishStringArrays, &ThisArray- > > >NextArray); > > + StringIdOffset -=3D X_UEFI_REDFISH_STRING_ARRAY_ENTRY_NUMBER; > > + } > > + > > + // Insert string > > + (ThisArray->ArrayEntryAddress + StringIdOffset)->StringId =3D > > + StringId; (ThisArray->ArrayEntryAddress + StringIdOffset)->UcsString > > + =3D StringTextPtr; > > + > > + DEBUG (( > > + REDFISH_PLATFORM_CONFIG_DEBUG, > > + " 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 priv= ate instance. > > + @param[in] HiiStringPackageHeader HII string package header. > > + > > + @retval TRUE x-uefi-redfish string and ID map is inserted to data= base. > > + FALSE Something is wrong when insert x-uefi-redfish string= and ID map. > > + > > +**/ > > +BOOLEAN > > +CreateXuefiLanguageStringIdMap ( > > + IN REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE *FormsetPrivate, > > + IN EFI_HII_STRING_PACKAGE_HDR *HiiStringPackageHeade= r > > + ) > > +{ > > + EFI_STATUS Status; > > + UINT8 *BlockHdr; > > + EFI_STRING_ID CurrentStringId; > > + UINTN BlockSize; > > + UINTN Index; > > + UINT8 *StringTextPtr; > > + UINTN Offset; > > + UINT16 StringCount; > > + UINT16 SkipCount; > > + UINT8 Length8; > > + EFI_HII_SIBT_EXT2_BLOCK Ext2; > > + UINT32 Length32; > > + UINT8 *StringBlockInfo; > > + > > + // > > + // Parse the string blocks to get the string text and font. > > + // > > + StringBlockInfo =3D (UINT8 *)((UINTN)HiiStringPackageHeader + > > HiiStringPackageHeader->StringInfoOffset); > > + BlockHdr =3D StringBlockInfo; > > + BlockSize =3D 0; > > + Offset =3D 0; > > + CurrentStringId =3D 1; > > + while (*BlockHdr !=3D EFI_HII_SIBT_END) { > > + switch (*BlockHdr) { > > + case EFI_HII_SIBT_STRING_SCSU: > > + Offset =3D sizeof (EFI_HII_STRING_BLOCK); > > + StringTextPtr =3D BlockHdr + Offset; > > + BlockSize +=3D Offset + AsciiStrSize ((CHAR8 *)StringTextPt= r); > > + CurrentStringId++; > > + break; > > + > > + case EFI_HII_SIBT_STRING_SCSU_FONT: > > + Offset =3D sizeof (EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK)= - sizeof > > (UINT8); > > + StringTextPtr =3D BlockHdr + Offset; > > + BlockSize +=3D Offset + AsciiStrSize ((CHAR8 *)StringTextPt= r); > > + CurrentStringId++; > > + break; > > + > > + case EFI_HII_SIBT_STRINGS_SCSU: > > + CopyMem (&StringCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK= ), > sizeof > > (UINT16)); > > + StringTextPtr =3D (UINT8 *)((UINTN)BlockHdr + sizeof > > (EFI_HII_SIBT_STRINGS_SCSU_BLOCK) - sizeof (UINT8)); > > + BlockSize +=3D StringTextPtr - BlockHdr; > > + > > + for (Index =3D 0; Index < StringCount; Index++) { > > + BlockSize +=3D AsciiStrSize ((CHAR8 *)StringTextPtr); > > + StringTextPtr =3D StringTextPtr + AsciiStrSize ((CHAR8 *)Str= ingTextPtr); > > + CurrentStringId++; > > + } > > + > > + break; > > + > > + case EFI_HII_SIBT_STRINGS_SCSU_FONT: > > + CopyMem ( > > + &StringCount, > > + (UINT8 *)((UINTN)BlockHdr + sizeof (EFI_HII_STRING_BLOCK) + = sizeof > > (UINT8)), > > + sizeof (UINT16) > > + ); > > + StringTextPtr =3D (UINT8 *)((UINTN)BlockHdr + sizeof > > (EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK) - sizeof (UINT8)); > > + BlockSize +=3D StringTextPtr - BlockHdr; > > + > > + for (Index =3D 0; Index < StringCount; Index++) { > > + BlockSize +=3D AsciiStrSize ((CHAR8 *)StringTextPtr); > > + StringTextPtr =3D StringTextPtr + AsciiStrSize ((CHAR8 *)Str= ingTextPtr); > > + CurrentStringId++; > > + } > > + > > + break; > > + > > + case EFI_HII_SIBT_STRING_UCS2: > > + Offset =3D sizeof (EFI_HII_STRING_BLOCK); > > + StringTextPtr =3D BlockHdr + Offset; > > + > > + // x-uefi-redfish string is always encoded as UCS and started = with '/'. > > + if (*StringTextPtr =3D=3D (UINT16)'/') { > > + Status =3D RedfishXuefiStringInsertDatabase ( > > + FormsetPrivate, > > + HiiStringPackageHeader, > > + CurrentStringId, > > + (CHAR16 *)StringTextPtr > > + ); > > + if (EFI_ERROR (Status)) { > > + DEBUG ((DEBUG_ERROR, "%a: Failed to insert x-uefi-redfish = string > > %s.\n", __func__, StringTextPtr)); > > + return FALSE; > > + } > > + } > > + > > + BlockSize +=3D (Offset + HiiStrSize ((CHAR16 *)StringTextPtr))= ; > > + CurrentStringId++; > > + break; > > + > > + case EFI_HII_SIBT_STRING_UCS2_FONT: > > + Offset =3D sizeof (EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK)= - sizeof > > (CHAR16); > > + StringTextPtr =3D BlockHdr + Offset; > > + BlockSize +=3D (Offset + HiiStrSize ((CHAR16 *)StringTextPt= r)); > > + CurrentStringId++; > > + break; > > + > > + case EFI_HII_SIBT_STRINGS_UCS2: > > + Offset =3D sizeof (EFI_HII_SIBT_STRINGS_UCS2_BLOCK) - s= izeof > (CHAR16); > > + StringTextPtr =3D BlockHdr + Offset; > > + BlockSize +=3D Offset; > > + CopyMem (&StringCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK= ), > sizeof > > (UINT16)); > > + for (Index =3D 0; Index < StringCount; Index++) { > > + BlockSize +=3D HiiStrSize ((CHAR16 *)StringTextPtr); > > + StringTextPtr =3D StringTextPtr + HiiStrSize ((CHAR16 *)Stri= ngTextPtr); > > + CurrentStringId++; > > + } > > + > > + break; > > + > > + case EFI_HII_SIBT_STRINGS_UCS2_FONT: > > + Offset =3D sizeof (EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK= ) - sizeof > > (CHAR16); > > + StringTextPtr =3D BlockHdr + Offset; > > + BlockSize +=3D Offset; > > + CopyMem ( > > + &StringCount, > > + (UINT8 *)((UINTN)BlockHdr + sizeof (EFI_HII_STRING_BLOCK) + = sizeof > > (UINT8)), > > + sizeof (UINT16) > > + ); > > + for (Index =3D 0; Index < StringCount; Index++) { > > + BlockSize +=3D HiiStrSize ((CHAR16 *)StringTextPtr); > > + StringTextPtr =3D StringTextPtr + HiiStrSize ((CHAR16 *)Stri= ngTextPtr); > > + CurrentStringId++; > > + } > > + > > + break; > > + > > + case EFI_HII_SIBT_DUPLICATE: > > + BlockSize +=3D sizeof (EFI_HII_SIBT_DUPLICATE_BLOCK); > > + CurrentStringId++; > > + break; > > + > > + case EFI_HII_SIBT_SKIP1: > > + SkipCount =3D (UINT16)(*(UINT8 *)((UINTN)BlockHdr + size= of > > (EFI_HII_STRING_BLOCK))); > > + CurrentStringId =3D (UINT16)(CurrentStringId + SkipCount); > > + BlockSize +=3D sizeof (EFI_HII_SIBT_SKIP1_BLOCK); > > + break; > > + > > + case EFI_HII_SIBT_SKIP2: > > + CopyMem (&SkipCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK),= sizeof > > (UINT16)); > > + CurrentStringId =3D (UINT16)(CurrentStringId + SkipCount); > > + BlockSize +=3D sizeof (EFI_HII_SIBT_SKIP2_BLOCK); > > + break; > > + > > + case EFI_HII_SIBT_EXT1: > > + CopyMem ( > > + &Length8, > > + (UINT8 *)((UINTN)BlockHdr + sizeof (EFI_HII_STRING_BLOCK) + = sizeof > > (UINT8)), > > + sizeof (UINT8) > > + ); > > + BlockSize +=3D Length8; > > + break; > > + > > + case EFI_HII_SIBT_EXT2: > > + CopyMem (&Ext2, BlockHdr, sizeof (EFI_HII_SIBT_EXT2_BLOCK)); > > + BlockSize +=3D Ext2.Length; > > + break; > > + > > + case EFI_HII_SIBT_EXT4: > > + CopyMem ( > > + &Length32, > > + (UINT8 *)((UINTN)BlockHdr + sizeof (EFI_HII_STRING_BLOCK) + = sizeof > > (UINT8)), > > + sizeof (UINT32) > > + ); > > + > > + BlockSize +=3D Length32; > > + break; > > + > > + default: > > + break; > > + } > > + > > + BlockHdr =3D (UINT8 *)(StringBlockInfo + BlockSize); } > > + > > + return TRUE; > > +} > > + > > +/** > > + Get x-uefi-redfish string and language by string ID. > > + > > + @param[in] FormsetPrivate Pointer to HII form-set private= instance. > > + @param[in] StringId The HII string ID. > > + @param[out] String Optionally return USC string. > > + @param[out] Language Optionally return x-uefi-redfis= h language. > > + @param[out] XuefiStringDatabase Optionally return x-uefi-redfis= h > > database. > > + > > + @retval EFI_SUCCESS String information is returned. > > + EFI_INVALID_PARAMETER One of the given parameters to this = function > is > > + invalid. > > + EFI_NOT_FOUND String is not found. > > + > > +**/ > > +EFI_STATUS > > +GetXuefiStringAndLangByStringId ( > > + IN REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE *FormsetPrivate, > > + IN EFI_STRING_ID StringId, > > + OUT CHAR16 **String OPTIONAL, > > + OUT CHAR8 **Language OPTIONAL, > > + OUT REDFISH_X_UEFI_STRING_DATABASE **XuefiStringDatabase > > OPTIONAL > > + ) > > +{ > > + REDFISH_X_UEFI_STRING_DATABASE *XuefiRedfishStringDatabase; > > + REDFISH_X_UEFI_STRINGS_ARRAY *StringArray; > > + UINT16 StringIndex; > > + > > + if ((String =3D=3D NULL) && (Language =3D=3D NULL) && (XuefiStringDa= tabase =3D=3D > NULL)) > > { > > + DEBUG ((DEBUG_ERROR, "%a: Invalid parameters for this function.\n"= , > > __func__)); > > + return EFI_INVALID_PARAMETER; > > + } > > + > > + if (IsListEmpty (&FormsetPrivate->XuefiRedfishStringDatabase)) { > > + return EFI_NOT_FOUND; > > + } > > + > > + XuefiRedfishStringDatabase =3D (REDFISH_X_UEFI_STRING_DATABASE > > + *)GetFirstNode (&FormsetPrivate->XuefiRedfishStringDatabase); > > + while (TRUE) { > > + if (Language !=3D NULL) { > > + *Language =3D XuefiRedfishStringDatabase->XuefiRedfishLanguage; > > + } > > + > > + StringArray =3D (REDFISH_X_UEFI_STRINGS_ARRAY *)GetFirstNode > > + (&XuefiRedfishStringDatabase->XuefiRedfishStringArrays); > > + > > + // Loop to the correct string array. > > + StringIndex =3D StringId; > > + while (StringIndex >=3D X_UEFI_REDFISH_STRING_ARRAY_ENTRY_NUMBER) = { > > + if (IsNodeAtEnd (&XuefiRedfishStringDatabase->XuefiRedfishString= Arrays, > > &StringArray->NextArray)) { > > + goto ErrorEixt; > > + } > > + > > + StringArray =3D (REDFISH_X_UEFI_STRINGS_ARRAY *)GetNextNode > > (&XuefiRedfishStringDatabase->XuefiRedfishStringArrays, &StringArray- > > >NextArray); > > + StringIndex -=3D X_UEFI_REDFISH_STRING_ARRAY_ENTRY_NUMBER; > > + } > > + > > + // > > + // NOTE: The string ID in the formset is a unique number. > > + // If the string in the array is NULL, then the matched stri= ng ID > > + // should be in another x-uefi-redfish database. > > + // > > + if ((StringArray->ArrayEntryAddress + StringIndex)->UcsString !=3D= NULL) { > > + // > > + // String ID is belong to this x-uef-redfish language database. > > + // > > + if (String !=3D NULL) { > > + *String =3D (StringArray->ArrayEntryAddress + StringIndex)->Uc= sString; > > + } > > + > > + if (XuefiStringDatabase !=3D NULL) { > > + *XuefiStringDatabase =3D XuefiRedfishStringDatabase; > > + } > > + > > + return EFI_SUCCESS; > > + } > > + > > + if (IsNodeAtEnd (&FormsetPrivate->XuefiRedfishStringDatabase, > > &XuefiRedfishStringDatabase->NextXuefiRedfishLanguage)) { > > + return EFI_NOT_FOUND; > > + } > > + > > + XuefiRedfishStringDatabase =3D (REDFISH_X_UEFI_STRING_DATABASE > > *)GetNextNode ( > > + &= FormsetPrivate- > > >XuefiRedfishStringDatabase, > > + &= XuefiRedfishStringDatabase- > > >NextXuefiRedfishLanguage > > + )= ; > > + } > > + > > +ErrorEixt:; > > + DEBUG ((DEBUG_ERROR, "%a: String ID (%d) is not in any x-uef-redfish > > +string databases.\n", __func__, StringId)); > > + return EFI_NOT_FOUND; > > +} > > + > > +/** > > + Build a x-uefi-redfish database for the newly added x-uefi-redfish l= anguage. > > + > > + @param[in] FormsetPrivate Pointer to HII form-set priv= ate instance. > > + > > +**/ > > +VOID > > +BuildXUefiRedfishStringDatabase ( > > + IN REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE *FormsetPrivate > > + ) > > +{ > > + EFI_STATUS Status; > > + UINTN BufferSize; > > + EFI_HII_PACKAGE_HEADER *PackageHeader; > > + UINTN EndingPackageAddress; > > + EFI_HII_STRING_PACKAGE_HDR *HiiStringPackageHeader; > > + UINTN SupportedSchemaLangCount; > > + CHAR8 **SupportedSchemaLang; > > + BOOLEAN StringIdMapIsBuilt; > > + > > + DEBUG ((DEBUG_INFO, "%a: Building x-uefi-redfish string database, HI= I > > + Formset GUID - %g.\n", __func__, FormsetPrivate->Guid)); > > + > > + BufferSize =3D 0; > > + Status =3D mRedfishPlatformConfigPrivate->HiiDatabase->ExportPac= kageLists > ( > > + mRedfishP= latformConfigPrivate- > >HiiDatabase, > > + FormsetPr= ivate->HiiHandle, > > + &BufferSi= ze, > > + FormsetPr= ivate->HiiPackageListHeader > > + ); if > > + (Status !=3D EFI_BUFFER_TOO_SMALL) { > > + DEBUG ((DEBUG_ERROR, " Failed to export package list.\n")); > > + return; > > + } > > + > > + FormsetPrivate->HiiPackageListHeader =3D (EFI_HII_PACKAGE_LIST_HEADE= R > > + *)AllocateZeroPool (BufferSize); if (FormsetPrivate->HiiPackageListH= eader =3D=3D > > NULL) { > > + DEBUG ((DEBUG_ERROR, " Failed to allocate memory for the exported > > package list.\n")); > > + return; > > + } > > + > > + Status =3D mRedfishPlatformConfigPrivate->HiiDatabase->ExportPackage= Lists ( > > + mRedfishPlatf= ormConfigPrivate->HiiDatabase, > > + FormsetPrivat= e->HiiHandle, > > + &BufferSize, > > + FormsetPrivat= e->HiiPackageListHeader > > + ); if > > + (EFI_ERROR (Status)) { > > + return; > > + } > > + > > + // > > + // Finding the string package. > > + // > > + EndingPackageAddress =3D (UINTN)FormsetPrivate->HiiPackageListHeader= + > > FormsetPrivate->HiiPackageListHeader->PackageLength; > > + PackageHeader =3D (EFI_HII_PACKAGE_HEADER *)(FormsetPrivate- > > >HiiPackageListHeader + 1); > > + SupportedSchemaLang =3D FormsetPrivate->SupportedSchema.SchemaList; > > + while ((UINTN)PackageHeader < EndingPackageAddress) { > > + switch (PackageHeader->Type) { > > + case EFI_HII_PACKAGE_STRINGS: > > + StringIdMapIsBuilt =3D FALSE; > > + HiiStringPackageHeader =3D (EFI_HII_STRING_PACKAGE_HDR > > + *)PackageHeader; > > + > > + // Check if this is the string package for x-uefi-redfish > > + for (SupportedSchemaLangCount =3D 0; > > + SupportedSchemaLangCount < FormsetPrivate- > > >SupportedSchema.Count; > > + SupportedSchemaLangCount++ > > + ) > > + { > > + if (AsciiStrnCmp ( > > + *(SupportedSchemaLang + SupportedSchemaLangCount), > > + HiiStringPackageHeader->Language, > > + AsciiStrLen (HiiStringPackageHeader->Language) > > + ) =3D=3D 0) > > + { > > + StringIdMapIsBuilt =3D CreateXuefiLanguageStringIdMap (For= msetPrivate, > > HiiStringPackageHeader); > > + 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- > > uefi-redfish string ID map for HII language %a\n", HiiStringPackageHead= er- > > >Language)); > > + } else { > > + DEBUG ((DEBUG_ERROR, " Failed to build x-uefi-redfish str= ing ID map > of > > HII language %a\n", HiiStringPackageHeader->Language)); > > + } > > + } > > + > > + default: > > + PackageHeader =3D (EFI_HII_PACKAGE_HEADER *)((UINTN)PackageHea= der > + > > PackageHeader->Length); > > + } > > + } > > +} > > + > > /** > > Load the HII formset from the given HII handle. > > > > @param[in] HiiHandle Target HII handle to load. > > @param[out] FormsetPrivate The formset private data. > > > > - @retval EFI_STATUS > > + @retval EFI_STATUS The formset is loaded successfully. > > + @retval EFI_UNSUPPORTED This formset doesn't have any x-uefi-red= fish > > configuration. > > > > **/ > > EFI_STATUS > > @@ -875,6 +1584,7 @@ LoadFormset ( > > REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE *HiiStatementPrivate; > > EFI_GUID ZeroGuid; > > EXPRESS_RESULT ExpressionResult; > > + CHAR16 *String; > > > > if ((HiiHandle =3D=3D NULL) || (FormsetPrivate =3D=3D NULL)) { > > return EFI_INVALID_PARAMETER; > > @@ -882,6 +1592,7 @@ LoadFormset ( > > > > HiiFormSet =3D AllocateZeroPool (sizeof (HII_FORMSET)); > > if (HiiFormSet =3D=3D NULL) { > > + DEBUG ((DEBUG_ERROR, "%a: No memory resource for HII_FORMSET - > > + %g\n", __func__, FormsetPrivate->Guid)); > > return EFI_OUT_OF_RESOURCES; > > } > > > > @@ -891,6 +1602,7 @@ LoadFormset ( > > ZeroMem (&ZeroGuid, sizeof (ZeroGuid)); > > Status =3D CreateFormSetFromHiiHandle (HiiHandle, &ZeroGuid, HiiForm= Set); > > if (EFI_ERROR (Status) || IsListEmpty (&HiiFormSet->FormListHead)) { > > + DEBUG ((DEBUG_ERROR, "%a: Formset not found by HII handle - %g\n", > > + __func__, FormsetPrivate->Guid)); > > Status =3D EFI_NOT_FOUND; > > goto ErrorExit; > > } > > @@ -909,7 +1621,11 @@ LoadFormset ( > > FormsetPrivate->DevicePathStr =3D ConvertDevicePathToText (HiiFormSe= t- > > >DevicePath, FALSE, FALSE); > > Status =3D GetSupportedSchema (FormsetPrivate= ->HiiHandle, > > &FormsetPrivate->SupportedSchema); > > if (EFI_ERROR (Status)) { > > - DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%a: No schema from HII > > handle: 0x%x found: %r\n", __func__, FormsetPrivate->HiiHandle, Status)= ); > > + DEBUG ((REDFISH_PLATFORM_CONFIG_DEBUG, "%a: No x-uefi-redfish > > configuration found on the formset - %g\n", __func__, FormsetPrivate->G= uid)); > > + return EFI_UNSUPPORTED; // Can't build AttributeRegistry Meni path= with > > returning EFI_UNSUPPORTED. > > + } else { > > + // Building x-uefi-redfish string database > > + BuildXUefiRedfishStringDatabase (FormsetPrivate); > > } > > > > HiiFormLink =3D GetFirstNode (&HiiFormSet->FormListHead); @@ -919,6 > +1635,7 > > @@ LoadFormset ( > > HiiFormPrivate =3D AllocateZeroPool (sizeof > > (REDFISH_PLATFORM_CONFIG_FORM_PRIVATE)); > > if (HiiFormPrivate =3D=3D NULL) { > > Status =3D EFI_OUT_OF_RESOURCES; > > + DEBUG ((DEBUG_ERROR, "%a: No memory resource for > > + REDFISH_PLATFORM_CONFIG_FORM_PRIVATE.\n", __func__)); > > goto ErrorExit; > > } > > > > @@ -944,6 +1661,7 @@ LoadFormset ( > > > > HiiStatementPrivate =3D AllocateZeroPool (sizeof > > (REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE)); > > if (HiiStatementPrivate =3D=3D NULL) { > > + DEBUG ((DEBUG_ERROR, "%a: No memory resource for > > + REDFISH_PLATFORM_CONFIG_STATEMENT_PRIVATE.\n", __func__)); > > Status =3D EFI_OUT_OF_RESOURCES; > > goto ErrorExit; > > } > > @@ -981,10 +1699,18 @@ LoadFormset ( > > } > > } > > > > - // > > - // Attach to statement list. > > - // > > - InsertTailList (&HiiFormPrivate->StatementList, &HiiStatementPri= vate- > >Link); > > + // Get x-uefi-redfish string using String ID. > > + Status =3D GetXuefiStringAndLangByStringId (FormsetPrivate, > > HiiStatementPrivate->Description, &String, NULL, NULL); > > + if (!EFI_ERROR (Status)) { > > + HiiStatementPrivate->DescriptionStr =3D String; > > + // > > + // Attach to statement list. > > + // > > + InsertTailList (&HiiFormPrivate->StatementList, &HiiStatementP= rivate- > > >Link); > > + } else { > > + FreePool (HiiStatementPrivate); > > + } > > + > > HiiStatementLink =3D GetNextNode (&HiiForm->StatementListHead, > > HiiStatementLink); > > } > > > > @@ -1052,7 +1778,7 @@ LoadFormsetList ( > > // > > Status =3D LoadFormset (HiiHandle, FormsetPrivate); > > if (EFI_ERROR (Status)) { > > - DEBUG ((DEBUG_ERROR, "%a: failed to load formset: %r\n", __func__, > > Status)); > > + DEBUG ((DEBUG_ERROR, "%a: Formset is not loaded for edk2 redfish: > > + %r\n", __func__, Status)); > > FreePool (FormsetPrivate); > > return Status; > > } > > @@ -1325,7 +2051,11 @@ ProcessPendingList ( > > > > Status =3D LoadFormsetList (Target->HiiHandle, FormsetList); > > if (EFI_ERROR (Status)) { > > - DEBUG ((DEBUG_ERROR, "%a: load formset from HII handle: 0x%x f= ailed: > > %r\n", __func__, Target->HiiHandle, Status)); > > + if (Status =3D=3D EFI_UNSUPPORTED) { > > + DEBUG ((DEBUG_ERROR, " The formset has no x-uefi-redfish > > configurations.\n")); > > + } else { > > + DEBUG ((DEBUG_ERROR, " load formset from HII handle: 0x%x f= ailed: > > %r\n", Target->HiiHandle, Status)); > > + } > > } > > } > > > > -- > > 2.37.1.windows.1 >=20 >=20 >=20 >=20 >=20 -=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 (#117151): https://edk2.groups.io/g/devel/message/117151 Mute This Topic: https://groups.io/mt/105159783/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-