From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.86]) by mx.groups.io with SMTP id smtpd.web09.28738.1658979799848258610 for ; Wed, 27 Jul 2022 20:43:20 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=s2GegCad; 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.243.86, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OyzXguVA/GJ2MEnjyCd7AouBqLeHWCzZvvXUd1Fstw/i4DF6h3zjBE6zO4u/5Xtk+dBQOPqQ/QsQdRj8wFTSI/MrQ4flsBS/hg2rBw74t/kLz0XhbHFWZggDZZGL8AdtmET493NuX50BdORq46JEQAPT/b3wuFrWF4wbZ2R2JpTzBPouTlJzy1SHzNSsC/gNvNmIxgpURGPow3IifjM6fI/9pEAj/YjXO0hIgiLmJCVMHLq1FCBiMJeCx7tNoxIqtJmqIwsRqkbbCgZpArKoieGZwspmRVmNeaZ5oZhwY+uJEdy/UORxap8eQ4bW5XHqfjK4GnSUktH2pKp6o6UChg== 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=3Lw8nYrGbzRrXS0lPLOYuccy0xLsuXHGNa1wBZ12nWI=; b=f8Vh9+PCH5j6KyNrqp1MojoOc3BIMdrZIiC99djfuL8DgMbvW5ACBx8J5WfJeuMOOF33tbPLK8Gtv0SmlkcPkba2Ajxv4gXWZuOE/NmaeK+k2hVzvFAA230z7OPDLl4qHKd1hS9UkNxNq1hh3seCkSdRmX8EiSUfmrkXdjVpGHX2PIgN97dBq6lMYcJRqXUMI60CnG85skF32iPpGag0oYG+NC2AnNnt6XNaTKzaEQ99KRA46VrdcCkw3f2gPHsheFeOUUEGbwft7wZcqHX+1YFpO+XjJrVUYJxcxUEfyHLiNB62Jcyz1noHxNRwtmdEeYs6cZIRSMWv0bVcOIVI0g== 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=3Lw8nYrGbzRrXS0lPLOYuccy0xLsuXHGNa1wBZ12nWI=; b=s2GegCad68gsT/pVrQnw2UHXJnwnwos2TfNplNdIaf9x9zm4/5AYuk+2GRbYYjzhoznUgZ6nYfjQI+QFl3P9LqpPM2hDNlv+Gf7U8mrmaztu2swLOSIpJFreQp7XVFQiUC2IMGtuYt+IOkdl6JOFmoe9YiwDYUy1gmCyRkVTORM= Received: from MN2PR12MB3966.namprd12.prod.outlook.com (2603:10b6:208:165::18) by CY4PR1201MB2486.namprd12.prod.outlook.com (2603:10b6:903:d6::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.6; Thu, 28 Jul 2022 03:43:13 +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.025; Thu, 28 Jul 2022 03:43:13 +0000 From: "Chang, Abner" To: Nickle Wang , "devel@edk2.groups.io" CC: "Yang, Atom" , Nick Ramirez Subject: Re: [edk2-staging][PATCH v3 12/15] edk2-staging/RedfishClientPkg: Rename Memory feature driver Thread-Topic: [edk2-staging][PATCH v3 12/15] edk2-staging/RedfishClientPkg: Rename Memory feature driver Thread-Index: AQHYoVmTQKfzeJRkvkmRlIiWk+X9+q2TJVeA Date: Thu, 28 Jul 2022 03:43:13 +0000 Message-ID: References: <20220727013802.247-1-nickle.wang@hpe.com> <20220727013802.247-13-nickle.wang@hpe.com> In-Reply-To: <20220727013802.247-13-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-28T03:43:09Z; 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=defcb78d-a97f-4578-9f44-f135ae6f17cc; 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: 6c60ec97-877a-43db-1c35-08da704b4c8c x-ms-traffictypediagnostic: CY4PR1201MB2486:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: kfu23kRPS3insI0EcDdnNZwIDFQ/lRbDBpHxgM3O/KRzUNEWUnaGFVPY1jEMRXDHy9nlXVE1Ydl02q2z0txCx2QGBTC1JaFxNSgjlRQiL0SsTQ+aPvtzzL6J6yfgqL6JKfVWFxMLAgqXQMRqmXOAehAVbv1KCf98nHA0M5z1NYFS1Q/zEihRAxb/+Z06NdT2vy1aG32XxRjS4VUsZ/xj52fZfc5oVx6rCaWfb0+iwXhpUYBhiP5sLCoPBLjgH7bztqFnrgrxP33t/HfbUhX+IdIVstAMsYjmvisdE/R6ClI5BC8e8MfYG+hOmDXc9jykkLuv7GW5P3iwkWnxfpLyvE/Ta7xMEV4C53iO3H7NmgBY9ikWI3fvMRMZhPoYBblwN7PhyH6Y8FZ/L3W4he63jjK7iRDoXOPySK8PQcQkjM6tl2N/d3OH6uFDuV7i1jebYppLkxMmF/K5fQ9InCO5dJxMGO5lk2BWlSf5m7WEFcbD3gjoM3DIY/YkdTBWRNCXEjsfVDM7JOMDm3zMrJO4SvAvC1vTAgOcXrjhQtjMBClRwV3a/m83tlTbuAg2Krcs3P82sJhROPdA98i4KifwqdQdbswaQEcDmsUaBS+B2i7QnfAq30zKYK8PwcWApGMPkFgT0wmv31zHbLWR2GIrXXCCwK6m3pW1WCQsFvw/sqXSh65Q11vIDz9un0N9qggMkSTMqu4QkYjeFAEEH+5y46hl2PuSX5DFhpE/N0ZqLNbKUvyKeIwVGAc5AjrsktKEjWgrxxoZjMZ03xJ7GednRov8x9FVybZWs4/3Aji9iNZmtqKJfWS4ZcZqpF6oFcJDFUiGjw8KiXfcqVPZttw2xfIx036TONCcFoNx+CAFSps= 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)(39860400002)(396003)(136003)(376002)(366004)(346002)(6506007)(52536014)(5660300002)(8936002)(30864003)(64756008)(66476007)(66556008)(66446008)(4326008)(8676002)(296002)(55016003)(316002)(966005)(45080400002)(2906002)(33656002)(71200400001)(38100700002)(7696005)(26005)(54906003)(110136005)(41300700001)(478600001)(86362001)(122000001)(9686003)(53546011)(66946007)(83380400001)(76116006)(186003)(38070700005)(579004)(559001)(44824005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?z3Pw9wmYo8MUT1OVFHvUVRN+Q/WZO8LBMnumFnhgBVs0A5XBVYcj1a4QDjJl?= =?us-ascii?Q?cJtm5en6b0ZNzebUC68Mebt6QVmVmkzdvxlhmGASUVWV3oFq4yUp6AibUN+d?= =?us-ascii?Q?7i/yC353tb3rH9p7+KtlFdErVNOFd8s05TZzEkr9tAseSqsvAtUL0QbIBf9J?= =?us-ascii?Q?8GlDundTeNZxcukBJ4/J/1IZRdXz4rQRgktYaLDORKVi/p3kwmWK4KRuB1xt?= =?us-ascii?Q?Z3BEI+iu5rWHjjdk5tf5b3hSiP0/Ueuj8B8FaXx67mOlGd48Xl5jsmb9H8y4?= =?us-ascii?Q?2R9IpgC5+DcSkLWgFATKE0+T4CvbxMxFrtRmaJz+3oZyr2x41gEQ+k7ZTYwb?= =?us-ascii?Q?OM0ql87Mj0/Rq2PfzZh9EM/c/XULs0ardwXLaCLNE1rbucMciLZgoMqQyCyd?= =?us-ascii?Q?HsVcTtNlWapPKXauBru6ajFF+MGpj5OBI9QQuWMnLCgvcIhdDLcDWBxSJKOk?= =?us-ascii?Q?kzAPozl1eDJ31ypMJutrss4nPt+UzdG45/pkSHNo04z+4gXRRYo9g7LtUGgX?= =?us-ascii?Q?AiC2Q7pGOk2nw2XE4StIJ/tsMhpEXDGBIBpJQEYqzLkuB++DuGCX2kp7a8tn?= =?us-ascii?Q?cUzXTJyoDGsMCfcliiYS9PpSAt0zLrAg3OQG8lOVKL+hJ6wwyabOTmR5+fCR?= =?us-ascii?Q?AqtMBcgnGGr7fccvomXMjMVcJXR4KKC/iyKYTfgHMpzH0rzvp3bjNP9RCHZI?= =?us-ascii?Q?9UpJE+wtVRA/IV9XXfhOJMWoXSofTTjUwTkhcs2XQH2cdg2Ava8HZVnypCmU?= =?us-ascii?Q?z7f8V8y+lrJAAoDbDzcfAswZizAKxJEmfeGC4OjyOUHg4rkJYIeuzJ7FBS8X?= =?us-ascii?Q?qRaKwrbWnPB/fSqrU/ptxqDfUyv46TyuYfJM5OYSt8zeeyoJCcv5+PjrJlXJ?= =?us-ascii?Q?VM52Mwp/R5p7/6KYJvrPB33FRhJ5AcxfcV/ip9zdnhXz9BtKCqHoIs6h2fLx?= =?us-ascii?Q?jTyHBA4ubsb8565Ll3AfOcePU+gb0VkfhsnIF2l6DmwBbHF4ilmVuB7i6A5P?= =?us-ascii?Q?UItC6iBnoh7ROJR2+ZBKgnyTYuUfrzOtEA3NIFjtqEfopIqXDQqUKBT0cXvz?= =?us-ascii?Q?7ZfUYQb9RJfiZj1VR8OfjYjRUCmbKaqC+tM5PE74aPxWHP4vSXhMHs/02sy2?= =?us-ascii?Q?WuumNzGV+lrE6bbT79J4S5bQNtec2CkRh62KpcaT4CqHDbaYac0lADfIx6hw?= =?us-ascii?Q?kaKDqiQxi93z+c6jCvp4Ih2C9tQlDE/Zx+2wdyzAcOQs+LnWUJqryyT1nTFs?= =?us-ascii?Q?VkjbCtnPy7XmAUNqle/Pjpz25TmYHGLgxm1RJwqhOeQyvvbWpD5Abcy543nc?= =?us-ascii?Q?8TIf08leMA3SFLnE4gjuPBomAjynvbfJVL7/zuzFeOPLhqZ1YrOpmOzuEVDW?= =?us-ascii?Q?TzbpO2jqBHKsI8PZyx+6+URWfO2fRt/xq65Kt6XJtqh4MUuKYvb1N9pr48xb?= =?us-ascii?Q?s3TUQadbucGKkjKUv6HA6fTqEETx7bWpAVbR9fJGEq/ctsO7KDQLqdcTEseD?= =?us-ascii?Q?af+8zHG/SDfYpopt9nhXMLaKn+jJI/vPNW3EXpkMbKLLL9toN7lNjFas2ZCM?= =?us-ascii?Q?JFWJGTsX/+JGJVHoOhSbzjN3/vB/CkS4HXSjpuVZ?= 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: 6c60ec97-877a-43db-1c35-08da704b4c8c X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jul 2022 03:43:13.4830 (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: Sx6VN3rF/Hm9w9Y93kYznX3K86cOM3PqgiDCcLAuiv0lvEgvJdxNVc8ou8hnGICHRSaw9CtdVlycaMBrUzS+ZQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB2486 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [AMD Official Use Only - General] This is the auto-gen file. I just give my review tag. Reviewed-by: Abner Chang > -----Original Message----- > From: Nickle Wang > Sent: Wednesday, July 27, 2022 9:38 AM > To: devel@edk2.groups.io > Cc: Chang, Abner ; Yang, Atom > ; Nick Ramirez > Subject: [edk2-staging][PATCH v3 12/15] edk2-staging/RedfishClientPkg: > Rename Memory feature driver >=20 > [CAUTION: External Email] >=20 > Rename Memory driver by removing Redfish prefix. Update memory feature > driver and support all properties under Memory schema. Also support > "Identify" action in this driver. Corresponding changes are made to > honor newly introduced library and protocol. >=20 > Signed-off-by: Nickle Wang > Cc: Abner Chang > Cc: Yang Atom > Cc: Nick Ramirez > --- > .../{RedfishMemoryCommon.c =3D> MemoryCommon.c} | 1194 ++++++++++- > ------ > .../{RedfishMemoryCommon.h =3D> MemoryCommon.h} | 2 +- > .../Dxe/{RedfishMemoryDxe.c =3D> MemoryDxe.c} | 138 +- > .../{RedfishMemoryDxe.inf =3D> MemoryDxe.inf} | 21 +- > .../Include/RedfishResourceCommon.h | 38 +- > RedfishClientPkg/RedfishClient.fdf.inc | 2 +- > .../RedfishClientComponents.dsc.inc | 2 +- > 7 files changed, 839 insertions(+), 558 deletions(-) > rename > RedfishClientPkg/Features/Memory/V1_7_1/Common/{RedfishMemoryCo > mmon.c =3D> MemoryCommon.c} (64%) > rename > RedfishClientPkg/Features/Memory/V1_7_1/Common/{RedfishMemoryCo > mmon.h =3D> MemoryCommon.h} (89%) > rename > RedfishClientPkg/Features/Memory/V1_7_1/Dxe/{RedfishMemoryDxe.c =3D> > MemoryDxe.c} (75%) > rename > RedfishClientPkg/Features/Memory/V1_7_1/Dxe/{RedfishMemoryDxe.inf > =3D> MemoryDxe.inf} (57%) >=20 > diff --git > a/RedfishClientPkg/Features/Memory/V1_7_1/Common/RedfishMemoryCo > mmon.c > b/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon. > c > similarity index 64% > rename from > RedfishClientPkg/Features/Memory/V1_7_1/Common/RedfishMemoryCom > mon.c > rename to > RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c > index 11f738f71c..745c5f9847 100644 > --- > a/RedfishClientPkg/Features/Memory/V1_7_1/Common/RedfishMemoryCo > mmon.c > +++ > b/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon. > c > @@ -1,45 +1,54 @@ > /** @file > Redfish feature driver implementation - common functions >=20 > - (C) Copyright 2020-2021 Hewlett Packard Enterprise Development LP
> + (C) Copyright 2020-2022 Hewlett Packard Enterprise Development LP
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ >=20 > -#include "RedfishMemoryCommon.h" > +#include "MemoryCommon.h" >=20 > CHAR8 MemoryEmptyJson[] =3D "{\"@odata.id\": \"\", \"@odata.type\": > \"#Memory.v1_7_1.Memory\", \"Id\": \"\", \"Name\": \"\"}"; >=20 > REDFISH_RESOURCE_COMMON_PRIVATE *mRedfishResourcePrivate =3D > NULL; >=20 > +/** > + Consume resource from given URI. > + > + @param[in] This Pointer to > REDFISH_RESOURCE_COMMON_PRIVATE instance. > + @param[in] Json The JSON to consume. > + @param[in] HeaderEtag The Etag string returned in HTTP head= er. > + > + @retval EFI_SUCCESS Value is returned successfully. > + @retval Others Some error happened. > + > +**/ > EFI_STATUS > RedfishConsumeResourceCommon ( > IN REDFISH_RESOURCE_COMMON_PRIVATE *Private, > - IN CHAR8 *MemoryJson > + IN CHAR8 *Json, > + IN CHAR8 *HeaderEtag OPTIONAL > ) > { > - EFI_STATUS Status; > + EFI_STATUS Status; > EFI_REDFISH_MEMORY_V1_7_1 *Memory; > EFI_REDFISH_MEMORY_V1_7_1_CS *MemoryCs; > - EFI_STRING ConfigureLang; > - CHAR8 *Arraykey; > - CHAR8 *EtagInDb; > + EFI_STRING ConfigureLang; > + >=20 > - if (Private =3D=3D NULL || IS_EMPTY_STRING (MemoryJson)) { > + if (Private =3D=3D NULL || IS_EMPTY_STRING (Json)) { > return EFI_INVALID_PARAMETER; > } >=20 > - Memory=3D NULL; > + Memory =3D NULL; > MemoryCs =3D NULL; > ConfigureLang =3D NULL; > - Arraykey =3D NULL; > - EtagInDb =3D NULL; >=20 > Status =3D Private->JsonStructProtocol->ToStructure ( > Private->JsonStructProtocol, > NULL, > - MemoryJson, > + Json, > (EFI_REST_JSON_STRUCTURE_HEADE= R **)&Memory > ); > if (EFI_ERROR (Status)) { > @@ -52,24 +61,13 @@ RedfishConsumeResourceCommon ( > // > // Check ETAG to see if we need to consume it > // > - EtagInDb =3D GetEtagWithUri (Private->Uri); > - if (EtagInDb !=3D NULL && MemoryCs->odata_etag !=3D NULL) { > - if (AsciiStrCmp (EtagInDb, MemoryCs->odata_etag) =3D=3D 0) { > - // > - // No change > - // > - DEBUG ((DEBUG_INFO, "%a, ETAG: [%a] no change, ignore consume > action\n", __FUNCTION__, EtagInDb)); > - goto ON_RELEASE; > - } > - } > - > - // > - // Find array key from URI > - // > - Status =3D GetArraykeyFromUri (Private->Uri, &Arraykey); > - if (EFI_ERROR (Status)) { > - ASSERT (FALSE); > - return Status; > + if (CheckEtag (Private->Uri, HeaderEtag, MemoryCs->odata_etag)) { > + // > + // No change > + // > + DEBUG ((DEBUG_INFO, "%a, ETAG: %s has no change, ignore consume > action\n", __FUNCTION__, Private->Uri)); > + Status =3D EFI_ALREADY_STARTED; > + goto ON_RELEASE; > } >=20 > // > @@ -77,9 +75,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->AllocationAlignmentMiB !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "AllocationAlignmentMiB", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "AllocationAlignmentMiB"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >AllocationAlignmentMiB); > if (EFI_ERROR (Status)) { > @@ -88,7 +86,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -97,9 +95,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->AllocationIncrementMiB !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "AllocationIncrementMiB", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "AllocationIncrementMiB"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >AllocationIncrementMiB); > if (EFI_ERROR (Status)) { > @@ -108,18 +106,42 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > + } > + } > + > + // > + // Handle ALLOWEDSPEEDSMHZ > + // > + if (MemoryCs->AllowedSpeedsMHz !=3D NULL) { > + // > + // Find corresponding configure language for collection resource. > + // > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "AllowedSpeedsMHz"); > + if (ConfigureLang !=3D NULL) { > + Status =3D ApplyFeatureSettingsNumericArrayType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs- > >AllowedSpeedsMHz); > + if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "%a, apply setting for %s failed: %r\n", > __FUNCTION__, ConfigureLang, Status)); > + } > + > + FreePool (ConfigureLang); > + } else { > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > + // > + // ASSEMBLY will be handled by feature driver. > + // > + > // > // Handle BASEMODULETYPE > // > if (MemoryCs->BaseModuleType !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "BaseModuleType", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "BaseModuleType"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs- > >BaseModuleType); > if (EFI_ERROR (Status)) { > @@ -128,7 +150,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -137,9 +159,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->BusWidthBits !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "BusWidthBits", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "BusWidthBits"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >BusWidthBits); > if (EFI_ERROR (Status)) { > @@ -148,7 +170,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -157,9 +179,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->CacheSizeMiB !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "CacheSizeMiB", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "CacheSizeMiB"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >CacheSizeMiB); > if (EFI_ERROR (Status)) { > @@ -168,7 +190,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -177,9 +199,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->CapacityMiB !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "CapacityMiB", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "CapacityMiB"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >CapacityMiB); > if (EFI_ERROR (Status)) { > @@ -188,7 +210,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -197,9 +219,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->ConfigurationLocked !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "ConfigurationLocked", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "ConfigurationLocked"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsBooleanType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (BOOLEAN)*MemoryCs- > >ConfigurationLocked); > if (EFI_ERROR (Status)) { > @@ -208,7 +230,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -217,9 +239,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->DataWidthBits !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "DataWidthBits", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "DataWidthBits"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >DataWidthBits); > if (EFI_ERROR (Status)) { > @@ -228,7 +250,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -237,9 +259,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->DeviceID !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "DeviceID", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "DeviceID"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs->DeviceID); > if (EFI_ERROR (Status)) { > @@ -248,7 +270,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -257,9 +279,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->DeviceLocator !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "DeviceLocator", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "DeviceLocator"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs->DeviceLocator); > if (EFI_ERROR (Status)) { > @@ -268,7 +290,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -277,9 +299,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->ErrorCorrection !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "ErrorCorrection", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "ErrorCorrection"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs->ErrorCorrection); > if (EFI_ERROR (Status)) { > @@ -288,7 +310,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -297,9 +319,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->FirmwareApiVersion !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "FirmwareApiVersion", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "FirmwareApiVersion"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs- > >FirmwareApiVersion); > if (EFI_ERROR (Status)) { > @@ -308,7 +330,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -317,9 +339,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->FirmwareRevision !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "FirmwareRevision", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "FirmwareRevision"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs- > >FirmwareRevision); > if (EFI_ERROR (Status)) { > @@ -328,7 +350,27 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > + } > + } > + > + // > + // Handle FUNCTIONCLASSES > + // > + if (MemoryCs->FunctionClasses !=3D NULL) { > + // > + // Find corresponding configure language for collection resource. > + // > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "FunctionClasses"); > + if (ConfigureLang !=3D NULL) { > + Status =3D ApplyFeatureSettingsStringArrayType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs- > >FunctionClasses); > + if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "%a, apply setting for %s failed: %r\n", > __FUNCTION__, ConfigureLang, Status)); > + } > + > + FreePool (ConfigureLang); > + } else { > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -337,9 +379,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->IsRankSpareEnabled !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "IsRankSpareEnabled", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "IsRankSpareEnabled"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsBooleanType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (BOOLEAN)*MemoryCs- > >IsRankSpareEnabled); > if (EFI_ERROR (Status)) { > @@ -348,7 +390,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -357,9 +399,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->IsSpareDeviceEnabled !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "IsSpareDeviceEnabled", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "IsSpareDeviceEnabled"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsBooleanType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (BOOLEAN)*MemoryCs- > >IsSpareDeviceEnabled); > if (EFI_ERROR (Status)) { > @@ -368,18 +410,22 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > + // > + // LOCATION is not handled. Defined in > https://nam11.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fredfis > h.dmtf.org%2Fschemas%2Fv1%2FResource.json&data=3D05%7C01%7Cab > ner.chang%40amd.com%7Cc5c18ad2dddb46daeae308da6f70b35f%7C3dd896 > 1fe4884e608e11a82d994e183d%7C0%7C0%7C637944827102439368%7CUnkn > own%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik > 1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3DxlnkJ1Se7yQrRJ > 48%2BKqY%2FeKKhwnhyrqiswP9J5GBpuI%3D&reserved=3D0 > + // > + > // > // Handle LOGICALSIZEMIB > // > if (MemoryCs->LogicalSizeMiB !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "LogicalSizeMiB", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "LogicalSizeMiB"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >LogicalSizeMiB); > if (EFI_ERROR (Status)) { > @@ -388,7 +434,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -397,9 +443,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->Manufacturer !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "Manufacturer", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "Manufacturer"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs->Manufacturer); > if (EFI_ERROR (Status)) { > @@ -408,7 +454,27 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > + } > + } > + > + // > + // Handle MAXTDPMILLIWATTS > + // > + if (MemoryCs->MaxTDPMilliWatts !=3D NULL) { > + // > + // Find corresponding configure language for collection resource. > + // > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "MaxTDPMilliWatts"); > + if (ConfigureLang !=3D NULL) { > + Status =3D ApplyFeatureSettingsNumericArrayType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs- > >MaxTDPMilliWatts); > + if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "%a, apply setting for %s failed: %r\n", > __FUNCTION__, ConfigureLang, Status)); > + } > + > + FreePool (ConfigureLang); > + } else { > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -417,9 +483,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->MemoryDeviceType !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "MemoryDeviceType", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "MemoryDeviceType"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs- > >MemoryDeviceType); > if (EFI_ERROR (Status)) { > @@ -428,14 +494,14 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > // > // Handle MEMORYLOCATION > // > - if(MemoryCs->MemoryLocation =3D=3D NULL) { > + if (MemoryCs->MemoryLocation =3D=3D NULL) { > MemoryCs->MemoryLocation =3D AllocateZeroPool (sizeof > (RedfishMemory_V1_7_1_MemoryLocation_CS)); > ASSERT (MemoryCs->MemoryLocation !=3D NULL); > } > @@ -445,9 +511,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->MemoryLocation->Channel !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "MemoryLocation/Channel", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "MemoryLocation/Channel"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >MemoryLocation->Channel); > if (EFI_ERROR (Status)) { > @@ -456,7 +522,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -465,9 +531,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->MemoryLocation->MemoryController !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "MemoryLocation/MemoryController", > Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "MemoryLocation/MemoryController"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >MemoryLocation->MemoryController); > if (EFI_ERROR (Status)) { > @@ -476,7 +542,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -485,9 +551,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->MemoryLocation->Slot !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "MemoryLocation/Slot", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "MemoryLocation/Slot"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >MemoryLocation->Slot); > if (EFI_ERROR (Status)) { > @@ -496,7 +562,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -505,9 +571,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->MemoryLocation->Socket !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "MemoryLocation/Socket", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "MemoryLocation/Socket"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >MemoryLocation->Socket); > if (EFI_ERROR (Status)) { > @@ -516,18 +582,26 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > + // > + // Handle MEMORYMEDIA > + // > +// > +// ****** Warning ****** > +// Unsupported array type: > +// > + > // > // Handle MEMORYSUBSYSTEMCONTROLLERMANUFACTURERID > // > if (MemoryCs->MemorySubsystemControllerManufacturerID !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, > "MemorySubsystemControllerManufacturerID", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "MemorySubsystemControllerManufacturerID"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs- > >MemorySubsystemControllerManufacturerID); > if (EFI_ERROR (Status)) { > @@ -536,7 +610,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -545,9 +619,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->MemorySubsystemControllerProductID !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "MemorySubsystemControllerProductID", > Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "MemorySubsystemControllerProductID"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs- > >MemorySubsystemControllerProductID); > if (EFI_ERROR (Status)) { > @@ -556,7 +630,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -565,9 +639,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->MemoryType !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "MemoryType", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "MemoryType"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs->MemoryType); > if (EFI_ERROR (Status)) { > @@ -576,18 +650,22 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > + // > + // METRICS will be handled by feature driver. > + // > + > // > // Handle MODULEMANUFACTURERID > // > if (MemoryCs->ModuleManufacturerID !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "ModuleManufacturerID", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "ModuleManufacturerID"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs- > >ModuleManufacturerID); > if (EFI_ERROR (Status)) { > @@ -596,7 +674,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -605,9 +683,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->ModuleProductID !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "ModuleProductID", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "ModuleProductID"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs- > >ModuleProductID); > if (EFI_ERROR (Status)) { > @@ -616,7 +694,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -625,9 +703,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->NonVolatileSizeMiB !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "NonVolatileSizeMiB", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "NonVolatileSizeMiB"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >NonVolatileSizeMiB); > if (EFI_ERROR (Status)) { > @@ -636,18 +714,26 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > + // > + // Handle OPERATINGMEMORYMODES > + // > +// > +// ****** Warning ****** > +// Unsupported array type: > +// > + > // > // Handle OPERATINGSPEEDMHZ > // > if (MemoryCs->OperatingSpeedMhz !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "OperatingSpeedMhz", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "OperatingSpeedMhz"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >OperatingSpeedMhz); > if (EFI_ERROR (Status)) { > @@ -656,7 +742,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -665,9 +751,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->PartNumber !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "PartNumber", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "PartNumber"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs->PartNumber); > if (EFI_ERROR (Status)) { > @@ -676,7 +762,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -685,9 +771,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->PersistentRegionNumberLimit !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "PersistentRegionNumberLimit", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "PersistentRegionNumberLimit"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >PersistentRegionNumberLimit); > if (EFI_ERROR (Status)) { > @@ -696,7 +782,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -705,9 +791,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->PersistentRegionSizeLimitMiB !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "PersistentRegionSizeLimitMiB", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "PersistentRegionSizeLimitMiB"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >PersistentRegionSizeLimitMiB); > if (EFI_ERROR (Status)) { > @@ -716,7 +802,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -725,9 +811,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->PersistentRegionSizeMaxMiB !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "PersistentRegionSizeMaxMiB", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "PersistentRegionSizeMaxMiB"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >PersistentRegionSizeMaxMiB); > if (EFI_ERROR (Status)) { > @@ -736,14 +822,14 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > // > // Handle POWERMANAGEMENTPOLICY > // > - if(MemoryCs->PowerManagementPolicy =3D=3D NULL) { > + if (MemoryCs->PowerManagementPolicy =3D=3D NULL) { > MemoryCs->PowerManagementPolicy =3D AllocateZeroPool (sizeof > (RedfishMemory_V1_7_1_PowerManagementPolicy_CS)); > ASSERT (MemoryCs->PowerManagementPolicy !=3D NULL); > } > @@ -753,9 +839,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->PowerManagementPolicy- > >AveragePowerBudgetMilliWatts !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, > "PowerManagementPolicy/AveragePowerBudgetMilliWatts", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "PowerManagementPolicy/AveragePowerBudgetMilliWatts"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >PowerManagementPolicy->AveragePowerBudgetMilliWatts); > if (EFI_ERROR (Status)) { > @@ -764,7 +850,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -773,9 +859,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->PowerManagementPolicy->MaxTDPMilliWatts !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, > "PowerManagementPolicy/MaxTDPMilliWatts", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "PowerManagementPolicy/MaxTDPMilliWatts"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >PowerManagementPolicy->MaxTDPMilliWatts); > if (EFI_ERROR (Status)) { > @@ -784,7 +870,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -793,9 +879,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->PowerManagementPolicy->PeakPowerBudgetMilliWatts !=3D > NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, > "PowerManagementPolicy/PeakPowerBudgetMilliWatts", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "PowerManagementPolicy/PeakPowerBudgetMilliWatts"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >PowerManagementPolicy->PeakPowerBudgetMilliWatts); > if (EFI_ERROR (Status)) { > @@ -804,7 +890,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -813,9 +899,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->PowerManagementPolicy->PolicyEnabled !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "PowerManagementPolicy/PolicyEnabled", > Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "PowerManagementPolicy/PolicyEnabled"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsBooleanType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (BOOLEAN)*MemoryCs- > >PowerManagementPolicy->PolicyEnabled); > if (EFI_ERROR (Status)) { > @@ -824,7 +910,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -833,9 +919,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->RankCount !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "RankCount", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "RankCount")= ; > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >RankCount); > if (EFI_ERROR (Status)) { > @@ -844,14 +930,22 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > + // > + // Handle REGIONS > + // > +// > +// ****** Warning ****** > +// Unsupported array type: > +// > + > // > // Handle SECURITYCAPABILITIES > // > - if(MemoryCs->SecurityCapabilities =3D=3D NULL) { > + if (MemoryCs->SecurityCapabilities =3D=3D NULL) { > MemoryCs->SecurityCapabilities =3D AllocateZeroPool (sizeof > (RedfishMemory_V1_7_1_SecurityCapabilities_CS)); > ASSERT (MemoryCs->SecurityCapabilities !=3D NULL); > } > @@ -861,9 +955,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->SecurityCapabilities->ConfigurationLockCapable !=3D NULL= ) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, > "SecurityCapabilities/ConfigurationLockCapable", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "SecurityCapabilities/ConfigurationLockCapable"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsBooleanType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (BOOLEAN)*MemoryCs- > >SecurityCapabilities->ConfigurationLockCapable); > if (EFI_ERROR (Status)) { > @@ -872,7 +966,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -881,9 +975,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->SecurityCapabilities->DataLockCapable !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "SecurityCapabilities/DataLockCapable", > Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "SecurityCapabilities/DataLockCapable"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsBooleanType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (BOOLEAN)*MemoryCs- > >SecurityCapabilities->DataLockCapable); > if (EFI_ERROR (Status)) { > @@ -892,7 +986,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -901,9 +995,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->SecurityCapabilities->MaxPassphraseCount !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "SecurityCapabilities/MaxPassphraseCount", > Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "SecurityCapabilities/MaxPassphraseCount"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >SecurityCapabilities->MaxPassphraseCount); > if (EFI_ERROR (Status)) { > @@ -912,7 +1006,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -921,9 +1015,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->SecurityCapabilities->PassphraseCapable !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "SecurityCapabilities/PassphraseCapable", > Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "SecurityCapabilities/PassphraseCapable"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsBooleanType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (BOOLEAN)*MemoryCs- > >SecurityCapabilities->PassphraseCapable); > if (EFI_ERROR (Status)) { > @@ -932,7 +1026,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -941,9 +1035,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->SecurityCapabilities->PassphraseLockLimit !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "SecurityCapabilities/PassphraseLockLimit", > Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "SecurityCapabilities/PassphraseLockLimit"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >SecurityCapabilities->PassphraseLockLimit); > if (EFI_ERROR (Status)) { > @@ -952,18 +1046,26 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > + // > + // Handle SECURITYCAPABILITIES->SECURITYSTATES > + // > +// > +// ****** Warning ****** > +// Unsupported array type: > +// > + > // > // Handle SECURITYSTATE > // > if (MemoryCs->SecurityState !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "SecurityState", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "SecurityState"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs->SecurityState); > if (EFI_ERROR (Status)) { > @@ -972,7 +1074,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -981,9 +1083,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->SerialNumber !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "SerialNumber", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "SerialNumber"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs->SerialNumber); > if (EFI_ERROR (Status)) { > @@ -992,7 +1094,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -1001,9 +1103,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->SpareDeviceCount !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "SpareDeviceCount", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "SpareDeviceCount"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >SpareDeviceCount); > if (EFI_ERROR (Status)) { > @@ -1012,7 +1114,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -1021,9 +1123,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->SubsystemDeviceID !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "SubsystemDeviceID", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "SubsystemDeviceID"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs- > >SubsystemDeviceID); > if (EFI_ERROR (Status)) { > @@ -1032,7 +1134,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -1041,9 +1143,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->SubsystemVendorID !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "SubsystemVendorID", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "SubsystemVendorID"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs- > >SubsystemVendorID); > if (EFI_ERROR (Status)) { > @@ -1052,7 +1154,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -1061,9 +1163,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->VendorID !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "VendorID", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "VendorID"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs->VendorID); > if (EFI_ERROR (Status)) { > @@ -1072,7 +1174,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -1081,9 +1183,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->VolatileRegionNumberLimit !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "VolatileRegionNumberLimit", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "VolatileRegionNumberLimit"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >VolatileRegionNumberLimit); > if (EFI_ERROR (Status)) { > @@ -1092,7 +1194,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -1101,9 +1203,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->VolatileRegionSizeLimitMiB !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "VolatileRegionSizeLimitMiB", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "VolatileRegionSizeLimitMiB"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >VolatileRegionSizeLimitMiB); > if (EFI_ERROR (Status)) { > @@ -1112,7 +1214,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -1121,9 +1223,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->VolatileRegionSizeMaxMiB !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "VolatileRegionSizeMaxMiB", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "VolatileRegionSizeMaxMiB"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >VolatileRegionSizeMaxMiB); > if (EFI_ERROR (Status)) { > @@ -1132,7 +1234,7 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 > @@ -1141,9 +1243,9 @@ RedfishConsumeResourceCommon ( > // > if (MemoryCs->VolatileSizeMiB !=3D NULL) { > // > - // Find corresponding redpath for collection resource. > + // Find corresponding configure language for collection resource. > // > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, "VolatileSizeMiB", Arraykey); > + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, > "VolatileSizeMiB"); > if (ConfigureLang !=3D NULL) { > Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs- > >VolatileSizeMiB); > if (EFI_ERROR (Status)) { > @@ -1152,26 +1254,16 @@ RedfishConsumeResourceCommon ( >=20 > FreePool (ConfigureLang); > } else { > - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: > %a\n", __FUNCTION__, Arraykey)); > + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: > %s\n", __FUNCTION__, Private->Uri)); > } > } >=20 >=20 > - > - // > ON_RELEASE: >=20 > // > // Release resource. > // > - if (EtagInDb !=3D NULL) { > - FreePool (EtagInDb); > - } > - > - if (Arraykey !=3D NULL) { > - FreePool (Arraykey); > - } > - > Private->JsonStructProtocol->DestoryStructure ( > Private->JsonStructProtocol, > (EFI_REST_JSON_STRUCTURE_HEADER *)Memor= y > @@ -1183,7 +1275,7 @@ ON_RELEASE: > EFI_STATUS > ProvisioningMemoryProperties ( > IN EFI_REST_JSON_STRUCTURE_PROTOCOL *JsonStructProtocol, > - IN CHAR8 *IputJson, > + IN CHAR8 *InputJson, > IN CHAR8 *ResourceId, OPTIONAL > IN EFI_STRING ConfigureLang, > IN BOOLEAN ProvisionMode, > @@ -1193,28 +1285,31 @@ ProvisioningMemoryProperties ( > EFI_REDFISH_MEMORY_V1_7_1 *Memory; > EFI_REDFISH_MEMORY_V1_7_1_CS *MemoryCs; > EFI_STATUS Status; > + BOOLEAN PropertyChanged; > INT64 *NumericValue; > - INT32 *IntegerValue; > - BOOLEAN *BooleanValue; > + INT64 *NumericArrayValue; > + UINTN ArraySize; > CHAR8 *AsciiStringValue; > - BOOLEAN PropertyChanged; > - BOOLEAN UnusedProperty; > + BOOLEAN *BooleanValue; > + INT32 *IntegerValue; > + CHAR8 **AsciiStringArrayValue; > + >=20 > - if (JsonStructProtocol =3D=3D NULL || ResultJson =3D=3D NULL || IS_EMP= TY_STRING > (IputJson) || IS_EMPTY_STRING (ConfigureLang)) { > + > + if (JsonStructProtocol =3D=3D NULL || ResultJson =3D=3D NULL || > IS_EMPTY_STRING (InputJson) || IS_EMPTY_STRING (ConfigureLang)) { > return EFI_INVALID_PARAMETER; > } >=20 > - DEBUG ((REDFISH_DEBUG_TRACE, "%a provision for %s with: %s\n", > __FUNCTION__, ConfigureLang, (ProvisionMode ? L"Provision all resource" : > L"Provision existing resource"))); > + DEBUG ((REDFISH_DEBUG_TRACE, "%a provision for %s with: %s\n", > __FUNCTION__, ConfigureLang, (ProvisionMode ? L"Provision resource" : > L"Update resource"))); >=20 > *ResultJson =3D NULL; > PropertyChanged =3D FALSE; > - UnusedProperty =3D TRUE; >=20 > Memory =3D NULL; > Status =3D JsonStructProtocol->ToStructure ( > JsonStructProtocol, > NULL, > - IputJson, > + InputJson, > (EFI_REST_JSON_STRUCTURE_HEADER **)&Mem= ory > ); > if (EFI_ERROR (Status)) { > @@ -1243,7 +1338,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle ALLOCATIONINCREMENTMIB > // > @@ -1256,7 +1350,18 @@ ProvisioningMemoryProperties ( > } > } > } > - > + // > + // Handle ALLOWEDSPEEDSMHZ > + // > + if (PropertyChecker (MemoryCs->AllowedSpeedsMHz, ProvisionMode)) { > + NumericArrayValue =3D GetPropertyNumericArrayValue > (RESOURCE_SCHEMA, RESOURCE_SCHEMA_VERSION, > L"AllowedSpeedsMHz", ConfigureLang, &ArraySize); > + if (NumericArrayValue !=3D NULL) { > + if (ProvisionMode || !CompareRedfishNumericArrayValues (MemoryCs- > >AllowedSpeedsMHz, NumericArrayValue, ArraySize)) { > + AddRedfishNumericArray (&MemoryCs->AllowedSpeedsMHz, > NumericArrayValue, ArraySize); > + PropertyChanged =3D TRUE; > + } > + } > + } > // > // Handle BASEMODULETYPE > // > @@ -1269,7 +1374,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle BUSWIDTHBITS > // > @@ -1282,7 +1386,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle CACHESIZEMIB > // > @@ -1295,7 +1398,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle CAPACITYMIB > // > @@ -1308,7 +1410,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle CONFIGURATIONLOCKED > // > @@ -1320,11 +1421,11 @@ ProvisioningMemoryProperties ( > if (IntegerValue !=3D NULL) { > *IntegerValue =3D (BooleanValue ? 0x01 : 0x00); > MemoryCs->ConfigurationLocked =3D IntegerValue; > + PropertyChanged =3D TRUE; > } > } > } > } > - > // > // Handle DATAWIDTHBITS > // > @@ -1337,7 +1438,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle DEVICEID > // > @@ -1350,7 +1450,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle DEVICELOCATOR > // > @@ -1363,7 +1462,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle ERRORCORRECTION > // > @@ -1376,7 +1474,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle FIRMWAREAPIVERSION > // > @@ -1389,7 +1486,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle FIRMWAREREVISION > // > @@ -1402,7 +1498,18 @@ ProvisioningMemoryProperties ( > } > } > } > - > + // > + // Handle FUNCTIONCLASSES > + // > + if (PropertyChecker (MemoryCs->FunctionClasses, ProvisionMode)) { > + AsciiStringArrayValue =3D GetPropertyStringArrayValue > (RESOURCE_SCHEMA, RESOURCE_SCHEMA_VERSION, L"FunctionClasses", > ConfigureLang, &ArraySize); > + if (AsciiStringArrayValue !=3D NULL) { > + if (ProvisionMode || !CompareRedfishStringArrayValues (MemoryCs- > >FunctionClasses, AsciiStringArrayValue, ArraySize)) { > + AddRedfishCharArray (&MemoryCs->FunctionClasses, > AsciiStringArrayValue, ArraySize); > + PropertyChanged =3D TRUE; > + } > + } > + } > // > // Handle ISRANKSPAREENABLED > // > @@ -1414,11 +1521,11 @@ ProvisioningMemoryProperties ( > if (IntegerValue !=3D NULL) { > *IntegerValue =3D (BooleanValue ? 0x01 : 0x00); > MemoryCs->IsRankSpareEnabled =3D IntegerValue; > + PropertyChanged =3D TRUE; > } > } > } > } > - > // > // Handle ISSPAREDEVICEENABLED > // > @@ -1430,11 +1537,11 @@ ProvisioningMemoryProperties ( > if (IntegerValue !=3D NULL) { > *IntegerValue =3D (BooleanValue ? 0x01 : 0x00); > MemoryCs->IsSpareDeviceEnabled =3D IntegerValue; > + PropertyChanged =3D TRUE; > } > } > } > } > - > // > // Handle LOGICALSIZEMIB > // > @@ -1447,7 +1554,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle MANUFACTURER > // > @@ -1460,7 +1566,18 @@ ProvisioningMemoryProperties ( > } > } > } > - > + // > + // Handle MAXTDPMILLIWATTS > + // > + if (PropertyChecker (MemoryCs->MaxTDPMilliWatts, ProvisionMode)) { > + NumericArrayValue =3D GetPropertyNumericArrayValue > (RESOURCE_SCHEMA, RESOURCE_SCHEMA_VERSION, L"MaxTDPMilliWatts", > ConfigureLang, &ArraySize); > + if (NumericArrayValue !=3D NULL) { > + if (ProvisionMode || !CompareRedfishNumericArrayValues (MemoryCs- > >MaxTDPMilliWatts, NumericArrayValue, ArraySize)) { > + AddRedfishNumericArray (&MemoryCs->MaxTDPMilliWatts, > NumericArrayValue, ArraySize); > + PropertyChanged =3D TRUE; > + } > + } > + } > // > // Handle MEMORYDEVICETYPE > // > @@ -1473,78 +1590,66 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle MEMORYLOCATION > // > - if(MemoryCs->MemoryLocation =3D=3D NULL) { > - MemoryCs->MemoryLocation =3D AllocateZeroPool (sizeof > (RedfishMemory_V1_7_1_MemoryLocation_CS)); > - ASSERT (MemoryCs->MemoryLocation !=3D NULL); > - UnusedProperty =3D TRUE; > - } else { > - UnusedProperty =3D FALSE; > - } > - > - // > - // Handle MEMORYLOCATION->CHANNEL > - // > - if (PropertyChecker (MemoryCs->MemoryLocation->Channel, > ProvisionMode)) { > - NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, L"MemoryLocation/Channel", > ConfigureLang); > - if (NumericValue !=3D NULL) { > - if (ProvisionMode || *MemoryCs->MemoryLocation->Channel !=3D > *NumericValue) { > - MemoryCs->MemoryLocation->Channel =3D NumericValue; > - PropertyChanged =3D TRUE; > - UnusedProperty =3D FALSE; > + if (MemoryCs->MemoryLocation !=3D NULL) { > + // > + // Handle MEMORYLOCATION->CHANNEL > + // > + if (PropertyChecker (MemoryCs->MemoryLocation->Channel, > ProvisionMode)) { > + NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, L"MemoryLocation/Channel", > ConfigureLang); > + if (NumericValue !=3D NULL) { > + if (ProvisionMode || *MemoryCs->MemoryLocation->Channel !=3D > *NumericValue) { > + MemoryCs->MemoryLocation->Channel =3D NumericValue; > + PropertyChanged =3D TRUE; > + } > } > } > - } > - > - // > - // Handle MEMORYLOCATION->MEMORYCONTROLLER > - // > - if (PropertyChecker (MemoryCs->MemoryLocation->MemoryController, > ProvisionMode)) { > - NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, L"MemoryLocation/MemoryController", > ConfigureLang); > - if (NumericValue !=3D NULL) { > - if (ProvisionMode || *MemoryCs->MemoryLocation- > >MemoryController !=3D *NumericValue) { > - MemoryCs->MemoryLocation->MemoryController =3D NumericValue; > - PropertyChanged =3D TRUE; > - UnusedProperty =3D FALSE; > + // > + // Handle MEMORYLOCATION->MEMORYCONTROLLER > + // > + if (PropertyChecker (MemoryCs->MemoryLocation->MemoryController, > ProvisionMode)) { > + NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, L"MemoryLocation/MemoryController", > ConfigureLang); > + if (NumericValue !=3D NULL) { > + if (ProvisionMode || *MemoryCs->MemoryLocation- > >MemoryController !=3D *NumericValue) { > + MemoryCs->MemoryLocation->MemoryController =3D NumericValue; > + PropertyChanged =3D TRUE; > + } > } > } > - } > - > - // > - // Handle MEMORYLOCATION->SLOT > - // > - if (PropertyChecker (MemoryCs->MemoryLocation->Slot, ProvisionMode)) > { > - NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, L"MemoryLocation/Slot", ConfigureLang); > - if (NumericValue !=3D NULL) { > - if (ProvisionMode || *MemoryCs->MemoryLocation->Slot !=3D > *NumericValue) { > - MemoryCs->MemoryLocation->Slot =3D NumericValue; > - PropertyChanged =3D TRUE; > - UnusedProperty =3D FALSE; > + // > + // Handle MEMORYLOCATION->SLOT > + // > + if (PropertyChecker (MemoryCs->MemoryLocation->Slot, > ProvisionMode)) { > + NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, L"MemoryLocation/Slot", ConfigureLang); > + if (NumericValue !=3D NULL) { > + if (ProvisionMode || *MemoryCs->MemoryLocation->Slot !=3D > *NumericValue) { > + MemoryCs->MemoryLocation->Slot =3D NumericValue; > + PropertyChanged =3D TRUE; > + } > } > } > - } > - > - // > - // Handle MEMORYLOCATION->SOCKET > - // > - if (PropertyChecker (MemoryCs->MemoryLocation->Socket, > ProvisionMode)) { > - NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, L"MemoryLocation/Socket", ConfigureLang); > - if (NumericValue !=3D NULL) { > - if (ProvisionMode || *MemoryCs->MemoryLocation->Socket !=3D > *NumericValue) { > - MemoryCs->MemoryLocation->Socket =3D NumericValue; > - PropertyChanged =3D TRUE; > - UnusedProperty =3D FALSE; > + // > + // Handle MEMORYLOCATION->SOCKET > + // > + if (PropertyChecker (MemoryCs->MemoryLocation->Socket, > ProvisionMode)) { > + NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, L"MemoryLocation/Socket", ConfigureLang); > + if (NumericValue !=3D NULL) { > + if (ProvisionMode || *MemoryCs->MemoryLocation->Socket !=3D > *NumericValue) { > + MemoryCs->MemoryLocation->Socket =3D NumericValue; > + PropertyChanged =3D TRUE; > + } > } > } > } >=20 > - if (UnusedProperty) { > - FreePool (MemoryCs->MemoryLocation); > - MemoryCs->MemoryLocation =3D NULL; > - } > + // > + // Handle MEMORYMEDIA > + // > +//// ****** Warning ****** > +// Unsupported array type: > +// >=20 > // > // Handle MEMORYSUBSYSTEMCONTROLLERMANUFACTURERID > @@ -1558,7 +1663,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle MEMORYSUBSYSTEMCONTROLLERPRODUCTID > // > @@ -1571,7 +1675,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle MEMORYTYPE > // > @@ -1584,7 +1687,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle MODULEMANUFACTURERID > // > @@ -1597,7 +1699,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle MODULEPRODUCTID > // > @@ -1610,7 +1711,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle NONVOLATILESIZEMIB > // > @@ -1623,6 +1723,12 @@ ProvisioningMemoryProperties ( > } > } > } > + // > + // Handle OPERATINGMEMORYMODES > + // > +//// ****** Warning ****** > +// Unsupported array type: > +// >=20 > // > // Handle OPERATINGSPEEDMHZ > @@ -1636,7 +1742,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle PARTNUMBER > // > @@ -1649,7 +1754,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle PERSISTENTREGIONNUMBERLIMIT > // > @@ -1662,7 +1766,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle PERSISTENTREGIONSIZELIMITMIB > // > @@ -1675,7 +1778,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle PERSISTENTREGIONSIZEMAXMIB > // > @@ -1688,83 +1790,64 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle POWERMANAGEMENTPOLICY > // > - if(MemoryCs->PowerManagementPolicy =3D=3D NULL) { > - MemoryCs->PowerManagementPolicy =3D AllocateZeroPool (sizeof > (RedfishMemory_V1_7_1_PowerManagementPolicy_CS)); > - ASSERT (MemoryCs->PowerManagementPolicy !=3D NULL); > - UnusedProperty =3D TRUE; > - } else { > - UnusedProperty =3D FALSE; > - } > - > - // > - // Handle POWERMANAGEMENTPOLICY- > >AVERAGEPOWERBUDGETMILLIWATTS > - // > - if (PropertyChecker (MemoryCs->PowerManagementPolicy- > >AveragePowerBudgetMilliWatts, ProvisionMode)) { > - NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, > L"PowerManagementPolicy/AveragePowerBudgetMilliWatts", > ConfigureLang); > - if (NumericValue !=3D NULL) { > - if (ProvisionMode || *MemoryCs->PowerManagementPolicy- > >AveragePowerBudgetMilliWatts !=3D *NumericValue) { > - MemoryCs->PowerManagementPolicy- > >AveragePowerBudgetMilliWatts =3D NumericValue; > - PropertyChanged =3D TRUE; > - UnusedProperty =3D FALSE; > + if (MemoryCs->PowerManagementPolicy !=3D NULL) { > + // > + // Handle POWERMANAGEMENTPOLICY- > >AVERAGEPOWERBUDGETMILLIWATTS > + // > + if (PropertyChecker (MemoryCs->PowerManagementPolicy- > >AveragePowerBudgetMilliWatts, ProvisionMode)) { > + NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, > L"PowerManagementPolicy/AveragePowerBudgetMilliWatts", > ConfigureLang); > + if (NumericValue !=3D NULL) { > + if (ProvisionMode || *MemoryCs->PowerManagementPolicy- > >AveragePowerBudgetMilliWatts !=3D *NumericValue) { > + MemoryCs->PowerManagementPolicy- > >AveragePowerBudgetMilliWatts =3D NumericValue; > + PropertyChanged =3D TRUE; > + } > } > } > - } > - > - // > - // Handle POWERMANAGEMENTPOLICY->MAXTDPMILLIWATTS > - // > - if (PropertyChecker (MemoryCs->PowerManagementPolicy- > >MaxTDPMilliWatts, ProvisionMode)) { > - NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, > L"PowerManagementPolicy/MaxTDPMilliWatts", ConfigureLang); > - if (NumericValue !=3D NULL) { > - if (ProvisionMode || *MemoryCs->PowerManagementPolicy- > >MaxTDPMilliWatts !=3D *NumericValue) { > - MemoryCs->PowerManagementPolicy->MaxTDPMilliWatts =3D > NumericValue; > - PropertyChanged =3D TRUE; > - UnusedProperty =3D FALSE; > + // > + // Handle POWERMANAGEMENTPOLICY->MAXTDPMILLIWATTS > + // > + if (PropertyChecker (MemoryCs->PowerManagementPolicy- > >MaxTDPMilliWatts, ProvisionMode)) { > + NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, > L"PowerManagementPolicy/MaxTDPMilliWatts", ConfigureLang); > + if (NumericValue !=3D NULL) { > + if (ProvisionMode || *MemoryCs->PowerManagementPolicy- > >MaxTDPMilliWatts !=3D *NumericValue) { > + MemoryCs->PowerManagementPolicy->MaxTDPMilliWatts =3D > NumericValue; > + PropertyChanged =3D TRUE; > + } > } > } > - } > - > - // > - // Handle POWERMANAGEMENTPOLICY- > >PEAKPOWERBUDGETMILLIWATTS > - // > - if (PropertyChecker (MemoryCs->PowerManagementPolicy- > >PeakPowerBudgetMilliWatts, ProvisionMode)) { > - NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, > L"PowerManagementPolicy/PeakPowerBudgetMilliWatts", ConfigureLang); > - if (NumericValue !=3D NULL) { > - if (ProvisionMode || *MemoryCs->PowerManagementPolicy- > >PeakPowerBudgetMilliWatts !=3D *NumericValue) { > - MemoryCs->PowerManagementPolicy->PeakPowerBudgetMilliWatts =3D > NumericValue; > - PropertyChanged =3D TRUE; > - UnusedProperty =3D FALSE; > + // > + // Handle POWERMANAGEMENTPOLICY- > >PEAKPOWERBUDGETMILLIWATTS > + // > + if (PropertyChecker (MemoryCs->PowerManagementPolicy- > >PeakPowerBudgetMilliWatts, ProvisionMode)) { > + NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, > L"PowerManagementPolicy/PeakPowerBudgetMilliWatts", ConfigureLang); > + if (NumericValue !=3D NULL) { > + if (ProvisionMode || *MemoryCs->PowerManagementPolicy- > >PeakPowerBudgetMilliWatts !=3D *NumericValue) { > + MemoryCs->PowerManagementPolicy->PeakPowerBudgetMilliWatts > =3D NumericValue; > + PropertyChanged =3D TRUE; > + } > } > } > - } > - > - // > - // Handle POWERMANAGEMENTPOLICY->POLICYENABLED > - // > - if (PropertyChecker (MemoryCs->PowerManagementPolicy- > >PolicyEnabled, ProvisionMode)) { > - BooleanValue =3D GetPropertyBooleanValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, L"PowerManagementPolicy/PolicyEnabled", > ConfigureLang); > - if (BooleanValue !=3D NULL) { > - if (ProvisionMode || *MemoryCs->PowerManagementPolicy- > >PolicyEnabled !=3D *BooleanValue) { > - IntegerValue =3D AllocatePool (sizeof (*IntegerValue)); > - if (IntegerValue !=3D NULL) { > - *IntegerValue =3D (BooleanValue ? 0x01 : 0x00); > - MemoryCs->PowerManagementPolicy->PolicyEnabled =3D IntegerValu= e; > - PropertyChanged =3D TRUE; > - UnusedProperty =3D FALSE; > + // > + // Handle POWERMANAGEMENTPOLICY->POLICYENABLED > + // > + if (PropertyChecker (MemoryCs->PowerManagementPolicy- > >PolicyEnabled, ProvisionMode)) { > + BooleanValue =3D GetPropertyBooleanValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, L"PowerManagementPolicy/PolicyEnabled", > ConfigureLang); > + if (BooleanValue !=3D NULL) { > + if (ProvisionMode || *MemoryCs->PowerManagementPolicy- > >PolicyEnabled !=3D *BooleanValue) { > + IntegerValue =3D AllocatePool (sizeof (*IntegerValue)); > + if (IntegerValue !=3D NULL) { > + *IntegerValue =3D (BooleanValue ? 0x01 : 0x00); > + MemoryCs->PowerManagementPolicy->PolicyEnabled =3D > IntegerValue; > + PropertyChanged =3D TRUE; > + } > } > } > } > } >=20 > - if (UnusedProperty) { > - FreePool (MemoryCs->PowerManagementPolicy); > - MemoryCs->PowerManagementPolicy =3D NULL; > - } > - > // > // Handle RANKCOUNT > // > @@ -1777,103 +1860,96 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > - // Handle SECURITYCAPABILITIES > + // Handle REGIONS > // > - if(MemoryCs->SecurityCapabilities =3D=3D NULL) { > - MemoryCs->SecurityCapabilities =3D AllocateZeroPool (sizeof > (RedfishMemory_V1_7_1_SecurityCapabilities_CS)); > - ASSERT (MemoryCs->SecurityCapabilities !=3D NULL); > - UnusedProperty =3D TRUE; > - } else { > - UnusedProperty =3D FALSE; > - } > +//// ****** Warning ****** > +// Unsupported array type: > +// >=20 > // > - // Handle SECURITYCAPABILITIES->CONFIGURATIONLOCKCAPABLE > + // Handle SECURITYCAPABILITIES > // > - if (PropertyChecker (MemoryCs->SecurityCapabilities- > >ConfigurationLockCapable, ProvisionMode)) { > - BooleanValue =3D GetPropertyBooleanValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, > L"SecurityCapabilities/ConfigurationLockCapable", ConfigureLang); > - if (BooleanValue !=3D NULL) { > - if (ProvisionMode || *MemoryCs->SecurityCapabilities- > >ConfigurationLockCapable !=3D *BooleanValue) { > - IntegerValue =3D AllocatePool (sizeof (*IntegerValue)); > - if (IntegerValue !=3D NULL) { > - *IntegerValue =3D (BooleanValue ? 0x01 : 0x00); > - MemoryCs->SecurityCapabilities->ConfigurationLockCapable =3D > IntegerValue; > - PropertyChanged =3D TRUE; > - UnusedProperty =3D FALSE; > + if (MemoryCs->SecurityCapabilities !=3D NULL) { > + // > + // Handle SECURITYCAPABILITIES->CONFIGURATIONLOCKCAPABLE > + // > + if (PropertyChecker (MemoryCs->SecurityCapabilities- > >ConfigurationLockCapable, ProvisionMode)) { > + BooleanValue =3D GetPropertyBooleanValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, > L"SecurityCapabilities/ConfigurationLockCapable", ConfigureLang); > + if (BooleanValue !=3D NULL) { > + if (ProvisionMode || *MemoryCs->SecurityCapabilities- > >ConfigurationLockCapable !=3D *BooleanValue) { > + IntegerValue =3D AllocatePool (sizeof (*IntegerValue)); > + if (IntegerValue !=3D NULL) { > + *IntegerValue =3D (BooleanValue ? 0x01 : 0x00); > + MemoryCs->SecurityCapabilities->ConfigurationLockCapable =3D > IntegerValue; > + PropertyChanged =3D TRUE; > + } > } > } > } > - } > - > - // > - // Handle SECURITYCAPABILITIES->DATALOCKCAPABLE > - // > - if (PropertyChecker (MemoryCs->SecurityCapabilities->DataLockCapable, > ProvisionMode)) { > - BooleanValue =3D GetPropertyBooleanValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, L"SecurityCapabilities/DataLockCapable", > ConfigureLang); > - if (BooleanValue !=3D NULL) { > - if (ProvisionMode || *MemoryCs->SecurityCapabilities- > >DataLockCapable !=3D *BooleanValue) { > - IntegerValue =3D AllocatePool (sizeof (*IntegerValue)); > - if (IntegerValue !=3D NULL) { > - *IntegerValue =3D (BooleanValue ? 0x01 : 0x00); > - MemoryCs->SecurityCapabilities->DataLockCapable =3D IntegerVal= ue; > + // > + // Handle SECURITYCAPABILITIES->DATALOCKCAPABLE > + // > + if (PropertyChecker (MemoryCs->SecurityCapabilities->DataLockCapable= , > ProvisionMode)) { > + BooleanValue =3D GetPropertyBooleanValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, L"SecurityCapabilities/DataLockCapable", > ConfigureLang); > + if (BooleanValue !=3D NULL) { > + if (ProvisionMode || *MemoryCs->SecurityCapabilities- > >DataLockCapable !=3D *BooleanValue) { > + IntegerValue =3D AllocatePool (sizeof (*IntegerValue)); > + if (IntegerValue !=3D NULL) { > + *IntegerValue =3D (BooleanValue ? 0x01 : 0x00); > + MemoryCs->SecurityCapabilities->DataLockCapable =3D IntegerV= alue; > + PropertyChanged =3D TRUE; > + } > + } > + } > + } > + // > + // Handle SECURITYCAPABILITIES->MAXPASSPHRASECOUNT > + // > + if (PropertyChecker (MemoryCs->SecurityCapabilities- > >MaxPassphraseCount, ProvisionMode)) { > + NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, > L"SecurityCapabilities/MaxPassphraseCount", ConfigureLang); > + if (NumericValue !=3D NULL) { > + if (ProvisionMode || *MemoryCs->SecurityCapabilities- > >MaxPassphraseCount !=3D *NumericValue) { > + MemoryCs->SecurityCapabilities->MaxPassphraseCount =3D > NumericValue; > PropertyChanged =3D TRUE; > - UnusedProperty =3D FALSE; > } > } > } > - } > - > - // > - // Handle SECURITYCAPABILITIES->MAXPASSPHRASECOUNT > - // > - if (PropertyChecker (MemoryCs->SecurityCapabilities- > >MaxPassphraseCount, ProvisionMode)) { > - NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, > L"SecurityCapabilities/MaxPassphraseCount", ConfigureLang); > - if (NumericValue !=3D NULL) { > - if (ProvisionMode || *MemoryCs->SecurityCapabilities- > >MaxPassphraseCount !=3D *NumericValue) { > - MemoryCs->SecurityCapabilities->MaxPassphraseCount =3D > NumericValue; > - PropertyChanged =3D TRUE; > - UnusedProperty =3D FALSE; > + // > + // Handle SECURITYCAPABILITIES->PASSPHRASECAPABLE > + // > + if (PropertyChecker (MemoryCs->SecurityCapabilities- > >PassphraseCapable, ProvisionMode)) { > + BooleanValue =3D GetPropertyBooleanValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, L"SecurityCapabilities/PassphraseCapable", > ConfigureLang); > + if (BooleanValue !=3D NULL) { > + if (ProvisionMode || *MemoryCs->SecurityCapabilities- > >PassphraseCapable !=3D *BooleanValue) { > + IntegerValue =3D AllocatePool (sizeof (*IntegerValue)); > + if (IntegerValue !=3D NULL) { > + *IntegerValue =3D (BooleanValue ? 0x01 : 0x00); > + MemoryCs->SecurityCapabilities->PassphraseCapable =3D Intege= rValue; > + PropertyChanged =3D TRUE; > + } > + } > } > } > - } > - > - // > - // Handle SECURITYCAPABILITIES->PASSPHRASECAPABLE > - // > - if (PropertyChecker (MemoryCs->SecurityCapabilities->PassphraseCapable= , > ProvisionMode)) { > - BooleanValue =3D GetPropertyBooleanValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, L"SecurityCapabilities/PassphraseCapable", > ConfigureLang); > - if (BooleanValue !=3D NULL) { > - if (ProvisionMode || *MemoryCs->SecurityCapabilities- > >PassphraseCapable !=3D *BooleanValue) { > - IntegerValue =3D AllocatePool (sizeof (*IntegerValue)); > - if (IntegerValue !=3D NULL) { > - *IntegerValue =3D (BooleanValue ? 0x01 : 0x00); > - MemoryCs->SecurityCapabilities->PassphraseCapable =3D IntegerV= alue; > + // > + // Handle SECURITYCAPABILITIES->PASSPHRASELOCKLIMIT > + // > + if (PropertyChecker (MemoryCs->SecurityCapabilities- > >PassphraseLockLimit, ProvisionMode)) { > + NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, L"SecurityCapabilities/PassphraseLockLimit", > ConfigureLang); > + if (NumericValue !=3D NULL) { > + if (ProvisionMode || *MemoryCs->SecurityCapabilities- > >PassphraseLockLimit !=3D *NumericValue) { > + MemoryCs->SecurityCapabilities->PassphraseLockLimit =3D > NumericValue; > PropertyChanged =3D TRUE; > - UnusedProperty =3D FALSE; > } > } > } > - } > - > - // > - // Handle SECURITYCAPABILITIES->PASSPHRASELOCKLIMIT > + // > + // Handle SECURITYCAPABILITIES->SECURITYSTATES > + // > + //// ****** Warning ****** > + // Unsupported array type: > // > - if (PropertyChecker (MemoryCs->SecurityCapabilities- > >PassphraseLockLimit, ProvisionMode)) { > - NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, L"SecurityCapabilities/PassphraseLockLimit", > ConfigureLang); > - if (NumericValue !=3D NULL) { > - if (ProvisionMode || *MemoryCs->SecurityCapabilities- > >PassphraseLockLimit !=3D *NumericValue) { > - MemoryCs->SecurityCapabilities->PassphraseLockLimit =3D NumericV= alue; > - PropertyChanged =3D TRUE; > - UnusedProperty =3D FALSE; > - } > - } > - } >=20 > - if (UnusedProperty) { > - FreePool (MemoryCs->SecurityCapabilities); > - MemoryCs->SecurityCapabilities =3D NULL; > } >=20 > // > @@ -1888,7 +1964,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle SERIALNUMBER > // > @@ -1901,7 +1976,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle SPAREDEVICECOUNT > // > @@ -1914,7 +1988,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle SUBSYSTEMDEVICEID > // > @@ -1927,7 +2000,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle SUBSYSTEMVENDORID > // > @@ -1940,7 +2012,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle VENDORID > // > @@ -1953,7 +2024,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle VOLATILEREGIONNUMBERLIMIT > // > @@ -1966,7 +2036,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle VOLATILEREGIONSIZELIMITMIB > // > @@ -1979,7 +2048,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle VOLATILEREGIONSIZEMAXMIB > // > @@ -1992,7 +2060,6 @@ ProvisioningMemoryProperties ( > } > } > } > - > // > // Handle VOLATILESIZEMIB > // > @@ -2006,8 +2073,6 @@ ProvisioningMemoryProperties ( > } > } >=20 > - > - > // > // Convert C structure back to JSON text. > // > @@ -2039,18 +2104,17 @@ ProvisioningMemoryResource ( > IN EFI_STRING ConfigureLang > ) > { > - CHAR8 *MemoryJson; > + CHAR8 *Json; > EFI_STATUS Status; > - CHAR8 *NewResourceLocation; > - CHAR8 *NewKey; > + EFI_STRING NewResourceLocation; > CHAR8 *EtagStr; > CHAR8 ResourceId[16]; > - CHAR8 NewUri[255]; >=20 > if (IS_EMPTY_STRING (ConfigureLang) || Private =3D=3D NULL) { > return EFI_INVALID_PARAMETER; > } >=20 > + EtagStr =3D NULL; > AsciiSPrint (ResourceId, sizeof (ResourceId), "%d", Index); >=20 > Status =3D ProvisioningMemoryProperties ( > @@ -2059,54 +2123,45 @@ ProvisioningMemoryResource ( > ResourceId, > ConfigureLang, > TRUE, > - &MemoryJson > + &Json > ); > if (EFI_ERROR (Status)) { > DEBUG ((DEBUG_ERROR, "%a, provisioning resource for %s failed: %r\n"= , > __FUNCTION__, ConfigureLang, Status)); > return Status; > } >=20 > - Status =3D CreatePayloadToPostResource (Private->RedfishService, Priva= te- > >Payload, MemoryJson, &NewResourceLocation, &EtagStr); > + Status =3D CreatePayloadToPostResource (Private->RedfishService, Priva= te- > >Payload, Json, &NewResourceLocation, &EtagStr); > if (EFI_ERROR (Status)) { > - DEBUG ((DEBUG_ERROR, "%a, post memory resource for %s failed: %r\n", > __FUNCTION__, ConfigureLang, Status)); > + DEBUG ((DEBUG_ERROR, "%a, post Memory resource for %s failed: %r\n", > __FUNCTION__, ConfigureLang, Status)); > goto RELEASE_RESOURCE; > } >=20 > - NewUri[0] =3D '\0'; > + ASSERT (NewResourceLocation !=3D NULL); >=20 > // > // Keep location of new resource. > // > if (NewResourceLocation !=3D NULL) { > - // > - // Find key > - // > - NewKey =3D AsciiStrStr (NewResourceLocation, RESOURCE_SCHEMA); > - if (NewKey !=3D NULL) { > - NewKey +=3D 6; > - // > - // skip '/' > - // > - if (NewKey[0] =3D=3D '/') { > - NewKey++; > - } > - SetConfigureLangWithkey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, NewKey, Index); > - AsciiSPrint (NewUri, sizeof (NewUri), "%a[%a]", Private->Uri, NewK= ey); > - FreePool (NewResourceLocation); > - } > + RedfisSetRedfishUri (ConfigureLang, NewResourceLocation); > } >=20 > // > // Handle Etag > // > if (EtagStr !=3D NULL) { > - SetEtagWithUri (EtagStr, NewUri); > + SetEtagWithUri (EtagStr, NewResourceLocation); > FreePool (EtagStr); > } >=20 > RELEASE_RESOURCE: >=20 > - FreePool (MemoryJson); > + if (NewResourceLocation !=3D NULL) { > + FreePool (NewResourceLocation); > + } > + > + if (Json !=3D NULL) { > + FreePool (Json); > + } >=20 > return Status; > } > @@ -2126,12 +2181,17 @@ ProvisioningMemoryResources ( >=20 > Status =3D RedfishFeatureGetUnifiedArrayTypeConfigureLang > (RESOURCE_SCHEMA, RESOURCE_SCHEMA_VERSION, > REDPATH_ARRAY_PATTERN, &UnifiedConfigureLangList); > if (EFI_ERROR (Status) || UnifiedConfigureLangList.Count =3D=3D 0) { > - DEBUG ((DEBUG_ERROR, "%a, No HII question found with redpath: %s: > %r\n", __FUNCTION__, REDPATH_ARRAY_PATTERN, Status)); > + DEBUG ((DEBUG_ERROR, "%a, No HII question found with configure > language: %s: %r\n", __FUNCTION__, REDPATH_ARRAY_PATTERN, Status)); > return EFI_NOT_FOUND; > } > + // > + // Set the configuration language in the > RESOURCE_INFORMATION_EXCHANGE. > + // This information is sent back to the parent resource (e.g. the coll= ection > driver). > + // > + EdkIIRedfishResourceSetConfigureLang (&UnifiedConfigureLangList); >=20 > for (Index =3D 0; Index < UnifiedConfigureLangList.Count; Index++) { > - DEBUG ((DEBUG_INFO, "[%d] create memory resource from: %s\n", > UnifiedConfigureLangList.List[Index].Index, > UnifiedConfigureLangList.List[Index].ConfigureLang)); > + DEBUG ((DEBUG_INFO, "[%d] create Memory resource from: %s\n", > UnifiedConfigureLangList.List[Index].Index, > UnifiedConfigureLangList.List[Index].ConfigureLang)); > ProvisioningMemoryResource (Private, > UnifiedConfigureLangList.List[Index].Index, > UnifiedConfigureLangList.List[Index].ConfigureLang); > FreePool (UnifiedConfigureLangList.List[Index].ConfigureLang); > } > @@ -2145,14 +2205,69 @@ ProvisioningMemoryExistResource ( > IN REDFISH_RESOURCE_COMMON_PRIVATE *Private > ) > { > + EFI_STATUS Status; > + EFI_STRING ConfigureLang; > + CHAR8 *EtagStr; > + CHAR8 *Json; > + > if (Private =3D=3D NULL) { > return EFI_INVALID_PARAMETER; > } >=20 > - Private->Json =3D JsonDumpString (RedfishJsonInPayload (Private->Paylo= ad), > EDKII_JSON_COMPACT); > - ASSERT (Private->Json !=3D NULL); > + EtagStr =3D NULL; > + Json =3D NULL; > + ConfigureLang =3D NULL; > + > + ConfigureLang =3D RedfishGetConfigLanguage (Private->Uri); > + if (ConfigureLang =3D=3D NULL) { > + return EFI_NOT_FOUND; > + } > + > + Status =3D ProvisioningMemoryProperties ( > + Private->JsonStructProtocol, > + MemoryEmptyJson, > + NULL, > + ConfigureLang, > + TRUE, > + &Json > + ); > + if (EFI_ERROR (Status)) { > + if (Status =3D=3D EFI_NOT_FOUND) { > + DEBUG ((REDFISH_DEBUG_TRACE, "%a, provisioning existing resource > for %s ignored. Nothing changed\n", __FUNCTION__, ConfigureLang)); > + } else { > + DEBUG ((DEBUG_ERROR, "%a, provisioning existing resource for %s > failed: %r\n", __FUNCTION__, ConfigureLang, Status)); > + } > + goto ON_RELEASE; > + } > + > + DEBUG ((REDFISH_DEBUG_TRACE, "%a, provisioning existing resource for > %s\n", __FUNCTION__, ConfigureLang)); > + // > + // PUT back to instance > + // > + Status =3D CreatePayloadToPatchResource (Private->RedfishService, Priv= ate- > >Payload, Json, &EtagStr); > + if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "%a, patch resource for %s failed: %r\n", > __FUNCTION__, ConfigureLang, Status)); > + } > + > + // > + // Handle Etag > + // > + if (EtagStr !=3D NULL) { > + SetEtagWithUri (EtagStr, Private->Uri); > + FreePool (EtagStr); > + } > + > +ON_RELEASE: >=20 > - return RedfishUpdateResourceCommon (Private, Private->Json); > + if (Json !=3D NULL) { > + FreePool (Json); > + } > + > + if (ConfigureLang !=3D NULL) { > + FreePool (ConfigureLang); > + } > + > + return Status; > } >=20 > /** > @@ -2200,9 +2315,6 @@ RedfishCheckResourceCommon ( > EFI_STRING *ConfigureLangList; > UINTN Count; > EFI_STRING Property; > - CHAR8 *PropertyAscii; > - UINTN BuffSize; > - CHAR8 *Match; >=20 > if (Private =3D=3D NULL || IS_EMPTY_STRING (Json)) { > return EFI_INVALID_PARAMETER; > @@ -2221,27 +2333,16 @@ RedfishCheckResourceCommon ( > Status =3D EFI_SUCCESS; > for (Index =3D 0; Index < Count; Index++) { >=20 > - Property =3D GetPropertyFromConfigureLang (ConfigureLangList[Index])= ; > + Property =3D GetPropertyFromConfigureLang (Private->Uri, > ConfigureLangList[Index]); > if (Property =3D=3D NULL) { > continue; > } >=20 > - DEBUG ((DEBUG_INFO, "[%d] check resource from: %s\n", Index, > Property)); > - > - BuffSize =3D StrLen (Property) + 1; > - PropertyAscii =3D AllocatePool (BuffSize); > - UnicodeStrToAsciiStrS (Property, PropertyAscii, BuffSize); > - > - // > - // check to see if it is partial match. > - // > - Match =3D AsciiStrStr (Json, PropertyAscii); > - if (Match =3D=3D NULL || AsciiStrnCmp (Match, PropertyAscii, AsciiSt= rLen > (PropertyAscii)) !=3D 0) { > + DEBUG ((DEBUG_INFO, "%a, [%d] check attribute for: %s\n", > __FUNCTION__, Index, Property)); > + if (!MatchPropertyWithJsonContext (Property, Json)) { > + DEBUG ((DEBUG_INFO, "%a, property is missing: %s\n", __FUNCTION__, > Property)); > Status =3D EFI_NOT_FOUND; > - DEBUG ((DEBUG_ERROR, "%a, property %a is missing\n", > __FUNCTION__, PropertyAscii)); > } > - > - FreePool (PropertyAscii); > } >=20 > FreePool (ConfigureLangList); > @@ -2249,7 +2350,6 @@ RedfishCheckResourceCommon ( > return Status; > } >=20 > - > /** > Update resource to given URI. >=20 > @@ -2263,40 +2363,34 @@ RedfishCheckResourceCommon ( > EFI_STATUS > RedfishUpdateResourceCommon ( > IN REDFISH_RESOURCE_COMMON_PRIVATE *Private, > - IN CHAR8 *Json > + IN CHAR8 *InputJson > ) > { > EFI_STATUS Status; > - CHAR8 *MemoryJson; > - CHAR8 *ArrayKey; > + CHAR8 *Json; > EFI_STRING ConfigureLang; > CHAR8 *EtagStr; >=20 > - if (Private =3D=3D NULL || IS_EMPTY_STRING (Json)) { > + if (Private =3D=3D NULL || IS_EMPTY_STRING (InputJson)) { > return EFI_INVALID_PARAMETER; > } >=20 > - MemoryJson =3D NULL; > + EtagStr =3D NULL; > + Json =3D NULL; > ConfigureLang =3D NULL; > - ArrayKey =3D NULL; >=20 > - Status =3D GetArraykeyFromUri (Private->Uri, &ArrayKey); > - if (EFI_ERROR (Status)) { > - return Status; > - } > - > - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, > RESOURCE_SCHEMA_VERSION, NULL, ArrayKey); > + ConfigureLang =3D RedfishGetConfigLanguage (Private->Uri); > if (ConfigureLang =3D=3D NULL) { > return EFI_NOT_FOUND; > } >=20 > Status =3D ProvisioningMemoryProperties ( > Private->JsonStructProtocol, > - Json, > + InputJson, > NULL, > ConfigureLang, > FALSE, > - &MemoryJson > + &Json > ); > if (EFI_ERROR (Status)) { > if (Status =3D=3D EFI_NOT_FOUND) { > @@ -2311,9 +2405,9 @@ RedfishUpdateResourceCommon ( > // > // PUT back to instance > // > - Status =3D CreatePayloadToPatchResource (Private->RedfishService, Priv= ate- > >Payload, MemoryJson, &EtagStr); > + Status =3D CreatePayloadToPatchResource (Private->RedfishService, Priv= ate- > >Payload, Json, &EtagStr); > if (EFI_ERROR (Status)) { > - DEBUG ((DEBUG_ERROR, "%a, post memory resource for %s failed: %r\n", > __FUNCTION__, ConfigureLang, Status)); > + DEBUG ((DEBUG_ERROR, "%a, patch resource for %s failed: %r\n", > __FUNCTION__, ConfigureLang, Status)); > } >=20 > // > @@ -2326,17 +2420,81 @@ RedfishUpdateResourceCommon ( >=20 > ON_RELEASE: >=20 > - if (MemoryJson !=3D NULL) { > - FreePool (MemoryJson); > + if (Json !=3D NULL) { > + FreePool (Json); > } >=20 > if (ConfigureLang !=3D NULL) { > FreePool (ConfigureLang); > } >=20 > - if (ArrayKey !=3D NULL) { > - FreePool (ArrayKey); > + return Status; > +} > + > +/** > + Identify resource from given URI. > + > + @param[in] This Pointer to > REDFISH_RESOURCE_COMMON_PRIVATE instance. > + @param[in] Json The JSON to consume. > + > + @retval EFI_SUCCESS Value is returned successfully. > + @retval Others Some error happened. > + > +**/ > +EFI_STATUS > +RedfishIdentifyResourceCommon ( > + IN REDFISH_RESOURCE_COMMON_PRIVATE *Private, > + IN CHAR8 *Json > + ) > +{ > + BOOLEAN Supported; > + EFI_STATUS Status; > + EFI_STRING EndOfChar; > + REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST ConfigLangList; > + > + Supported =3D RedfishIdentifyResource (Private->Uri, Private->Json); > + if (Supported) { > + Status =3D RedfishFeatureGetUnifiedArrayTypeConfigureLang > (RESOURCE_SCHEMA, RESOURCE_SCHEMA_VERSION, > REDPATH_ARRAY_PATTERN, &ConfigLangList); > + if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "%a, > BiosConfigToRedfishGetConfigureLangRegex failed: %r\n", __FUNCTION__, > Status)); > + return Status; > + } > + > + if (ConfigLangList.Count =3D=3D 0) { > + return EFI_SUCCESS; > + } > + > + EndOfChar =3D StrStr (ConfigLangList.List[0].ConfigureLang, L"}"); > + if (EndOfChar =3D=3D NULL) { > + ASSERT (FALSE); > + return EFI_DEVICE_ERROR; > + } > + > + //EndOfChar =3D StrStr (ConfigLangList.List[0].ConfigureLang, L"}"); > + Status =3D IsRedpathArray (ConfigLangList.List[0].ConfigureLang, NUL= L, > &EndOfChar); > + if (EFI_ERROR (Status) && Status !=3D EFI_NOT_FOUND) { > + ASSERT (FALSE); > + return EFI_DEVICE_ERROR; > + } > + if (Status !=3D EFI_SUCCESS) { > + // > + // This is not the collection redpath. > + // > + GetRedpathNodeByIndex (ConfigLangList.List[0].ConfigureLang, 0, > &EndOfChar); > + } > + *(++EndOfChar) =3D '\0'; > + // > + // Keep URI and ConfigLang mapping > + // > + RedfisSetRedfishUri (ConfigLangList.List[0].ConfigureLang, Private->= Uri); > + // > + // Set the configuration language in the > RESOURCE_INFORMATION_EXCHANGE. > + // This information is sent back to the parent resource (e.g. the co= llection > driver). > + // > + EdkIIRedfishResourceSetConfigureLang (&ConfigLangList); > + DestroyConfiglanguageList (&ConfigLangList); > + return EFI_SUCCESS; > } >=20 > - return Status; > + return EFI_UNSUPPORTED; > } > \ No newline at end of file > diff --git > a/RedfishClientPkg/Features/Memory/V1_7_1/Common/RedfishMemoryCo > mmon.h > b/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon. > h > similarity index 89% > rename from > RedfishClientPkg/Features/Memory/V1_7_1/Common/RedfishMemoryCom > mon.h > rename to > RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.h > index e2a4f45681..05c58b3553 100644 > --- > a/RedfishClientPkg/Features/Memory/V1_7_1/Common/RedfishMemoryCo > mmon.h > +++ > b/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon. > h > @@ -20,7 +20,7 @@ > #define RESOURCE_SCHEMA_MINOR "7" > #define RESOURCE_SCHEMA_ERRATA "1" > #define RESOURCE_SCHEMA_VERSION "v1_7_1" > -#define REDPATH_ARRAY_PATTERN L"/Memory/{.*}/" > +#define REDPATH_ARRAY_PATTERN L"/Memory/\\{.*\\}/" > #define REDPATH_ARRAY_PREFIX L"/Memory/" > #define RESOURCE_SCHEMA_FULL "x-uefi-redfish-Memory.v1_7_1" >=20 > diff --git > a/RedfishClientPkg/Features/Memory/V1_7_1/Dxe/RedfishMemoryDxe.c > b/RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.c > similarity index 75% > rename from > RedfishClientPkg/Features/Memory/V1_7_1/Dxe/RedfishMemoryDxe.c > rename to RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.c > index d1fbf2c237..0a9d344d6f 100644 > --- > a/RedfishClientPkg/Features/Memory/V1_7_1/Dxe/RedfishMemoryDxe.c > +++ b/RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.c > @@ -1,16 +1,18 @@ > /** @file > Redfish feature driver implementation - Memory >=20 > - (C) Copyright 2020-2021 Hewlett Packard Enterprise Development LP
> + (C) Copyright 2020-2022 Hewlett Packard Enterprise Development LP
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ >=20 > -#include "../Common/RedfishMemoryCommon.h" > +#include "../Common/MemoryCommon.h" >=20 > extern REDFISH_RESOURCE_COMMON_PRIVATE > *mRedfishResourcePrivate; >=20 > +EFI_HANDLE medfishResourceConfigProtocolHandle; > + > /** > Provising redfish resource by given URI. >=20 > @@ -26,8 +28,8 @@ extern REDFISH_RESOURCE_COMMON_PRIVATE > *mRedfishResourcePrivate; > EFI_STATUS > RedfishResourceProvisioningResource ( > IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This, > - IN CHAR8 *Uri, > - IN BOOLEAN PostMode > + IN EFI_STRING Uri, > + IN BOOLEAN PostMode > ) > { > REDFISH_RESOURCE_COMMON_PRIVATE *Private; > @@ -38,9 +40,7 @@ RedfishResourceProvisioningResource ( > return EFI_INVALID_PARAMETER; > } >=20 > - if (!PostMode) { > - return EFI_UNSUPPORTED; > - } > + DEBUG ((DEBUG_INFO, "%a, provisioning in %s mode\n", __FUNCTION__, > (PostMode ? L"POST" : L"PATCH"))); >=20 > Private =3D > REDFISH_RESOURCE_COMMON_PRIVATE_DATA_FROM_RESOURCE_PROTO > COL (This); >=20 > @@ -48,9 +48,9 @@ RedfishResourceProvisioningResource ( > return EFI_NOT_READY; > } >=20 > - Status =3D GetResourceByPath (Private->RedfishService, Uri, &Response)= ; > + Status =3D GetResourceByUri (Private->RedfishService, Uri, &Response); > if (EFI_ERROR (Status)) { > - DEBUG ((DEBUG_ERROR, "%a, get resource from: %a failed\n", > __FUNCTION__, Uri)); > + DEBUG ((DEBUG_ERROR, "%a, get resource from: %s failed\n", > __FUNCTION__, Uri)); > return Status; > } >=20 > @@ -58,7 +58,7 @@ RedfishResourceProvisioningResource ( > Private->Payload =3D Response.Payload; > ASSERT (Private->Payload !=3D NULL); >=20 > - Status =3D RedfishProvisioningResourceCommon (Private, FALSE); > + Status =3D RedfishProvisioningResourceCommon (Private, !PostMode); >=20 > // > // Release resource > @@ -89,12 +89,13 @@ RedfishResourceProvisioningResource ( > EFI_STATUS > RedfishResourceConsumeResource ( > IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This, > - IN CHAR8 *Uri > + IN EFI_STRING Uri > ) > { > REDFISH_RESOURCE_COMMON_PRIVATE *Private; > EFI_STATUS Status; > REDFISH_RESPONSE Response; > + CHAR8 *Etag; >=20 > if (This =3D=3D NULL || IS_EMPTY_STRING (Uri)) { > return EFI_INVALID_PARAMETER; > @@ -106,9 +107,9 @@ RedfishResourceConsumeResource ( > return EFI_NOT_READY; > } >=20 > - Status =3D GetResourceByPath (Private->RedfishService, Uri, &Response)= ; > + Status =3D GetResourceByUri (Private->RedfishService, Uri, &Response); > if (EFI_ERROR (Status)) { > - DEBUG ((DEBUG_ERROR, "%a, get resource from: %a failed\n", > __FUNCTION__, Uri)); > + DEBUG ((DEBUG_ERROR, "%a, get resource from: %s failed\n", > __FUNCTION__, Uri)); > return Status; > } >=20 > @@ -119,9 +120,27 @@ RedfishResourceConsumeResource ( > Private->Json =3D JsonDumpString (RedfishJsonInPayload (Private->Paylo= ad), > EDKII_JSON_COMPACT); > ASSERT (Private->Json !=3D NULL); >=20 > - Status =3D RedfishConsumeResourceCommon (Private, Private->Json); > + // > + // Find etag in HTTP response header > + // > + Etag =3D NULL; > + Status =3D GetEtagAndLocation (&Response, &Etag, NULL); > if (EFI_ERROR (Status)) { > - DEBUG ((DEBUG_ERROR, "%a, failed to consume resource from: %a %r\n", > __FUNCTION__, Uri, Status)); > + DEBUG ((DEBUG_ERROR, "%a, failed to get ETag from HTTP header\n", > __FUNCTION__)); > + } > + > + Status =3D RedfishConsumeResourceCommon (Private, Private->Json, Etag)= ; > + if (EFI_ERROR (Status)) { > + if (Status !=3D EFI_ALREADY_STARTED) { > + DEBUG ((DEBUG_ERROR, "%a, failed to consume resource from: %s: > %r\n", __FUNCTION__, Uri, Status)); > + } > + } else { > + // > + // Keep etag after consuming pending settings. > + // > + if (Etag !=3D NULL) { > + SetEtagWithUri (Etag, Private->Uri); > + } > } >=20 > // > @@ -193,7 +212,7 @@ RedfishResourceGetInfo ( > EFI_STATUS > RedfishResourceUpdate ( > IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This, > - IN CHAR8 *Uri > + IN EFI_STRING Uri > ) > { > REDFISH_RESOURCE_COMMON_PRIVATE *Private; > @@ -210,9 +229,9 @@ RedfishResourceUpdate ( > return EFI_NOT_READY; > } >=20 > - Status =3D GetResourceByPath (Private->RedfishService, Uri, &Response)= ; > + Status =3D GetResourceByUri (Private->RedfishService, Uri, &Response); > if (EFI_ERROR (Status)) { > - DEBUG ((DEBUG_ERROR, "%a, get resource from: %a failed\n", > __FUNCTION__, Uri)); > + DEBUG ((DEBUG_ERROR, "%a, get resource from: %s failed\n", > __FUNCTION__, Uri)); > return Status; > } >=20 > @@ -225,7 +244,7 @@ RedfishResourceUpdate ( >=20 > Status =3D RedfishUpdateResourceCommon (Private, Private->Json); > if (EFI_ERROR (Status)) { > - DEBUG ((DEBUG_ERROR, "%a, failed to update resource from: %a %r\n", > __FUNCTION__, Uri, Status)); > + DEBUG ((DEBUG_ERROR, "%a, failed to update resource from: %s: %r\n", > __FUNCTION__, Uri, Status)); > } >=20 > // > @@ -262,7 +281,7 @@ RedfishResourceUpdate ( > EFI_STATUS > RedfishResourceCheck ( > IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This, > - IN CHAR8 *Uri > + IN EFI_STRING Uri > ) > { > REDFISH_RESOURCE_COMMON_PRIVATE *Private; > @@ -279,9 +298,9 @@ RedfishResourceCheck ( > return EFI_NOT_READY; > } >=20 > - Status =3D GetResourceByPath (Private->RedfishService, Uri, &Response)= ; > + Status =3D GetResourceByUri (Private->RedfishService, Uri, &Response); > if (EFI_ERROR (Status)) { > - DEBUG ((DEBUG_ERROR, "%a, get resource from: %a failed\n", > __FUNCTION__, Uri)); > + DEBUG ((DEBUG_ERROR, "%a, get resource from: %s failed\n", > __FUNCTION__, Uri)); > return Status; > } >=20 > @@ -294,7 +313,7 @@ RedfishResourceCheck ( >=20 > Status =3D RedfishCheckResourceCommon (Private, Private->Json); > if (EFI_ERROR (Status)) { > - DEBUG ((DEBUG_ERROR, "%a, failed to check resource from: %a %r\n", > __FUNCTION__, Uri, Status)); > + DEBUG ((DEBUG_ERROR, "%a, failed to check resource from: %s: %r\n", > __FUNCTION__, Uri, Status)); > } >=20 > // > @@ -318,11 +337,82 @@ RedfishResourceCheck ( > return Status; > } >=20 > +/** > + Identify resource on given URI. > + > + @param[in] This Pointer to > EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL instance. > + @param[in] Uri The target URI to consume. > + > + @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 > +RedfishResourceIdentify ( > + IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This, > + IN EFI_STRING Uri > + ) > +{ > + REDFISH_RESOURCE_COMMON_PRIVATE *Private; > + EFI_STATUS Status; > + REDFISH_RESPONSE Response; > + > + if (This =3D=3D NULL || IS_EMPTY_STRING (Uri)) { > + return EFI_INVALID_PARAMETER; > + } > + > + Private =3D > REDFISH_RESOURCE_COMMON_PRIVATE_DATA_FROM_RESOURCE_PROTO > COL (This); > + > + if (Private->RedfishService =3D=3D NULL) { > + return EFI_NOT_READY; > + } > + > + Status =3D GetResourceByUri (Private->RedfishService, Uri, &Response); > + if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "%a, get resource from: %s failed\n", > __FUNCTION__, Uri)); > + return Status; > + } > + > + Private->Uri =3D Uri; > + Private->Payload =3D Response.Payload; > + ASSERT (Private->Payload !=3D NULL); > + > + Private->Json =3D JsonDumpString (RedfishJsonInPayload (Private->Paylo= ad), > EDKII_JSON_COMPACT); > + ASSERT (Private->Json !=3D NULL); > + > + Status =3D RedfishIdentifyResourceCommon (Private, Private->Json); > + if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "%a, identify %s failed: %r\n", __FUNCTION__, > Uri, Status)); > + } > + // > + // Release resource > + // > + if (Private->Payload !=3D NULL) { > + RedfishFreeResponse ( > + Response.StatusCode, > + Response.HeaderCount, > + Response.Headers, > + Response.Payload > + ); > + Private->Payload =3D NULL; > + } > + > + if (Private->Json !=3D NULL) { > + FreePool (Private->Json); > + Private->Json =3D NULL; > + } > + > + return Status; > +} > + > EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL mRedfishResourceConfig =3D > { > RedfishResourceProvisioningResource, > RedfishResourceConsumeResource, > RedfishResourceUpdate, > RedfishResourceCheck, > + RedfishResourceIdentify, > RedfishResourceGetInfo > }; >=20 > @@ -525,6 +615,8 @@ RedfishResourceEntryPoint ( > return EFI_ALREADY_STARTED; > } >=20 > + medfishResourceConfigProtocolHandle =3D ImageHandle; > + > mRedfishResourcePrivate =3D AllocateZeroPool (sizeof > (REDFISH_RESOURCE_COMMON_PRIVATE)); > CopyMem (&mRedfishResourcePrivate->ConfigHandler, > &mRedfishConfigHandler, sizeof > (EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL)); > CopyMem (&mRedfishResourcePrivate->RedfishResourceConfig, > &mRedfishResourceConfig, sizeof > (EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL)); > diff --git > a/RedfishClientPkg/Features/Memory/V1_7_1/Dxe/RedfishMemoryDxe.inf > b/RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.inf > similarity index 57% > rename from > RedfishClientPkg/Features/Memory/V1_7_1/Dxe/RedfishMemoryDxe.inf > rename to > RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.inf > index 30746adaed..ae2e8e8f74 100644 > --- > a/RedfishClientPkg/Features/Memory/V1_7_1/Dxe/RedfishMemoryDxe.inf > +++ b/RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.inf > @@ -1,6 +1,6 @@ > ## @file > # > -# (C) Copyright 2020-2021 Hewlett Packard Enterprise Development LP
> +# (C) Copyright 2020-2022 Hewlett Packard Enterprise Development > LP
> # > # SPDX-License-Identifier: BSD-2-Clause-Patent > # > @@ -9,8 +9,8 @@ >=20 > [Defines] > INF_VERSION =3D 0x00010005 > - BASE_NAME =3D RedfishMemoryDxe > - FILE_GUID =3D f5594d13-ca13-485f-ac3a-80c5074dd8c0 > + BASE_NAME =3D MemoryDxe > + FILE_GUID =3D 69a1a994-ec14-4dd0-ba0d-d1b51b7bab51 > MODULE_TYPE =3D DXE_DRIVER > VERSION_STRING =3D 1.0 > ENTRY_POINT =3D RedfishResourceEntryPoint > @@ -23,22 +23,25 @@ > RedfishClientPkg/RedfishClientPkg.dec >=20 > [Sources] > - ../Common/RedfishMemoryCommon.h > - ../Common/RedfishMemoryCommon.c > - RedfishMemoryDxe.c > + ../Common/MemoryCommon.h > + ../Common/MemoryCommon.c > + MemoryDxe.c >=20 > [LibraryClasses] > BaseMemoryLib > DebugLib > + EdkIIRedfishResourceConfigLib > RedfishLib > RedfishFeatureUtilityLib > + RedfishResourceIdentifyLib > UefiLib > UefiDriverEntryPoint >=20 > + > [Protocols] > - gEdkIIRedfishConfigHandlerProtocolGuid ## PRODUCED > - gEfiRestJsonStructureProtocolGuid ## CONSUMED > - gEdkIIRedfishResourceConfigProtocolGuid ## PRODUCED > + gEdkIIRedfishConfigHandlerProtocolGuid ## PRODUCED > + gEfiRestJsonStructureProtocolGuid ## CONSUMED > + gEdkIIRedfishResourceConfigProtocolGuid ## PRODUCED >=20 > [Pcd] > gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaStringSize > diff --git a/RedfishClientPkg/Include/RedfishResourceCommon.h > b/RedfishClientPkg/Include/RedfishResourceCommon.h > index 1ba992bb69..af4b809121 100644 > --- a/RedfishClientPkg/Include/RedfishResourceCommon.h > +++ b/RedfishClientPkg/Include/RedfishResourceCommon.h > @@ -1,7 +1,7 @@ > /** @file > Redfish feature driver common header file. >=20 > - (C) Copyright 2020-2021 Hewlett Packard Enterprise Development LP
> + (C) Copyright 2020-2022 Hewlett Packard Enterprise Development LP
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @@ -11,8 +11,8 @@ > #define EFI_REDFISH_RESOURCE_COMMON_H_ >=20 > #define MAX_RED_PATH_LEN 128 > -#define IS_EMPTY_STRING(a) ((a) =3D=3D NULL || (a)[0] =3D=3D '\0') > -#define REDFISH_DEBUG_TRACE DEBUG_INFO > + > +#include >=20 > // > // Libraries > @@ -23,14 +23,18 @@ > #include > #include > #include > +#include > #include > #include > #include > #include > +#include > +#include >=20 > // > // Protocols > // > +#include > #include > #include > #include > @@ -43,9 +47,15 @@ typedef struct > _REDFISH_RESOURCE_COMMON_PRIVATE { > EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL RedfishResourceConfig; > EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL ConfigHandler; > EFI_EVENT Event; > - CHAR8 *Uri; > + EFI_STRING Uri; > CHAR8 *Json; > REDFISH_PAYLOAD Payload; > + // > + // Below are used for the external resource. > + // > + EDKII_REDFISH_FEATURE_PROTOCOL *FeatureProtocol; > + RESOURCE_INFORMATION_EXCHANGE *InformationExchange; > + EFI_STRING RedfishVersion; > } REDFISH_RESOURCE_COMMON_PRIVATE; >=20 > #define > REDFISH_RESOURCE_COMMON_PRIVATE_DATA_FROM_CONFIG_PROTOCO > L(This) \ > @@ -60,6 +70,7 @@ typedef struct > _REDFISH_RESOURCE_COMMON_PRIVATE { >=20 > @param[in] This Pointer to > REDFISH_RESOURCE_COMMON_PRIVATE instance. > @param[in] Json The JSON to consume. > + @param[in] HeaderEtag The Etag string returned in HTTP head= er. >=20 > @retval EFI_SUCCESS Value is returned successfully. > @retval Others Some error happened. > @@ -68,7 +79,8 @@ typedef struct > _REDFISH_RESOURCE_COMMON_PRIVATE { > EFI_STATUS > RedfishConsumeResourceCommon ( > IN REDFISH_RESOURCE_COMMON_PRIVATE *Private, > - IN CHAR8 *Json > + IN CHAR8 *Json, > + IN CHAR8 *HeaderEtag OPTIONAL > ); >=20 > /** > @@ -120,4 +132,20 @@ RedfishUpdateResourceCommon ( > IN CHAR8 *Json > ); >=20 > +/** > + Identify resource from given URI. > + > + @param[in] This Pointer to > REDFISH_RESOURCE_COMMON_PRIVATE instance. > + @param[in] Json The JSON to consume. > + > + @retval EFI_SUCCESS Value is returned successfully. > + @retval Others Some error happened. > + > +**/ > +EFI_STATUS > +RedfishIdentifyResourceCommon ( > + IN REDFISH_RESOURCE_COMMON_PRIVATE *Private, > + IN CHAR8 *Json > + ); > + > #endif > diff --git a/RedfishClientPkg/RedfishClient.fdf.inc > b/RedfishClientPkg/RedfishClient.fdf.inc > index 3619d2a20f..5c4b9670b0 100644 > --- a/RedfishClientPkg/RedfishClient.fdf.inc > +++ b/RedfishClientPkg/RedfishClient.fdf.inc > @@ -14,7 +14,7 @@ > INF RedfishClientPkg/RedfishFeatureCoreDxe/RedfishFeatureCoreDxe.inf > INF RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.inf > INF > RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.inf > - INF > RedfishClientPkg/Features/Memory/V1_7_1/Dxe/RedfishMemoryDxe.inf > + INF RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.inf > INF > RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.inf >=20 > !include RedfishClientPkg/RedfishJsonStructureDxe.fdf.inc > diff --git a/RedfishClientPkg/RedfishClientComponents.dsc.inc > b/RedfishClientPkg/RedfishClientComponents.dsc.inc > index 5f1aff3c4b..031d87558e 100644 > --- a/RedfishClientPkg/RedfishClientComponents.dsc.inc > +++ b/RedfishClientPkg/RedfishClientComponents.dsc.inc > @@ -19,7 +19,7 @@ > # > # Below two modules should be pulled in by build tool. > # > - RedfishClientPkg/Features/Memory/V1_7_1/Dxe/RedfishMemoryDxe.inf > + RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.inf >=20 > RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.inf >=20 > !include RedfishClientPkg/RedfishJsonStructureDxe.dsc.inc > -- > 2.32.0.windows.2