From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (NAM04-MW2-obe.outbound.protection.outlook.com [40.107.101.62]) by mx.groups.io with SMTP id smtpd.web11.1818.1658800701117185829 for ; Mon, 25 Jul 2022 18:58:21 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=K1XOtGDb; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.101.62, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fzsu1swlNqLfM1fNWjtxHfg+rwfmL0jCCqNunNcX0Ijs5VgGCPtOE5abzFAHyyb3NAL5GZQv3/2cHsbe7DyB6szsJinsldCLUeuFbO4JfyqIUdE/0dEoO5qa0H8ft6/vl0bcoPDpO5dQ7vbY4xvfN4Ct2YYVZdgSET0ugken9XeekyYG+K9UWtbaZvg3AS6yaPbh6ZNiehGyNqWDY+6FwVrk+N7BsKwDvpLCPCQNdBHdQg4vcfaW9BE/syv//CIoIi6LicO+kTGR2E2iw3K5D9k8C9cTQeIWrhot1mfpfMOd9+vQrJx4oFCXr56Llx5sQHC0jwn0fkGgo2T/mB4dVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jMVdbk8HhuzA7fPKRDkjwOc/nMwe4DQZfKcmyg+0x/U=; b=i2IpLeMVO2dsV9nKoijF0zdyOykRKmu5mUurxonLvV8vOL0Fco5bjWooqFhy2j6NNW6i64iA5uNCkBOwboJ5mwO6u+CNju/c+tBeB5M4I4swLjVHnTTITcxjE/XxbO/DKGA2C6KOEJafMvmOFRAQLYPY6AS8AbJ07vDgQ0q+XpS64RbFhysrNwnYlodapgNo/5I4j3NClhIK0BPj4fR8MY8gijNO+VwfWmR6lfdvmcI1+sAQyImBFi67y7Y7jdt+W0sFczIcFjuPkwlzGVnY5FxKfCa975ALuSOLRP5Fkft2oe6CwDjuhgQJlf5MJphTCXHXHZbZ1U39yhqpb8Jj0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jMVdbk8HhuzA7fPKRDkjwOc/nMwe4DQZfKcmyg+0x/U=; b=K1XOtGDbMyNWS5bMmyU7VwRcy71gMRPlofqqP2nDQ8BYuTOrXWuVhkxUnDSyCCQ/sJ7KPOp+RleM0th/qvcPGkTiOOdFIrabjMPMPPYX6z4I2QC3fgJjXqnqOGBwTQhZYxrXCxXb5Y6e5bd4uiD9x0g6Vd4TooN6hhajQmy01MQ= Received: from MN2PR12MB3966.namprd12.prod.outlook.com (2603:10b6:208:165::18) by IA1PR12MB6602.namprd12.prod.outlook.com (2603:10b6:208:3a2::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.24; Tue, 26 Jul 2022 01:58:18 +0000 Received: from MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::605a:11f4:fc16:8b06]) by MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::605a:11f4:fc16:8b06%5]) with mapi id 15.20.5458.024; Tue, 26 Jul 2022 01:58:17 +0000 From: "Chang, Abner" To: Nickle Wang , "devel@edk2.groups.io" CC: "Yang, Atom" , Nick Ramirez Subject: Re: [edk2-staging][PATCH v2 04/15] edk2-staging/RedfishClientPkg: Introduce Redfish resource config library Thread-Topic: [edk2-staging][PATCH v2 04/15] edk2-staging/RedfishClientPkg: Introduce Redfish resource config library Thread-Index: AQHYn8br6fsjkRrurEm5jL5AuMimja2P5gug Date: Tue, 26 Jul 2022 01:58:17 +0000 Message-ID: References: <20220725013555.926-1-nickle.wang@hpe.com> <20220725013555.926-5-nickle.wang@hpe.com> In-Reply-To: <20220725013555.926-5-nickle.wang@hpe.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2022-07-26T01:58:14Z; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=51390b1d-3868-4a0e-80e1-01edfdb61b5d; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=1 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e9d81745-90aa-41ec-e872-08da6eaa4f36 x-ms-traffictypediagnostic: IA1PR12MB6602:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: X/IdPpOSnMOoVJDYOZX9h6J030kxxIZ5faOWH3MG8Hn+tXLM0E5APXQREE1tQPg/BRrOt8l6fQUiV9u5rdXr3XLvl2SU+Q+rnkwetj5w+4QAknO0CvPmD7HdyGIUtK3qEuZ2jpdFI8+y80sltLMeK5GJsG2snGArgkDjuxYdBqhTZtUEzInu94S6gOg/gStDocTn6aSeB2yoBXdcmsaC2G1EQI8aqM13C0GDcsvkNzCeHuSfOlLWlJpDBIIOEje0mcaC0EjjF2jgvrOf4oERt3yPiRwl/0efA79oSrD/r1Wvn41UX32STiMIblJcvRCVtoYQKecHmObsSnZDbMH8o8EZeDB1E08JeRCcTe04f+QD6dY/q1yznG/+/qVGu0r2lNEjV1PGiouc6pFe/nyQ2vvpV8oWOVL5tKWsWTsRZd1V7/7Z9C1T4ItDJRmbMpfYPhIyG8Bt9GJkNQfHMJoTcc+lVPafi4JSoSsP1c5FQFVu1anZPqfkgEb240+O2KUUcaL2vYpuOkL3ZsGLrv8I/W2oJF6BkmzctchCWNcHlkK8p4cJUWa3nNHkUEUaWvGWuYeXz0E9HVTn/60bn1WlTwrj7YMyp1F5v5jAFjVTeX5U+JOUokqmh3qVQ45U3psNWCiQwN19RrexsZR3KgU1uOW4m76NFngXWWqWbxWwKFlLaB0KLrPK1l+RKw0cxSZy2VuT91w819OUSLI3ldyxkByG4k+h4JyTrXqtnJE6R3AYyOTHZ3iTIfkj+e/y77+wbiRAtm9cxoSsiqWLoHi5Wg7zWk1HerGtva4QzkC0xhg0j9pw16qQtAgrP+Sp8su2 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB3966.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(396003)(366004)(39860400002)(136003)(346002)(376002)(30864003)(71200400001)(6506007)(7696005)(186003)(52536014)(41300700001)(53546011)(8936002)(33656002)(5660300002)(2906002)(478600001)(122000001)(110136005)(54906003)(296002)(38070700005)(316002)(38100700002)(86362001)(64756008)(9686003)(66476007)(66446008)(66556008)(8676002)(83380400001)(4326008)(76116006)(66946007)(55016003)(579004)(559001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?1d0X/Zffx8rgx4IhBv2jYToweoJVlXcyKda8/JQUuQxLNiLVJWpwCqm8cZM7?= =?us-ascii?Q?fCfILhjb2Oj0yifKFcBvBYZ4Ot+pOJHiNfD5yHFPnvQbljCae5G3DWGDJqxN?= =?us-ascii?Q?GlugK6lcEL0/LaC0GroB3Ucg60y8CXhJYuj6yvD4L7Nlwse6gJODT4ogGQD2?= =?us-ascii?Q?39oxETUg44OtGUAvLUZGnM2768TuyO0Ya1YSt3mTkz8j/L53S9l0vCD+vbRY?= =?us-ascii?Q?reMv8BwCHDUpTVxadus8djZELozVqu8aeF29oWxPEfTNMuIDAK+NsVBe+d5U?= =?us-ascii?Q?CtFTElMpGlU5kx1b7Cne7fwMKFdaIJ8sdpelsIYBN/NT5Cq3Z75Qp3LrU4I3?= =?us-ascii?Q?yJwZp+wu0lRbLMPah8e8gmPZC3Tw6sGtepTVSgfFrGufPfTKbBPMqxT5Amq+?= =?us-ascii?Q?H6E+cgdFjwgRYFFzC7trvO1zMUWo92dezDc92xw4l6SCPctkEDUosXiAsyo1?= =?us-ascii?Q?ZVOujEWq895xr/7qQTn+iUWzWZZVUriFrqNbib7baM4WdQ8YTtaE1omistQI?= =?us-ascii?Q?4uNRZDzHAodTq2nXCnPYFmyJSx+F4pXUnw+xtNBva1xZefU8hy/r+of8wyeA?= =?us-ascii?Q?0d8xDk8he9kTvM+AO5kacqTKK01YNc823KGqAObU9ctgG1PG3RAL2bWrlxa0?= =?us-ascii?Q?sBTl9Vne7ldc4H83khQpuXczlu0ks5tPuQbHLJu8pPUq6IHWFKl7c//2+Pm5?= =?us-ascii?Q?KHvktF++NwgMNZggng1B+i7p3jwxL/N5n6x4NZUO2ZJo12lIyJ2CI1KTaj5/?= =?us-ascii?Q?BXxggWRUJmT1kLwyMbj6LJfRGrRQHw8lni7dgr0Aav/zS692+ec3dbtulw2x?= =?us-ascii?Q?hk6cnhuQ2zLpeOvjjxPoQmI0x4JPG2KjEtIGoCYEO6YXJnKBjaALIcRqLXtp?= =?us-ascii?Q?hil6A9vuiCev7g9VMTlQ+dgVeKvBip3Eo4QH9948lR8jN6dKHY0BPd0R1yQK?= =?us-ascii?Q?XSq+0BG76R704qLNgdVswcZk+B2A7d25CYsH8aedTH3chtooXrx7BdD6r1ld?= =?us-ascii?Q?mQOq3keOTkQIZ1+zFbJsk5HPkJnX+ca6CFMZNA/SddmyRoK6JX4QaUIV2Pxx?= =?us-ascii?Q?viA8rADY7BbxjmeKLvUZ1BDWtQ95eVvNS8FbfJny3nVXK8uxAzf0KWT45ale?= =?us-ascii?Q?Mld5cCXlxtZNBNvJ+hw44t34gIWYLZSP7t8bRMUvuF3m9vU0kkXwC7pJuV3c?= =?us-ascii?Q?JJPWEuJAz/gvnJ1EkiPyof4UfDra17iyquQpZheU0wUs3OsoF57hdsJCNNCV?= =?us-ascii?Q?5g3C+TlPYdEjj4p4ZfMoARHJpY7ujBY5fR/DR5URU20LHzG+nkfSHm82sXH9?= =?us-ascii?Q?dnmfQxwRpW3+5MV1WjX9/sLWisWN1n48t59egdPXFRAm0LZ1Bo9BWUkiSZXB?= =?us-ascii?Q?t2TniZNPmswBq+Mf5jutMJkGMoSZMdI/1RWIRcAOC4qy8BDx9dM5/MftB7C/?= =?us-ascii?Q?7Jag5ojF6fKxv9cvflAHyURuT4HxwU/95RghCKu0z3li42rF1L9TxmNIf+Lo?= =?us-ascii?Q?vLoXWxAdjlpXIZRGlUb4nAF4H25CipUzBX9HOAEUb0rWOxR0+SZfC0NizGWv?= =?us-ascii?Q?n7AoOVoMpSrxa4fdafDJsduO9n3rGzn5uBHL+Z0j6AdWm7vnBetzgmi/20q0?= =?us-ascii?Q?R8zWzHkOg3qVaufFy+6XCloYpq6aoFIakSm3gs0jY5J/?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3966.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e9d81745-90aa-41ec-e872-08da6eaa4f36 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jul 2022 01:58:17.8215 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: zBMK0Opu1Xk4HI3TEsSbwCtfngQUtfKtOYlfMSdBkCFgnPujT/yuK1nJAxAo2QdQekpd6KIjLGUCbr9E5mNJKQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6602 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [AMD Official Use Only - General] Comment in line. > -----Original Message----- > From: Nickle Wang > Sent: Monday, July 25, 2022 9:36 AM > To: devel@edk2.groups.io > Cc: Chang, Abner ; Yang, Atom > ; Nick Ramirez > Subject: [edk2-staging][PATCH v2 04/15] edk2-staging/RedfishClientPkg: > Introduce Redfish resource config library >=20 > [CAUTION: External Email] >=20 > Add EdkIIRedfishResourceConfigLib in order to work with Redfish Config > Protocol and do the communication between each feature drivers. Also > introduce Redfish interchange data protocol to exchange data efficiently. >=20 > Signed-off-by: Nickle Wang > Cc: Abner Chang > Cc: Yang Atom > Cc: Nick Ramirez > --- > .../Library/EdkIIRedfishResourceConfigLib.h | 163 +++++ > .../Protocol/EdkIIRedfishInterchangeData.h | 52 ++ > .../EdkIIRedfishResourceConfigLib.c | 593 ++++++++++++++++++ > .../EdkIIRedfishResourceConfigLib.inf | 49 ++ > RedfishClientPkg/RedfishClientLibs.dsc.inc | 1 + > RedfishClientPkg/RedfishClientPkg.dec | 5 +- > 6 files changed, 862 insertions(+), 1 deletion(-) create mode 100644 > RedfishClientPkg/Include/Library/EdkIIRedfishResourceConfigLib.h > create mode 100644 > RedfishClientPkg/Include/Protocol/EdkIIRedfishInterchangeData.h > create mode 100644 > RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResour= ceC > onfigLib.c > create mode 100644 > RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResour= ceC > onfigLib.inf >=20 > diff --git a/RedfishClientPkg/Include/Library/EdkIIRedfishResourceConfigL= ib.h > b/RedfishClientPkg/Include/Library/EdkIIRedfishResourceConfigLib.h > new file mode 100644 > index 0000000000..1e843ec551 > --- /dev/null > +++ b/RedfishClientPkg/Include/Library/EdkIIRedfishResourceConfigLib.h > @@ -0,0 +1,163 @@ > +/** @file > + This file defines the EDKII resource config Library interface. > + > + (C) Copyright 2022 Hewlett Packard Enterprise Development LP
> + > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#ifndef EDKII_REDFISH_RESOURCE_CONFIG_LIB_H_ > +#define EDKII_REDFISH_RESOURCE_CONFIG_LIB_H_ > + > +#include > +#include > +#include > +#include #include > + > +#include > +/** > + Provising redfish resource by given URI. > + > + @param[in] Schema Redfish schema information. > + @param[in] Uri Target URI to create resource. > + @param[in] InformationExchange Pointer to > RESOURCE_INFORMATION_EXCHANGE. > + @param[in] HttpPostMode TRUE if resource does not exist, HTTP= POST > method is used. > + FALSE if the resource exist but some = of properties are > missing, > + HTTP PUT method is used. > + > + @retval EFI_SUCCESS Value is returned successfully. > + @retval Others Some error happened. > + > +**/ > +EFI_STATUS > +EdkIIRedfishResourceConfigProvisionging ( > + IN REDFISH_SCHEMA_INFO *Schema, > + IN EFI_STRING Uri, > + IN RESOURCE_INFORMATION_EXCHANGE *InformationExchange, > + IN BOOLEAN HttpPostMode > + ); > + > +/** > + Consume resource from given URI. > + > + @param[in] Schema Redfish schema information. > + @param[in] Uri The target URI to consume. > + > + @retval EFI_SUCCESS Value is returned successfully. > + @retval Others Some error happened. > + > +**/ > +EFI_STATUS > +EdkIIRedfishResourceConfigConsume ( > + IN REDFISH_SCHEMA_INFO *Schema, > + IN EFI_STRING Uri > + ); > + > + > +/** > + Update resource to given URI. > + > + @param[in] Schema Redfish schema information. > + @param[in] Uri The target URI to consume. > + > + @retval EFI_SUCCESS Value is returned successfully. > + @retval Others Some error happened. > + > +**/ > +EFI_STATUS > +EdkIIRedfishResourceConfigUpdate ( > + IN REDFISH_SCHEMA_INFO *Schema, > + IN EFI_STRING Uri > + ); > + > + > +/** > + Check resource on given URI. > + > + @param[in] Uri The target URI to consume. > + > + @retval EFI_SUCCESS Value is returned successfully. > + @retval Others Some error happened. > + > +**/ > +EFI_STATUS > +EdkIIRedfishResourceConfigCheck ( > + IN REDFISH_SCHEMA_INFO *Schema, > + IN EFI_STRING Uri > + ); > + > +/** > + Identify resource on given URI. > + > + @param[in] Schema Redfish schema information. > + @param[in] Uri The target URI to consume. > + @param[in] InformationExchange Pointer to > RESOURCE_INFORMATION_EXCHANGE. > + > + @retval EFI_SUCCESS This is target resource which we want= to handle. > + @retval EFI_UNSUPPORTED This is not the target resource. > + @retval Others Some error happened. > + > +**/ > +EFI_STATUS > +EdkIIRedfishResourceConfigIdentify ( > + IN REDFISH_SCHEMA_INFO *Schema, > + IN EFI_STRING Uri, > + IN RESOURCE_INFORMATION_EXCHANGE *InformationExchangeUri > + ); > + > +/** > + Set Configure language of this resource in the > + RESOURCE_INFORMATION_EXCHANGE structure. > + > + @param[in] ConfigLangList Pointer to > REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST. > + > + @retval EFI_SUCCESS Configure language is set. > + @retval EFI_UNSUPPORTED > EdkIIRedfishFeatureInterchangeDataProtocol is not found. > + @retval Others Some error happened. > + > +**/ > +EFI_STATUS > +EdkIIRedfishResourceSetConfigureLang ( > + REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST *ConfigLangList > + ); > + > +/** > + > + Get schema information by given protocol and service instance. > + > + @param[in] RedfishService Pointer to Redfish service instance. > + @param[in] JsonStructProtocol Json Structure protocol instance. > + @param[in] Uri Target URI. > + @param[out] SchemaInfo Returned schema information. > + > + @retval EFI_SUCCESS Schema information is returned success= fully. > + @retval Others Errors occur. > + > +**/ > +EFI_STATUS > +GetRedfishSchemaInfo ( > + IN REDFISH_SERVICE *RedfishService, > + IN EFI_REST_JSON_STRUCTURE_PROTOCOL *JsonStructProtocol, > + IN EFI_STRING Uri, > + OUT REDFISH_SCHEMA_INFO *SchemaInfo > + ); > + > +/** > + > + Get supported schema list by given specify schema name. > + > + @param[in] Schema Schema type name. > + @param[out] SchemaInfo Returned schema information. > + > + @retval EFI_SUCCESS Schema information is returned success= fully. > + @retval Others Errors occur. > + > +**/ > +EFI_STATUS > +GetSupportedSchemaVersion ( > + IN CHAR8 *Schema, > + OUT REDFISH_SCHEMA_INFO *SchemaInfo > + ); > + > +#endif > diff --git a/RedfishClientPkg/Include/Protocol/EdkIIRedfishInterchangeDat= a.h > b/RedfishClientPkg/Include/Protocol/EdkIIRedfishInterchangeData.h > new file mode 100644 > index 0000000000..e8d0462fb7 > --- /dev/null > +++ b/RedfishClientPkg/Include/Protocol/EdkIIRedfishInterchangeData.h > @@ -0,0 +1,52 @@ > +/** @file > + This file defines the > EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL interface. > + > + (C) Copyright 2022 Hewlett Packard Enterprise Development LP
> + > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#ifndef EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_H_ > +#define EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_H_ > + > +#include > + > +typedef struct _EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL > +EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL; > + > +#define EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL_GUID \ > + { \ > + 0x4B8FF71C, 0x4A7B, 0x9478, { 0xB7, 0x81, 0x35, 0x9B, 0x0A, 0xF2, = 0x00, > 0x91 } \ > + } > + > +typedef enum { > + InformationTypeNone =3D 0, ///< Invalid informat= ion. > + InformationTypeCollectionMemberUri, ///< URI to the new cre= ated > collection member. > + InformationTypeCollectionMemberConfigLanguage, ///< URI to the new > created collection member. > + InformationTypeMax > +} RESOURCE_INFORMATION_EXCHANGE_TYPE; > + > +typedef struct { > + RESOURCE_INFORMATION_EXCHANGE_TYPE Type; > + EFI_STRING ParentUri; ///< The parent URI (in configure l= anguage) of > the resource to process. > + EFI_STRING PropertyName; ///< The property name of the resou= rce to > process. > + EFI_STRING FullUri; ///< The full URI (in configure lan= guage) of the > resource to process. > +} RESOURCE_INFORMATION_SEND; > + > +typedef struct { > + RESOURCE_INFORMATION_EXCHANGE_TYPE Type; > + REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST > ConfigureLanguageList; } > +RESOURCE_INFORMATION_RETURNED; > + > +typedef struct { > + RESOURCE_INFORMATION_SEND SendInformation; > + RESOURCE_INFORMATION_RETURNED ReturnedInformation; > +} RESOURCE_INFORMATION_EXCHANGE; > + > +struct _EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL { > + RESOURCE_INFORMATION_EXCHANGE *ResourceInformationExchage; }; > + > +extern EFI_GUID gEdkIIRedfishFeatureInterchangeDataProtocolGuid; > + > +#endif > diff --git > a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishReso= urc > eConfigLib.c > b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishReso= urc > eConfigLib.c > new file mode 100644 > index 0000000000..d09da6bd67 > --- /dev/null > +++ b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfis > +++ hResourceConfigLib.c > @@ -0,0 +1,593 @@ > +/** @file > + Redfish resource config library implementation > + > + (C) Copyright 2022 Hewlett Packard Enterprise Development LP
> + > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > +#include > +#include > +#include > +#include > +#include #include > + > +#include > +#include > +#include > + > +EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL > *mRedfishResourceConfigProtocol =3D NULL; > +EFI_HANDLE medfishResourceConfigProtocolHand= le; > +EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL > mRedfishFeatureInterchangeData; > +REDFISH_SCHEMA_INFO mSchemaInfoCache; > + > +#define SCHEMA_NAME_PREFIX_OFFSET 15 // x-uefi-redfish- Could we define a string macro for "x-uefi-redfish-" and use strlen to obta= in the length of schema name prefix in code? Abner > + > +/** > + > + Get schema information by given protocol and service instance. > + > + @param[in] RedfishService Pointer to Redfish service instance. > + @param[in] JsonStructProtocol Json Structure protocol instance. > + @param[in] Uri Target URI. > + @param[out] SchemaInfo Returned schema information. > + > + @retval EFI_SUCCESS Schema information is returned success= fully. > + @retval Others Errors occur. > + > +**/ > +EFI_STATUS > +GetRedfishSchemaInfo ( > + IN REDFISH_SERVICE *RedfishService, > + IN EFI_REST_JSON_STRUCTURE_PROTOCOL *JsonStructProtocol, > + IN EFI_STRING Uri, > + OUT REDFISH_SCHEMA_INFO *SchemaInfo > + ) > +{ > + EFI_STATUS Status; > + REDFISH_RESPONSE Response; > + REDFISH_PAYLOAD Payload; > + CHAR8 *JsonText; > + EFI_REST_JSON_STRUCTURE_HEADER *Header; > + > + if (RedfishService =3D=3D NULL || JsonStructProtocol =3D=3D NULL || > IS_EMPTY_STRING (Uri) || SchemaInfo =3D=3D NULL) { > + return EFI_INVALID_PARAMETER; > + } > + > + Status =3D GetResourceByUri (RedfishService, Uri, &Response); if > + (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "%a, failed to get resource from %s: %r", > __FUNCTION__, Uri, Status)); > + return Status; > + } > + > + Payload =3D Response.Payload; > + ASSERT (Payload !=3D NULL); > + > + JsonText =3D JsonDumpString (RedfishJsonInPayload (Payload), > + EDKII_JSON_COMPACT); ASSERT (JsonText !=3D NULL); > + > + // > + // Convert JSON text to C structure. > + // > + Status =3D JsonStructProtocol->ToStructure ( > + JsonStructProtocol, > + NULL, > + JsonText, > + &Header > + ); > + if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "%a, ToStructure() failed: %r\n", __FUNCTION__, > Status)); > + return Status; > + } > + > + AsciiStrCpyS (SchemaInfo->Schema, REDFISH_SCHEMA_STRING_SIZE, > + Header->JsonRsrcIdentifier.NameSpace.ResourceTypeName); > + AsciiStrCpyS (SchemaInfo->Major, REDFISH_SCHEMA_VERSION_SIZE, > + Header->JsonRsrcIdentifier.NameSpace.MajorVersion); > + AsciiStrCpyS (SchemaInfo->Minor, REDFISH_SCHEMA_VERSION_SIZE, > + Header->JsonRsrcIdentifier.NameSpace.MinorVersion); > + AsciiStrCpyS (SchemaInfo->Errata, REDFISH_SCHEMA_VERSION_SIZE, > + Header->JsonRsrcIdentifier.NameSpace.ErrataVersion); > + > + // > + // Release resource. > + // > + JsonStructProtocol->DestoryStructure (JsonStructProtocol, Header); > + FreePool (JsonText); RedfishFreeResponse (Response.StatusCode, > + Response.HeaderCount, Response.Headers, Response.Payload); > + > + return EFI_SUCCESS; > +} > + > +/** > + > + Get supported schema list by given specify schema name. > + > + @param[in] Schema Schema type name. > + @param[out] SchemaInfo Returned schema information. > + > + @retval EFI_SUCCESS Schema information is returned success= fully. > + @retval Others Errors occur. > + > +**/ > +EFI_STATUS > +GetSupportedSchemaVersion ( > + IN CHAR8 *Schema, > + OUT REDFISH_SCHEMA_INFO *SchemaInfo > + ) > +{ > + EFI_STATUS Status; > + CHAR8 *SupportSchema; > + CHAR8 *SchemaName; > + UINTN Index; > + UINTN Index2; > + BOOLEAN Found; > + > + if (IS_EMPTY_STRING (Schema) || SchemaInfo =3D=3D NULL) { > + return EFI_INVALID_PARAMETER; > + } > + > + Status =3D RedfishPlatformConfigGetSupportedSchema (NULL, > + &SupportSchema); if (EFI_ERROR (Status)) { > + return Status; > + } > + > + DEBUG ((DEBUG_INFO, "Supported schema: %a\n", SupportSchema)); > + > + Index =3D 0; > + Found =3D FALSE; > + SchemaName =3D SupportSchema; > + while (TRUE) { > + > + if (SupportSchema[Index] =3D=3D ';' || SupportSchema[Index] =3D=3D '= \0') { > + if (AsciiStrnCmp (&SchemaName[SCHEMA_NAME_PREFIX_OFFSET], Schema, > AsciiStrLen (Schema)) =3D=3D 0) { > + Found =3D TRUE; > + SupportSchema[Index] =3D '\0'; > + break; > + } > + > + SchemaName =3D &SupportSchema[Index + 1]; > + } > + > + if (SupportSchema[Index] =3D=3D '\0') { > + break; > + } > + > + ++Index; > + } > + > + if (Found) { > + > + AsciiStrCpyS (SchemaInfo->Schema, REDFISH_SCHEMA_STRING_SIZE, > + Schema); > + > + // > + // forward to '.' > + // > + Index =3D 0; > + while (SchemaName[Index] !=3D '\0' && SchemaName[Index] !=3D '.') { > + ++Index; > + } > + ASSERT (SchemaName[Index] !=3D '\0'); > + > + // > + // Skip '.' and 'v' > + // > + Index +=3D 2; > + > + // > + // forward to '_' > + // > + Index2 =3D Index; > + while (SchemaName[Index2] !=3D '\0' && SchemaName[Index2] !=3D '_')= { > + ++Index2; > + } > + ASSERT (SchemaName[Index2] !=3D '\0'); > + > + AsciiStrnCpyS (SchemaInfo->Major, REDFISH_SCHEMA_VERSION_SIZE, > &SchemaName[Index], (Index2 - Index)); > + Index =3D Index2; > + > + // > + // Skip '_' > + // > + ++Index; > + > + // > + // forward to '_' > + // > + Index2 =3D Index; > + while (SchemaName[Index2] !=3D '\0' && SchemaName[Index2] !=3D '_')= { > + ++Index2; > + } > + ASSERT (SchemaName[Index2] !=3D '\0'); > + > + AsciiStrnCpyS (SchemaInfo->Minor, REDFISH_SCHEMA_VERSION_SIZE, > &SchemaName[Index], (Index2 - Index)); > + Index =3D Index2; > + > + // > + // Skip '_' > + // > + ++Index; > + > + AsciiStrCpyS (SchemaInfo->Errata, REDFISH_SCHEMA_VERSION_SIZE, > + &SchemaName[Index]); } > + > + FreePool (SupportSchema); > + > + return (Found ? EFI_SUCCESS : EFI_NOT_FOUND); } > + > + > +/** > + > + Find Redfish Resource Config Protocol that supports given schema and v= ersion. > + > + @param[in] Schema Schema name. > + @param[out] Handle Pointer to receive the handle that has > EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL > + installed on it. > + > + @retval EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL * Pointer to > protocol > + @retval NULL No protocol fo= und. > + > +**/ > +EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL * > +GetRedfishResourceConfigProtocol ( > + IN REDFISH_SCHEMA_INFO *Schema, > + OUT EFI_HANDLE *Handle OPTIONAL > + ) > +{ > + EFI_STATUS Status; > + EFI_HANDLE *HandleBuffer; > + UINTN NumberOfHandles; > + UINTN Index; > + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *Protocol; > + REDFISH_SCHEMA_INFO SchemaInfo; > + BOOLEAN Found; > + > + if (IS_EMPTY_STRING (Schema->Schema) || > + IS_EMPTY_STRING (Schema->Major) || > + IS_EMPTY_STRING (Schema->Minor) || > + IS_EMPTY_STRING (Schema->Errata) > + ) { > + return NULL; > + } > + > + if (mRedfishResourceConfigProtocol !=3D NULL) { > + if (AsciiStrCmp (Schema->Schema, mSchemaInfoCache.Schema) =3D=3D 0 &= & > + AsciiStrCmp (Schema->Major, mSchemaInfoCache.Major) =3D=3D 0 && > + AsciiStrCmp (Schema->Minor, mSchemaInfoCache.Minor) =3D=3D 0 && > + AsciiStrCmp (Schema->Errata, mSchemaInfoCache.Errata) =3D=3D 0) = { > + if (Handle !=3D NULL) { > + *Handle =3D medfishResourceConfigProtocolHandle; > + } > + return mRedfishResourceConfigProtocol; > + } > + } > + > + Status =3D gBS->LocateHandleBuffer ( > + ByProtocol, > + &gEdkIIRedfishResourceConfigProtocolGuid, > + NULL, > + &NumberOfHandles, > + &HandleBuffer > + ); > + if (EFI_ERROR (Status)) { > + return NULL; > + } > + > + Found =3D FALSE; > + > + for (Index =3D 0; Index < NumberOfHandles; Index++) { > + Status =3D gBS->HandleProtocol ( > + HandleBuffer[Index], > + &gEdkIIRedfishResourceConfigProtocolGuid, > + (VOID **) &Protocol > + ); > + if (EFI_ERROR (Status)) { > + continue; > + } > + > + Status =3D Protocol->GetInfo (Protocol, &SchemaInfo); > + if (EFI_ERROR (Status)) { > + continue; > + } > + > + if (AsciiStrCmp (Schema->Schema, SchemaInfo.Schema) =3D=3D 0 && > + AsciiStrCmp (Schema->Major, SchemaInfo.Major) =3D=3D 0 && > + AsciiStrCmp (Schema->Minor, SchemaInfo.Minor) =3D=3D 0 && > + AsciiStrCmp (Schema->Errata, SchemaInfo.Errata) =3D=3D 0) { > + Found =3D TRUE; > + break; > + } > + } > + > + if (Found) { > + medfishResourceConfigProtocolHandle =3D HandleBuffer[Index]; > + mRedfishResourceConfigProtocol =3D Protocol; > + CopyMem (&mSchemaInfoCache, Schema, sizeof (REDFISH_SCHEMA_INFO)); > + if (Handle !=3D NULL) { > + *Handle =3D HandleBuffer[Index]; > + } > + } > + FreePool(HandleBuffer); > + > + return (Found ? Protocol : NULL); > +} > + > +/** > + Install EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL > + on child feature driver handle. > + > + @param[in] Handle Handle to install > EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL. > + @param[in] InformationExchange Pointer to > RESOURCE_INFORMATION_EXCHANGE. > + > + @retval EFI_SUCCESS Value is returned successfully. > + @retval Others Some error happened. > + > +**/ > +EFI_STATUS > +InstallInterchangeDataProtocol ( > + IN EFI_HANDLE Handle, > + IN RESOURCE_INFORMATION_EXCHANGE *InformationExchange > + ) > +{ > + EFI_STATUS Status; > + EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL *Interface; > + > + Status =3D gBS->HandleProtocol ( > + Handle, > + &gEdkIIRedfishFeatureInterchangeDataProtocolGuid, > + (VOID **)&Interface > + ); > + if (!EFI_ERROR (Status)) { > + Interface->ResourceInformationExchage =3D InformationExchange; > + return EFI_SUCCESS; > + } > + if (Status =3D=3D EFI_UNSUPPORTED) { > + mRedfishFeatureInterchangeData.ResourceInformationExchage =3D > InformationExchange; > + Status =3D gBS->InstallProtocolInterface ( > + &Handle, > + &gEdkIIRedfishFeatureInterchangeDataProtocolGuid, > + EFI_NATIVE_INTERFACE, > + (VOID *)&mRedfishFeatureInterchangeData > + ); > + } > + return Status; > +} > + > +/** > + Set Configure language of this resource in the > + RESOURCE_INFORMATION_EXCHANGE structure. > + > + @param[in] ConfigLangList Pointer to > REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST. > + > + @retval EFI_SUCCESS Configure language is set. > + @retval EFI_UNSUPPORTED > EdkIIRedfishFeatureInterchangeDataProtocol is not found. > + @retval Others Some error happened. > + > +**/ > +EFI_STATUS > +EdkIIRedfishResourceSetConfigureLang ( > + REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST *ConfigLangList > + ) > +{ > + EFI_STATUS Status; > + UINTN Index; > + EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL *Interface; > + > + Status =3D gBS->HandleProtocol ( > + medfishResourceConfigProtocolHandle, > + &gEdkIIRedfishFeatureInterchangeDataProtocolGuid, > + (VOID **)&Interface > + ); > + if (EFI_ERROR (Status)){ > + DEBUG ((DEBUG_ERROR, "%a, > EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL is not installed %r", > __FUNCTION__, Status)); > + return Status; > + } > + Interface->ResourceInformationExchage->ReturnedInformation.Type =3D > +InformationTypeCollectionMemberConfigLanguage; > + > +Interface->ResourceInformationExchage->ReturnedInformation.ConfigureLan > +guageList.Count =3D ConfigLangList->Count; > + Interface->ResourceInformationExchage- > >ReturnedInformation.ConfigureLanguageList.List =3D > + AllocateZeroPool(sizeof (REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG) * > +ConfigLangList->Count); > + if (Interface->ResourceInformationExchage- > >ReturnedInformation.ConfigureLanguageList.List =3D=3D NULL) { > + DEBUG ((DEBUG_ERROR, "%a, Fail to allocate memory for > REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG.\n", __FUNCTION__)); > + return EFI_OUT_OF_RESOURCES; > + } > + for (Index =3D 0; Index < ConfigLangList->Count; Index++) { > + Interface->ResourceInformationExchage- > >ReturnedInformation.ConfigureLanguageList.List [Index].Index =3D > ConfigLangList->List[Index].Index; > + Interface->ResourceInformationExchage- > >ReturnedInformation.ConfigureLanguageList.List [Index].ConfigureLang =3D > + > +(EFI_STRING)AllocateCopyPool(StrSize(ConfigLangList->List[Index].Config > +ureLang), (VOID *)ConfigLangList->List[Index].ConfigureLang); > + } > + return EFI_SUCCESS; > +} > + > +/** > + Provising redfish resource by given URI. > + > + @param[in] Schema Redfish schema information. > + @param[in] Uri Target URI to create resource. > + @param[in] InformationExchange Pointer to > RESOURCE_INFORMATION_EXCHANGE. > + @param[in] HttpPostMode TRUE if resource does not exist, HTTP= POST > method is used. > + FALSE if the resource exist but some = of properties are > missing, > + HTTP PUT method is used. > + > + @retval EFI_SUCCESS Value is returned successfully. > + @retval Others Some error happened. > + > +**/ > +EFI_STATUS > +EdkIIRedfishResourceConfigProvisionging ( > + IN REDFISH_SCHEMA_INFO *Schema, > + IN EFI_STRING Uri, > + IN RESOURCE_INFORMATION_EXCHANGE *InformationExchange, > + IN BOOLEAN HttpPostMode > + ) > +{ > + EFI_HANDLE Handle; > + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *protocol; > + > + protocol =3D GetRedfishResourceConfigProtocol (Schema, &Handle); if > + (protocol =3D=3D NULL || Handle =3D=3D NULL) { > + return EFI_DEVICE_ERROR; > + } > + > + // > + // Install EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL on the > +child > + // feature driver handle. > + // > + InstallInterchangeDataProtocol (Handle, InformationExchange); > + return protocol->Provisioning(protocol, Uri, HttpPostMode); } > + > +/** > + Consume resource from given URI. > + > + @param[in] Schema Redfish schema information. > + @param[in] Uri The target URI to consume. > + > + @retval EFI_SUCCESS Value is returned successfully. > + @retval Others Some error happened. > + > +**/ > +EFI_STATUS > +EdkIIRedfishResourceConfigConsume ( > + IN REDFISH_SCHEMA_INFO *Schema, > + IN EFI_STRING Uri > + ) > +{ > + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *protocol; > + > + protocol =3D GetRedfishResourceConfigProtocol (Schema, NULL); if > + (protocol =3D=3D NULL) { > + return EFI_DEVICE_ERROR; > + } > + > + return protocol->Consume (protocol, Uri); } > + > + > +/** > + Update resource to given URI. > + > + @param[in] Schema Redfish schema information. > + @param[in] Uri The target URI to consume. > + > + @retval EFI_SUCCESS Value is returned successfully. > + @retval Others Some error happened. > + > +**/ > +EFI_STATUS > +EdkIIRedfishResourceConfigUpdate ( > + IN REDFISH_SCHEMA_INFO *Schema, > + IN EFI_STRING Uri > + ) > +{ > + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *protocol; > + > + protocol =3D GetRedfishResourceConfigProtocol (Schema, NULL); if > + (protocol =3D=3D NULL) { > + return EFI_DEVICE_ERROR; > + } > + > + return protocol->Update (protocol, Uri); } > + > +/** > + Check resource on given URI. > + > + @param[in] Schema Redfish schema information. > + @param[in] Uri The target URI to consume. > + > + @retval EFI_SUCCESS Value is returned successfully. > + @retval Others Some error happened. > + > +**/ > +EFI_STATUS > +EdkIIRedfishResourceConfigCheck ( > + IN REDFISH_SCHEMA_INFO *Schema, > + IN EFI_STRING Uri > + ) > +{ > + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *protocol; > + > + protocol =3D GetRedfishResourceConfigProtocol (Schema, NULL); if > + (protocol =3D=3D NULL) { > + return EFI_DEVICE_ERROR; > + } > + > + return protocol->Check (protocol, Uri); } > + > +/** > + Identify resource on given URI. > + > + @param[in] Schema Redfish schema information. > + @param[in] Uri The target URI to consume. > + @param[in] InformationExchange Pointer to > RESOURCE_INFORMATION_EXCHANGE. > + > + @retval EFI_SUCCESS This is target resource which we want= to handle. > + @retval EFI_UNSUPPORTED This is not the target resource. > + @retval Others Some error happened. > + > +**/ > +EFI_STATUS > +EdkIIRedfishResourceConfigIdentify ( > + IN REDFISH_SCHEMA_INFO *Schema, > + IN EFI_STRING Uri, > + IN RESOURCE_INFORMATION_EXCHANGE *InformationExchange > + ) > +{ > + EFI_HANDLE Handle; > + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *protocol; > + > + protocol =3D GetRedfishResourceConfigProtocol (Schema, &Handle); if > + (protocol =3D=3D NULL) { > + return EFI_DEVICE_ERROR; > + } > + > + // > + // Install EDKII_REDFISH_FEATURE_INTERCHANGE_DATA_PROTOCOL on the > +child > + // feature driver handle. > + // > + InstallInterchangeDataProtocol (Handle, InformationExchange); > + return protocol->Identify (protocol, Uri); } > + > +/** > + > + Initial resource config library instace. > + > + @param[in] ImageHandle The image handle. > + @param[in] SystemTable The system table. > + > + @retval EFI_SUCEESS Install Boot manager menu success. > + @retval Other Return error status. > + > +**/ > +EFI_STATUS > +EFIAPI > +RedfishResourceConfigConstructor ( > + IN EFI_HANDLE ImageHandle, > + IN EFI_SYSTEM_TABLE *SystemTable > + ) > +{ > + mRedfishResourceConfigProtocol =3D NULL; > + ZeroMem (&mSchemaInfoCache, sizeof (REDFISH_SCHEMA_INFO)); > + > + return EFI_SUCCESS; > +} > + > +/** > + Release allocated resource. > + > + @param[in] ImageHandle Handle that identifies the image to be un= loaded. > + @param[in] SystemTable The system table. > + > + @retval EFI_SUCCESS The image has been unloaded. > + > +**/ > +EFI_STATUS > +EFIAPI > +RedfishResourceConfigDestructor ( > + IN EFI_HANDLE ImageHandle, > + IN EFI_SYSTEM_TABLE *SystemTable > + ) > +{ > + mRedfishResourceConfigProtocol =3D NULL; > + > + return EFI_SUCCESS; > +} > diff --git > a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishReso= urc > eConfigLib.inf > b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishReso= urc > eConfigLib.inf > new file mode 100644 > index 0000000000..0da3423d26 > --- /dev/null > +++ b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfis > +++ hResourceConfigLib.inf > @@ -0,0 +1,49 @@ > +## @file > +# > +# (C) Copyright 2022 Hewlett Packard Enterprise Development LP
# # > +SPDX-License-Identifier: BSD-2-Clause-Patent # ## > + > +[Defines] > + INF_VERSION =3D 0x00010006 > + BASE_NAME =3D EdkIIRedfishResourceConfigLib > + FILE_GUID =3D B41884F6-693B-4ADE-9558-5C220A24A02= 5 > + MODULE_TYPE =3D DXE_DRIVER > + VERSION_STRING =3D 1.0 > + LIBRARY_CLASS =3D EdkIIRedfishResourceConfigLib| DXE_= DRIVER > + CONSTRUCTOR =3D RedfishResourceConfigConstructor > + DESTRUCTOR =3D RedfishResourceConfigDestructor > + > +# > +# VALID_ARCHITECTURES =3D IA32 X64 EBC > +# > + > +[Sources] > + EdkIIRedfishResourceConfigLib.c > + > +[Packages] > + MdePkg/MdePkg.dec > + MdeModulePkg/MdeModulePkg.dec > + RedfishPkg/RedfishPkg.dec > + RedfishClientPkg/RedfishClientPkg.dec > + > +[LibraryClasses] > + BaseLib > + DebugLib > + UefiBootServicesTableLib > + BaseMemoryLib > + PcdLib > + MemoryAllocationLib > + RedfishFeatureUtilityLib > + RedfishPlatformConfigLib > + > +[Protocols] > + gEdkIIRedfishResourceConfigProtocolGuid ## CONSUMES ## > + gEdkIIRedfishFeatureInterchangeDataProtocolGuid ## CONSUMES ## > + > +[Pcd] > + gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaStringSize > + gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaVersionSize > + > diff --git a/RedfishClientPkg/RedfishClientLibs.dsc.inc > b/RedfishClientPkg/RedfishClientLibs.dsc.inc > index 1cf0406912..8acb479170 100644 > --- a/RedfishClientPkg/RedfishClientLibs.dsc.inc > +++ b/RedfishClientPkg/RedfishClientLibs.dsc.inc > @@ -28,5 +28,6 @@ >=20 > RedfishContentCodingLib|RedfishPkg/Library/RedfishContentCodingLibNull/Re= d > fishContentCodingLibNull.inf >=20 > ConverterCommonLib|RedfishClientPkg/ConverterLib/edk2library/ConverterCo > mmonLib/ConverterCommonLib.inf >=20 > + > + EdkIIRedfishResourceConfigLib|RedfishClientPkg/Library/EdkIIRedfishRes > + ourceConfigLib/EdkIIRedfishResourceConfigLib.inf > RedfishEventLib|RedfishClientPkg/Library/RedfishEventLib/RedfishEventL= ib.inf >=20 > RedfishVersionLib|RedfishClientPkg/Library/RedfishVersionLib/RedfishVersi= onLi > b.inf > diff --git a/RedfishClientPkg/RedfishClientPkg.dec > b/RedfishClientPkg/RedfishClientPkg.dec > index 2ce51d14af..9d18c42c24 100644 > --- a/RedfishClientPkg/RedfishClientPkg.dec > +++ b/RedfishClientPkg/RedfishClientPkg.dec > @@ -1,7 +1,7 @@ > ## @file > # Redfish Client Package > # > -# (C) Copyright 2021 Hewlett Packard Enterprise Development LP
> +# (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP
> # > # SPDX-License-Identifier: BSD-2-Clause-Patent ## @@ -21,6 +21,7 @@ >=20 > [LibraryClasses] > RedfishFeatureUtilityLib|Include/Library/RedfishFeatureUtilityLib.h > + > + EdkIIRedfishResourceConfigLib|Include/Library/EdkIIRedfishResourceConf > + igLib.h > RedfishEventLib|Include/Library/RedfishEventLib.h > RedfishVersionLib|Include/Library/RedfishVersionLib.h >=20 > @@ -36,6 +37,8 @@ > gEdkIIRedfishResourceConfigProtocolGuid =3D { 0x6f164c68, 0xfb09, 0x46= 46, > { 0xa8, 0xd3, 0x24, 0x11, 0x5d, 0xab, 0x3e, 0xe7 } } > ## Include/Protocol/EdkiiRedfishETagProtocol.h > gEdkIIRedfishETagProtocolGuid =3D { 0x5706d368, 0xaf66, 0x48= f5, { 0x89, > 0xfc, 0xa6, 0x61, 0xce, 0xb5, 0xa6, 0xa9 } } > + ## Include/Protocol/EdkIIRedfishInterchangeData.h > + gEdkIIRedfishFeatureInterchangeDataProtocolGuid =3D { 0x4B8FF71C, > + 0x4A7B, 0x9478, { 0xB7, 0x81, 0x35, 0x9B, 0x0A, 0xF2, 0x00, 0x91 } } >=20 > [Guids] > ## Include/Guid/RedfishClientPkgTokenSpace.h > -- > 2.32.0.windows.2