From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web09.8534.1657628523942624851 for ; Tue, 12 Jul 2022 05:22:04 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=ZHe4E+CT; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0192e24d61=nickle.wang@hpe.com) Received: from pps.filterd (m0150245.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 26C9liG3016723; Tue, 12 Jul 2022 12:22:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : mime-version; s=pps0720; bh=geCd/uBsiNjO9VxFHxiJc/S+mj6TS56GDCrUQgrqZ8A=; b=ZHe4E+CTE80DEgS4LYWD7CESXTw3LwpAjucMQI6R+rCBe4ZLU2vaJTiBiB0lZQfwAJPz 7MNiq3/r0AR93So4Fj0+iz5v5Vghk4CvVhVZi366wtoVxCabJD0sGH6yw+1RHtDzPDG9 FFEdr3vZ8iO56WVONh84quFx9Sgtx/UJdFxLuudK1yUMhfhMS6LVaQ/Yb2wZJllopHOG mftIK6scja4XVsBqqg8NKfOFghhssfKm/T4iSOk0aRj4BHSUMoyyQjB8ClKtAxELNWcq M+bqPjHtgtNoCjsuo0A9h+AoINNofjKjLc5vuDDsukTJfcWCqQ5s/0R5tyNeEiIQ/U7O bQ== Received: from p1lg14881.it.hpe.com (p1lg14881.it.hpe.com [16.230.97.202]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3h96mtha11-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Jul 2022 12:22:01 +0000 Received: from p1lg14885.dc01.its.hpecorp.net (unknown [10.119.18.236]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by p1lg14881.it.hpe.com (Postfix) with ESMTPS id E12EF80208E; Tue, 12 Jul 2022 12:22:00 +0000 (UTC) Received: from WAFM3XJD5N.asiapacific.hpqcorp.net (unknown [16.231.227.36]) by p1lg14885.dc01.its.hpecorp.net (Postfix) with ESMTP id D87C9803287; Tue, 12 Jul 2022 12:21:59 +0000 (UTC) From: "Nickle Wang" To: devel@edk2.groups.io Cc: Abner Chang , Yang Atom , Nick Ramirez Subject: [edk2-staging][PATCH 12/15] edk2-staging/RedfishClientPkg: Rename Memory feature driver Date: Tue, 12 Jul 2022 20:21:40 +0800 Message-Id: <20220712122143.1827-13-nickle.wang@hpe.com> X-Mailer: git-send-email 2.32.0.windows.2 In-Reply-To: <20220712122143.1827-1-nickle.wang@hpe.com> References: <20220712122143.1827-1-nickle.wang@hpe.com> X-Proofpoint-GUID: hAXBRFtVTcF4dwgqip3k7aJXArVmQiol X-Proofpoint-ORIG-GUID: hAXBRFtVTcF4dwgqip3k7aJXArVmQiol X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-07-12_08,2022-07-12_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 clxscore=1015 bulkscore=0 priorityscore=1501 mlxscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 spamscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2206140000 definitions=main-2207120048 Content-Transfer-Encoding: quoted-printable 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. 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/{RedfishMemoryCommon= .c =3D> MemoryCommon.c} (64%) rename RedfishClientPkg/Features/Memory/V1_7_1/Common/{RedfishMemoryCommon= .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%) 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/RedfishMemoryCommon.c +++ b/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.c @@ -1,45 +1,54 @@ /** @file=0D Redfish feature driver implementation - common functions=0D =0D - (C) Copyright 2020-2021 Hewlett Packard Enterprise Development LP
=0D + (C) Copyright 2020-2022 Hewlett Packard Enterprise Development LP
=0D =0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D =0D -#include "RedfishMemoryCommon.h"=0D +#include "MemoryCommon.h"=0D =0D CHAR8 MemoryEmptyJson[] =3D "{\"@odata.id\": \"\", \"@odata.type\": \"#Mem= ory.v1_7_1.Memory\", \"Id\": \"\", \"Name\": \"\"}";=0D =0D REDFISH_RESOURCE_COMMON_PRIVATE *mRedfishResourcePrivate =3D NULL;=0D =0D +/**=0D + Consume resource from given URI.=0D +=0D + @param[in] This Pointer to REDFISH_RESOURCE_COMMON_PRIV= ATE instance.=0D + @param[in] Json The JSON to consume.=0D + @param[in] HeaderEtag The Etag string returned in HTTP header= .=0D +=0D + @retval EFI_SUCCESS Value is returned successfully.=0D + @retval Others Some error happened.=0D +=0D +**/=0D EFI_STATUS=0D RedfishConsumeResourceCommon (=0D IN REDFISH_RESOURCE_COMMON_PRIVATE *Private,=0D - IN CHAR8 *MemoryJson=0D + IN CHAR8 *Json,=0D + IN CHAR8 *HeaderEtag OPTIONAL=0D )=0D {=0D - EFI_STATUS Status;=0D + EFI_STATUS Status;=0D EFI_REDFISH_MEMORY_V1_7_1 *Memory;=0D EFI_REDFISH_MEMORY_V1_7_1_CS *MemoryCs;=0D - EFI_STRING ConfigureLang;=0D - CHAR8 *Arraykey;=0D - CHAR8 *EtagInDb;=0D + EFI_STRING ConfigureLang;=0D +=0D =0D - if (Private =3D=3D NULL || IS_EMPTY_STRING (MemoryJson)) {=0D + if (Private =3D=3D NULL || IS_EMPTY_STRING (Json)) {=0D return EFI_INVALID_PARAMETER;=0D }=0D =0D - Memory=3D NULL;=0D + Memory =3D NULL;=0D MemoryCs =3D NULL;=0D ConfigureLang =3D NULL;=0D - Arraykey =3D NULL;=0D - EtagInDb =3D NULL;=0D =0D Status =3D Private->JsonStructProtocol->ToStructure (=0D Private->JsonStructProtocol,=0D NULL,=0D - MemoryJson,=0D + Json,=0D (EFI_REST_JSON_STRUCTURE_HEADER = **)&Memory=0D );=0D if (EFI_ERROR (Status)) {=0D @@ -52,24 +61,13 @@ RedfishConsumeResourceCommon ( //=0D // Check ETAG to see if we need to consume it=0D //=0D - EtagInDb =3D GetEtagWithUri (Private->Uri);=0D - if (EtagInDb !=3D NULL && MemoryCs->odata_etag !=3D NULL) {=0D - if (AsciiStrCmp (EtagInDb, MemoryCs->odata_etag) =3D=3D 0) {=0D - //=0D - // No change=0D - //=0D - DEBUG ((DEBUG_INFO, "%a, ETAG: [%a] no change, ignore consume action= \n", __FUNCTION__, EtagInDb));=0D - goto ON_RELEASE;=0D - }=0D - }=0D -=0D - //=0D - // Find array key from URI=0D - //=0D - Status =3D GetArraykeyFromUri (Private->Uri, &Arraykey);=0D - if (EFI_ERROR (Status)) {=0D - ASSERT (FALSE);=0D - return Status;=0D + if (CheckEtag (Private->Uri, HeaderEtag, MemoryCs->odata_etag)) {=0D + //=0D + // No change=0D + //=0D + DEBUG ((DEBUG_INFO, "%a, ETAG: %s has no change, ignore consume action= \n", __FUNCTION__, Private->Uri));=0D + Status =3D EFI_ALREADY_STARTED;=0D + goto ON_RELEASE;=0D }=0D =0D //=0D @@ -77,9 +75,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->AllocationAlignmentMiB !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "AllocationAlignmentMiB", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "AllocationAli= gnmentMiB");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->AllocationAlignmentMiB);= =0D if (EFI_ERROR (Status)) {=0D @@ -88,7 +86,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -97,9 +95,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->AllocationIncrementMiB !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "AllocationIncrementMiB", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "AllocationInc= rementMiB");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->AllocationIncrementMiB);= =0D if (EFI_ERROR (Status)) {=0D @@ -108,18 +106,42 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D + }=0D + }=0D +=0D + //=0D + // Handle ALLOWEDSPEEDSMHZ=0D + //=0D + if (MemoryCs->AllowedSpeedsMHz !=3D NULL) {=0D + //=0D + // Find corresponding configure language for collection resource.=0D + //=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "AllowedSpeeds= MHz");=0D + if (ConfigureLang !=3D NULL) {=0D + Status =3D ApplyFeatureSettingsNumericArrayType (RESOURCE_SCHEMA, RE= SOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs->AllowedSpeedsMHz);=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_ERROR, "%a, apply setting for %s failed: %r\n", __FU= NCTION__, ConfigureLang, Status));=0D + }=0D +=0D + FreePool (ConfigureLang);=0D + } else {=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D + //=0D + // ASSEMBLY will be handled by feature driver.=0D + //=0D +=0D //=0D // Handle BASEMODULETYPE=0D //=0D if (MemoryCs->BaseModuleType !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "BaseModuleType", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "BaseModuleTyp= e");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, RESOURCE= _SCHEMA_VERSION, ConfigureLang, MemoryCs->BaseModuleType);=0D if (EFI_ERROR (Status)) {=0D @@ -128,7 +150,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -137,9 +159,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->BusWidthBits !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "BusWidthBits", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "BusWidthBits"= );=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->BusWidthBits);=0D if (EFI_ERROR (Status)) {=0D @@ -148,7 +170,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -157,9 +179,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->CacheSizeMiB !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "CacheSizeMiB", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "CacheSizeMiB"= );=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->CacheSizeMiB);=0D if (EFI_ERROR (Status)) {=0D @@ -168,7 +190,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -177,9 +199,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->CapacityMiB !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "CapacityMiB", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "CapacityMiB")= ;=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->CapacityMiB);=0D if (EFI_ERROR (Status)) {=0D @@ -188,7 +210,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -197,9 +219,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->ConfigurationLocked !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "ConfigurationLocked", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "Configuration= Locked");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsBooleanType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (BOOLEAN)*MemoryCs->ConfigurationLocked);= =0D if (EFI_ERROR (Status)) {=0D @@ -208,7 +230,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -217,9 +239,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->DataWidthBits !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "DataWidthBits", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "DataWidthBits= ");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->DataWidthBits);=0D if (EFI_ERROR (Status)) {=0D @@ -228,7 +250,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -237,9 +259,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->DeviceID !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "DeviceID", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "DeviceID");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, RESOURCE= _SCHEMA_VERSION, ConfigureLang, MemoryCs->DeviceID);=0D if (EFI_ERROR (Status)) {=0D @@ -248,7 +270,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -257,9 +279,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->DeviceLocator !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "DeviceLocator", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "DeviceLocator= ");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, RESOURCE= _SCHEMA_VERSION, ConfigureLang, MemoryCs->DeviceLocator);=0D if (EFI_ERROR (Status)) {=0D @@ -268,7 +290,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -277,9 +299,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->ErrorCorrection !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "ErrorCorrection", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "ErrorCorrecti= on");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, RESOURCE= _SCHEMA_VERSION, ConfigureLang, MemoryCs->ErrorCorrection);=0D if (EFI_ERROR (Status)) {=0D @@ -288,7 +310,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -297,9 +319,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->FirmwareApiVersion !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "FirmwareApiVersion", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "FirmwareApiVe= rsion");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, RESOURCE= _SCHEMA_VERSION, ConfigureLang, MemoryCs->FirmwareApiVersion);=0D if (EFI_ERROR (Status)) {=0D @@ -308,7 +330,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -317,9 +339,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->FirmwareRevision !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "FirmwareRevision", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "FirmwareRevis= ion");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, RESOURCE= _SCHEMA_VERSION, ConfigureLang, MemoryCs->FirmwareRevision);=0D if (EFI_ERROR (Status)) {=0D @@ -328,7 +350,27 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D + }=0D + }=0D +=0D + //=0D + // Handle FUNCTIONCLASSES=0D + //=0D + if (MemoryCs->FunctionClasses !=3D NULL) {=0D + //=0D + // Find corresponding configure language for collection resource.=0D + //=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "FunctionClass= es");=0D + if (ConfigureLang !=3D NULL) {=0D + Status =3D ApplyFeatureSettingsStringArrayType (RESOURCE_SCHEMA, RES= OURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs->FunctionClasses);=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_ERROR, "%a, apply setting for %s failed: %r\n", __FU= NCTION__, ConfigureLang, Status));=0D + }=0D +=0D + FreePool (ConfigureLang);=0D + } else {=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -337,9 +379,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->IsRankSpareEnabled !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "IsRankSpareEnabled", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "IsRankSpareEn= abled");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsBooleanType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (BOOLEAN)*MemoryCs->IsRankSpareEnabled);=0D if (EFI_ERROR (Status)) {=0D @@ -348,7 +390,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -357,9 +399,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->IsSpareDeviceEnabled !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "IsSpareDeviceEnabled", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "IsSpareDevice= Enabled");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsBooleanType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (BOOLEAN)*MemoryCs->IsSpareDeviceEnabled);= =0D if (EFI_ERROR (Status)) {=0D @@ -368,18 +410,22 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D + //=0D + // LOCATION is not handled. Defined in http://redfish.dmtf.org/schemas/v= 1/Resource.json=0D + //=0D +=0D //=0D // Handle LOGICALSIZEMIB=0D //=0D if (MemoryCs->LogicalSizeMiB !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "LogicalSizeMiB", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "LogicalSizeMi= B");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->LogicalSizeMiB);=0D if (EFI_ERROR (Status)) {=0D @@ -388,7 +434,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -397,9 +443,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->Manufacturer !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "Manufacturer", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "Manufacturer"= );=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, RESOURCE= _SCHEMA_VERSION, ConfigureLang, MemoryCs->Manufacturer);=0D if (EFI_ERROR (Status)) {=0D @@ -408,7 +454,27 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D + }=0D + }=0D +=0D + //=0D + // Handle MAXTDPMILLIWATTS=0D + //=0D + if (MemoryCs->MaxTDPMilliWatts !=3D NULL) {=0D + //=0D + // Find corresponding configure language for collection resource.=0D + //=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "MaxTDPMilliWa= tts");=0D + if (ConfigureLang !=3D NULL) {=0D + Status =3D ApplyFeatureSettingsNumericArrayType (RESOURCE_SCHEMA, RE= SOURCE_SCHEMA_VERSION, ConfigureLang, MemoryCs->MaxTDPMilliWatts);=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_ERROR, "%a, apply setting for %s failed: %r\n", __FU= NCTION__, ConfigureLang, Status));=0D + }=0D +=0D + FreePool (ConfigureLang);=0D + } else {=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -417,9 +483,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->MemoryDeviceType !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "MemoryDeviceType", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "MemoryDeviceT= ype");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, RESOURCE= _SCHEMA_VERSION, ConfigureLang, MemoryCs->MemoryDeviceType);=0D if (EFI_ERROR (Status)) {=0D @@ -428,14 +494,14 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D //=0D // Handle MEMORYLOCATION=0D //=0D - if(MemoryCs->MemoryLocation =3D=3D NULL) {=0D + if (MemoryCs->MemoryLocation =3D=3D NULL) {=0D MemoryCs->MemoryLocation =3D AllocateZeroPool (sizeof (RedfishMemory_V= 1_7_1_MemoryLocation_CS));=0D ASSERT (MemoryCs->MemoryLocation !=3D NULL);=0D }=0D @@ -445,9 +511,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->MemoryLocation->Channel !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "MemoryLocation/Channel", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "MemoryLocatio= n/Channel");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->MemoryLocation->Channel)= ;=0D if (EFI_ERROR (Status)) {=0D @@ -456,7 +522,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -465,9 +531,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->MemoryLocation->MemoryController !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "MemoryLocation/MemoryController", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "MemoryLocatio= n/MemoryController");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->MemoryLocation->MemoryCo= ntroller);=0D if (EFI_ERROR (Status)) {=0D @@ -476,7 +542,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -485,9 +551,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->MemoryLocation->Slot !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "MemoryLocation/Slot", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "MemoryLocatio= n/Slot");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->MemoryLocation->Slot);=0D if (EFI_ERROR (Status)) {=0D @@ -496,7 +562,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -505,9 +571,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->MemoryLocation->Socket !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "MemoryLocation/Socket", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "MemoryLocatio= n/Socket");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->MemoryLocation->Socket);= =0D if (EFI_ERROR (Status)) {=0D @@ -516,18 +582,26 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D + //=0D + // Handle MEMORYMEDIA=0D + //=0D +//=0D +// ****** Warning ******=0D +// Unsupported array type:=0D +//=0D +=0D //=0D // Handle MEMORYSUBSYSTEMCONTROLLERMANUFACTURERID=0D //=0D if (MemoryCs->MemorySubsystemControllerManufacturerID !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "MemorySubsystemControllerManufacturerID", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "MemorySubsyst= emControllerManufacturerID");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, RESOURCE= _SCHEMA_VERSION, ConfigureLang, MemoryCs->MemorySubsystemControllerManufact= urerID);=0D if (EFI_ERROR (Status)) {=0D @@ -536,7 +610,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -545,9 +619,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->MemorySubsystemControllerProductID !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "MemorySubsystemControllerProductID", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "MemorySubsyst= emControllerProductID");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, RESOURCE= _SCHEMA_VERSION, ConfigureLang, MemoryCs->MemorySubsystemControllerProductI= D);=0D if (EFI_ERROR (Status)) {=0D @@ -556,7 +630,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -565,9 +639,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->MemoryType !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "MemoryType", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "MemoryType");= =0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, RESOURCE= _SCHEMA_VERSION, ConfigureLang, MemoryCs->MemoryType);=0D if (EFI_ERROR (Status)) {=0D @@ -576,18 +650,22 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D + //=0D + // METRICS will be handled by feature driver.=0D + //=0D +=0D //=0D // Handle MODULEMANUFACTURERID=0D //=0D if (MemoryCs->ModuleManufacturerID !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "ModuleManufacturerID", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "ModuleManufac= turerID");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, RESOURCE= _SCHEMA_VERSION, ConfigureLang, MemoryCs->ModuleManufacturerID);=0D if (EFI_ERROR (Status)) {=0D @@ -596,7 +674,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -605,9 +683,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->ModuleProductID !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "ModuleProductID", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "ModuleProduct= ID");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, RESOURCE= _SCHEMA_VERSION, ConfigureLang, MemoryCs->ModuleProductID);=0D if (EFI_ERROR (Status)) {=0D @@ -616,7 +694,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -625,9 +703,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->NonVolatileSizeMiB !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "NonVolatileSizeMiB", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "NonVolatileSi= zeMiB");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->NonVolatileSizeMiB);=0D if (EFI_ERROR (Status)) {=0D @@ -636,18 +714,26 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D + //=0D + // Handle OPERATINGMEMORYMODES=0D + //=0D +//=0D +// ****** Warning ******=0D +// Unsupported array type:=0D +//=0D +=0D //=0D // Handle OPERATINGSPEEDMHZ=0D //=0D if (MemoryCs->OperatingSpeedMhz !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "OperatingSpeedMhz", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "OperatingSpee= dMhz");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->OperatingSpeedMhz);=0D if (EFI_ERROR (Status)) {=0D @@ -656,7 +742,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -665,9 +751,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->PartNumber !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "PartNumber", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "PartNumber");= =0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, RESOURCE= _SCHEMA_VERSION, ConfigureLang, MemoryCs->PartNumber);=0D if (EFI_ERROR (Status)) {=0D @@ -676,7 +762,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -685,9 +771,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->PersistentRegionNumberLimit !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "PersistentRegionNumberLimit", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "PersistentReg= ionNumberLimit");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->PersistentRegionNumberLi= mit);=0D if (EFI_ERROR (Status)) {=0D @@ -696,7 +782,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -705,9 +791,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->PersistentRegionSizeLimitMiB !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "PersistentRegionSizeLimitMiB", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "PersistentReg= ionSizeLimitMiB");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->PersistentRegionSizeLimi= tMiB);=0D if (EFI_ERROR (Status)) {=0D @@ -716,7 +802,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -725,9 +811,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->PersistentRegionSizeMaxMiB !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "PersistentRegionSizeMaxMiB", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "PersistentReg= ionSizeMaxMiB");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->PersistentRegionSizeMaxM= iB);=0D if (EFI_ERROR (Status)) {=0D @@ -736,14 +822,14 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D //=0D // Handle POWERMANAGEMENTPOLICY=0D //=0D - if(MemoryCs->PowerManagementPolicy =3D=3D NULL) {=0D + if (MemoryCs->PowerManagementPolicy =3D=3D NULL) {=0D MemoryCs->PowerManagementPolicy =3D AllocateZeroPool (sizeof (RedfishM= emory_V1_7_1_PowerManagementPolicy_CS));=0D ASSERT (MemoryCs->PowerManagementPolicy !=3D NULL);=0D }=0D @@ -753,9 +839,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->PowerManagementPolicy->AveragePowerBudgetMilliWatts !=3D N= ULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "PowerManagementPolicy/AveragePowerBudgetMilliWatts", Arraykey= );=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "PowerManageme= ntPolicy/AveragePowerBudgetMilliWatts");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->PowerManagementPolicy->A= veragePowerBudgetMilliWatts);=0D if (EFI_ERROR (Status)) {=0D @@ -764,7 +850,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -773,9 +859,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->PowerManagementPolicy->MaxTDPMilliWatts !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "PowerManagementPolicy/MaxTDPMilliWatts", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "PowerManageme= ntPolicy/MaxTDPMilliWatts");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->PowerManagementPolicy->M= axTDPMilliWatts);=0D if (EFI_ERROR (Status)) {=0D @@ -784,7 +870,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -793,9 +879,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->PowerManagementPolicy->PeakPowerBudgetMilliWatts !=3D NULL= ) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "PowerManagementPolicy/PeakPowerBudgetMilliWatts", Arraykey);= =0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "PowerManageme= ntPolicy/PeakPowerBudgetMilliWatts");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->PowerManagementPolicy->P= eakPowerBudgetMilliWatts);=0D if (EFI_ERROR (Status)) {=0D @@ -804,7 +890,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -813,9 +899,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->PowerManagementPolicy->PolicyEnabled !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "PowerManagementPolicy/PolicyEnabled", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "PowerManageme= ntPolicy/PolicyEnabled");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsBooleanType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (BOOLEAN)*MemoryCs->PowerManagementPolicy-= >PolicyEnabled);=0D if (EFI_ERROR (Status)) {=0D @@ -824,7 +910,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -833,9 +919,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->RankCount !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "RankCount", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "RankCount");= =0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->RankCount);=0D if (EFI_ERROR (Status)) {=0D @@ -844,14 +930,22 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D + //=0D + // Handle REGIONS=0D + //=0D +//=0D +// ****** Warning ******=0D +// Unsupported array type:=0D +//=0D +=0D //=0D // Handle SECURITYCAPABILITIES=0D //=0D - if(MemoryCs->SecurityCapabilities =3D=3D NULL) {=0D + if (MemoryCs->SecurityCapabilities =3D=3D NULL) {=0D MemoryCs->SecurityCapabilities =3D AllocateZeroPool (sizeof (RedfishMe= mory_V1_7_1_SecurityCapabilities_CS));=0D ASSERT (MemoryCs->SecurityCapabilities !=3D NULL);=0D }=0D @@ -861,9 +955,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->SecurityCapabilities->ConfigurationLockCapable !=3D NULL) = {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "SecurityCapabilities/ConfigurationLockCapable", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "SecurityCapab= ilities/ConfigurationLockCapable");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsBooleanType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (BOOLEAN)*MemoryCs->SecurityCapabilities->= ConfigurationLockCapable);=0D if (EFI_ERROR (Status)) {=0D @@ -872,7 +966,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -881,9 +975,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->SecurityCapabilities->DataLockCapable !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "SecurityCapabilities/DataLockCapable", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "SecurityCapab= ilities/DataLockCapable");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsBooleanType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (BOOLEAN)*MemoryCs->SecurityCapabilities->= DataLockCapable);=0D if (EFI_ERROR (Status)) {=0D @@ -892,7 +986,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -901,9 +995,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->SecurityCapabilities->MaxPassphraseCount !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "SecurityCapabilities/MaxPassphraseCount", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "SecurityCapab= ilities/MaxPassphraseCount");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->SecurityCapabilities->Ma= xPassphraseCount);=0D if (EFI_ERROR (Status)) {=0D @@ -912,7 +1006,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -921,9 +1015,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->SecurityCapabilities->PassphraseCapable !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "SecurityCapabilities/PassphraseCapable", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "SecurityCapab= ilities/PassphraseCapable");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsBooleanType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (BOOLEAN)*MemoryCs->SecurityCapabilities->= PassphraseCapable);=0D if (EFI_ERROR (Status)) {=0D @@ -932,7 +1026,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -941,9 +1035,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->SecurityCapabilities->PassphraseLockLimit !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "SecurityCapabilities/PassphraseLockLimit", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "SecurityCapab= ilities/PassphraseLockLimit");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->SecurityCapabilities->Pa= ssphraseLockLimit);=0D if (EFI_ERROR (Status)) {=0D @@ -952,18 +1046,26 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D + //=0D + // Handle SECURITYCAPABILITIES->SECURITYSTATES=0D + //=0D +//=0D +// ****** Warning ******=0D +// Unsupported array type:=0D +//=0D +=0D //=0D // Handle SECURITYSTATE=0D //=0D if (MemoryCs->SecurityState !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "SecurityState", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "SecurityState= ");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, RESOURCE= _SCHEMA_VERSION, ConfigureLang, MemoryCs->SecurityState);=0D if (EFI_ERROR (Status)) {=0D @@ -972,7 +1074,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -981,9 +1083,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->SerialNumber !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "SerialNumber", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "SerialNumber"= );=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, RESOURCE= _SCHEMA_VERSION, ConfigureLang, MemoryCs->SerialNumber);=0D if (EFI_ERROR (Status)) {=0D @@ -992,7 +1094,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -1001,9 +1103,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->SpareDeviceCount !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "SpareDeviceCount", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "SpareDeviceCo= unt");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->SpareDeviceCount);=0D if (EFI_ERROR (Status)) {=0D @@ -1012,7 +1114,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -1021,9 +1123,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->SubsystemDeviceID !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "SubsystemDeviceID", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "SubsystemDevi= ceID");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, RESOURCE= _SCHEMA_VERSION, ConfigureLang, MemoryCs->SubsystemDeviceID);=0D if (EFI_ERROR (Status)) {=0D @@ -1032,7 +1134,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -1041,9 +1143,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->SubsystemVendorID !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "SubsystemVendorID", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "SubsystemVend= orID");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, RESOURCE= _SCHEMA_VERSION, ConfigureLang, MemoryCs->SubsystemVendorID);=0D if (EFI_ERROR (Status)) {=0D @@ -1052,7 +1154,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -1061,9 +1163,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->VendorID !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "VendorID", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "VendorID");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsStringType (RESOURCE_SCHEMA, RESOURCE= _SCHEMA_VERSION, ConfigureLang, MemoryCs->VendorID);=0D if (EFI_ERROR (Status)) {=0D @@ -1072,7 +1174,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -1081,9 +1183,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->VolatileRegionNumberLimit !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "VolatileRegionNumberLimit", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "VolatileRegio= nNumberLimit");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->VolatileRegionNumberLimi= t);=0D if (EFI_ERROR (Status)) {=0D @@ -1092,7 +1194,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -1101,9 +1203,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->VolatileRegionSizeLimitMiB !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "VolatileRegionSizeLimitMiB", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "VolatileRegio= nSizeLimitMiB");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->VolatileRegionSizeLimitM= iB);=0D if (EFI_ERROR (Status)) {=0D @@ -1112,7 +1214,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -1121,9 +1223,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->VolatileRegionSizeMaxMiB !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "VolatileRegionSizeMaxMiB", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "VolatileRegio= nSizeMaxMiB");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->VolatileRegionSizeMaxMiB= );=0D if (EFI_ERROR (Status)) {=0D @@ -1132,7 +1234,7 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D @@ -1141,9 +1243,9 @@ RedfishConsumeResourceCommon ( //=0D if (MemoryCs->VolatileSizeMiB !=3D NULL) {=0D //=0D - // Find corresponding redpath for collection resource.=0D + // Find corresponding configure language for collection resource.=0D //=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCH= EMA_VERSION, "VolatileSizeMiB", Arraykey);=0D + ConfigureLang =3D GetConfigureLang (MemoryCs->odata_id, "VolatileSizeM= iB");=0D if (ConfigureLang !=3D NULL) {=0D Status =3D ApplyFeatureSettingsNumericType (RESOURCE_SCHEMA, RESOURC= E_SCHEMA_VERSION, ConfigureLang, (UINTN)*MemoryCs->VolatileSizeMiB);=0D if (EFI_ERROR (Status)) {=0D @@ -1152,26 +1254,16 @@ RedfishConsumeResourceCommon ( =0D FreePool (ConfigureLang);=0D } else {=0D - DEBUG ((DEBUG_ERROR, "%a, can not get configure language for key: %a= \n", __FUNCTION__, Arraykey));=0D + DEBUG ((DEBUG_ERROR, "%a, can not get configure language for URI: %s= \n", __FUNCTION__, Private->Uri));=0D }=0D }=0D =0D =0D -=0D - //=0D ON_RELEASE:=0D =0D //=0D // Release resource.=0D //=0D - if (EtagInDb !=3D NULL) {=0D - FreePool (EtagInDb);=0D - }=0D -=0D - if (Arraykey !=3D NULL) {=0D - FreePool (Arraykey);=0D - }=0D -=0D Private->JsonStructProtocol->DestoryStructure (=0D Private->JsonStructProtocol,=0D (EFI_REST_JSON_STRUCTURE_HEADER *)Memory= =0D @@ -1183,7 +1275,7 @@ ON_RELEASE: EFI_STATUS=0D ProvisioningMemoryProperties (=0D IN EFI_REST_JSON_STRUCTURE_PROTOCOL *JsonStructProtocol,=0D - IN CHAR8 *IputJson,=0D + IN CHAR8 *InputJson,=0D IN CHAR8 *ResourceId, OPTIONAL=0D IN EFI_STRING ConfigureLang,=0D IN BOOLEAN ProvisionMode,=0D @@ -1193,28 +1285,31 @@ ProvisioningMemoryProperties ( EFI_REDFISH_MEMORY_V1_7_1 *Memory;=0D EFI_REDFISH_MEMORY_V1_7_1_CS *MemoryCs;=0D EFI_STATUS Status;=0D + BOOLEAN PropertyChanged;=0D INT64 *NumericValue;=0D - INT32 *IntegerValue;=0D - BOOLEAN *BooleanValue;=0D + INT64 *NumericArrayValue;=0D + UINTN ArraySize;=0D CHAR8 *AsciiStringValue;=0D - BOOLEAN PropertyChanged;=0D - BOOLEAN UnusedProperty;=0D + BOOLEAN *BooleanValue;=0D + INT32 *IntegerValue;=0D + CHAR8 **AsciiStringArrayValue;=0D +=0D =0D - if (JsonStructProtocol =3D=3D NULL || ResultJson =3D=3D NULL || IS_EMPTY= _STRING (IputJson) || IS_EMPTY_STRING (ConfigureLang)) {=0D +=0D + if (JsonStructProtocol =3D=3D NULL || ResultJson =3D=3D NULL || IS_EMPTY= _STRING (InputJson) || IS_EMPTY_STRING (ConfigureLang)) {=0D return EFI_INVALID_PARAMETER;=0D }=0D =0D - DEBUG ((REDFISH_DEBUG_TRACE, "%a provision for %s with: %s\n", __FUNCTIO= N__, ConfigureLang, (ProvisionMode ? L"Provision all resource" : L"Provisio= n existing resource")));=0D + DEBUG ((REDFISH_DEBUG_TRACE, "%a provision for %s with: %s\n", __FUNCTIO= N__, ConfigureLang, (ProvisionMode ? L"Provision resource" : L"Update resou= rce")));=0D =0D *ResultJson =3D NULL;=0D PropertyChanged =3D FALSE;=0D - UnusedProperty =3D TRUE;=0D =0D Memory =3D NULL;=0D Status =3D JsonStructProtocol->ToStructure (=0D JsonStructProtocol,=0D NULL,=0D - IputJson,=0D + InputJson,=0D (EFI_REST_JSON_STRUCTURE_HEADER **)&Memor= y=0D );=0D if (EFI_ERROR (Status)) {=0D @@ -1243,7 +1338,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle ALLOCATIONINCREMENTMIB=0D //=0D @@ -1256,7 +1350,18 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D + //=0D + // Handle ALLOWEDSPEEDSMHZ=0D + //=0D + if (PropertyChecker (MemoryCs->AllowedSpeedsMHz, ProvisionMode)) {=0D + NumericArrayValue =3D GetPropertyNumericArrayValue (RESOURCE_SCHEMA, R= ESOURCE_SCHEMA_VERSION, L"AllowedSpeedsMHz", ConfigureLang, &ArraySize);=0D + if (NumericArrayValue !=3D NULL) {=0D + if (ProvisionMode || !CompareRedfishNumericArrayValues (MemoryCs->Al= lowedSpeedsMHz, NumericArrayValue, ArraySize)) {=0D + AddRedfishNumericArray (&MemoryCs->AllowedSpeedsMHz, NumericArrayV= alue, ArraySize);=0D + PropertyChanged =3D TRUE;=0D + }=0D + }=0D + }=0D //=0D // Handle BASEMODULETYPE=0D //=0D @@ -1269,7 +1374,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle BUSWIDTHBITS=0D //=0D @@ -1282,7 +1386,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle CACHESIZEMIB=0D //=0D @@ -1295,7 +1398,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle CAPACITYMIB=0D //=0D @@ -1308,7 +1410,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle CONFIGURATIONLOCKED=0D //=0D @@ -1320,11 +1421,11 @@ ProvisioningMemoryProperties ( if (IntegerValue !=3D NULL) {=0D *IntegerValue =3D (BooleanValue ? 0x01 : 0x00);=0D MemoryCs->ConfigurationLocked =3D IntegerValue;=0D + PropertyChanged =3D TRUE;=0D }=0D }=0D }=0D }=0D -=0D //=0D // Handle DATAWIDTHBITS=0D //=0D @@ -1337,7 +1438,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle DEVICEID=0D //=0D @@ -1350,7 +1450,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle DEVICELOCATOR=0D //=0D @@ -1363,7 +1462,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle ERRORCORRECTION=0D //=0D @@ -1376,7 +1474,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle FIRMWAREAPIVERSION=0D //=0D @@ -1389,7 +1486,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle FIRMWAREREVISION=0D //=0D @@ -1402,7 +1498,18 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D + //=0D + // Handle FUNCTIONCLASSES=0D + //=0D + if (PropertyChecker (MemoryCs->FunctionClasses, ProvisionMode)) {=0D + AsciiStringArrayValue =3D GetPropertyStringArrayValue (RESOURCE_SCHEMA= , RESOURCE_SCHEMA_VERSION, L"FunctionClasses", ConfigureLang, &ArraySize);= =0D + if (AsciiStringArrayValue !=3D NULL) {=0D + if (ProvisionMode || !CompareRedfishStringArrayValues (MemoryCs->Fun= ctionClasses, AsciiStringArrayValue, ArraySize)) {=0D + AddRedfishCharArray (&MemoryCs->FunctionClasses, AsciiStringArrayV= alue, ArraySize);=0D + PropertyChanged =3D TRUE;=0D + }=0D + }=0D + }=0D //=0D // Handle ISRANKSPAREENABLED=0D //=0D @@ -1414,11 +1521,11 @@ ProvisioningMemoryProperties ( if (IntegerValue !=3D NULL) {=0D *IntegerValue =3D (BooleanValue ? 0x01 : 0x00);=0D MemoryCs->IsRankSpareEnabled =3D IntegerValue;=0D + PropertyChanged =3D TRUE;=0D }=0D }=0D }=0D }=0D -=0D //=0D // Handle ISSPAREDEVICEENABLED=0D //=0D @@ -1430,11 +1537,11 @@ ProvisioningMemoryProperties ( if (IntegerValue !=3D NULL) {=0D *IntegerValue =3D (BooleanValue ? 0x01 : 0x00);=0D MemoryCs->IsSpareDeviceEnabled =3D IntegerValue;=0D + PropertyChanged =3D TRUE;=0D }=0D }=0D }=0D }=0D -=0D //=0D // Handle LOGICALSIZEMIB=0D //=0D @@ -1447,7 +1554,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle MANUFACTURER=0D //=0D @@ -1460,7 +1566,18 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D + //=0D + // Handle MAXTDPMILLIWATTS=0D + //=0D + if (PropertyChecker (MemoryCs->MaxTDPMilliWatts, ProvisionMode)) {=0D + NumericArrayValue =3D GetPropertyNumericArrayValue (RESOURCE_SCHEMA, R= ESOURCE_SCHEMA_VERSION, L"MaxTDPMilliWatts", ConfigureLang, &ArraySize);=0D + if (NumericArrayValue !=3D NULL) {=0D + if (ProvisionMode || !CompareRedfishNumericArrayValues (MemoryCs->Ma= xTDPMilliWatts, NumericArrayValue, ArraySize)) {=0D + AddRedfishNumericArray (&MemoryCs->MaxTDPMilliWatts, NumericArrayV= alue, ArraySize);=0D + PropertyChanged =3D TRUE;=0D + }=0D + }=0D + }=0D //=0D // Handle MEMORYDEVICETYPE=0D //=0D @@ -1473,78 +1590,66 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle MEMORYLOCATION=0D //=0D - if(MemoryCs->MemoryLocation =3D=3D NULL) {=0D - MemoryCs->MemoryLocation =3D AllocateZeroPool (sizeof (RedfishMemory_V= 1_7_1_MemoryLocation_CS));=0D - ASSERT (MemoryCs->MemoryLocation !=3D NULL);=0D - UnusedProperty =3D TRUE;=0D - } else {=0D - UnusedProperty =3D FALSE;=0D - }=0D -=0D - //=0D - // Handle MEMORYLOCATION->CHANNEL=0D - //=0D - if (PropertyChecker (MemoryCs->MemoryLocation->Channel, ProvisionMode)) = {=0D - NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, RESOURCE_SC= HEMA_VERSION, L"MemoryLocation/Channel", ConfigureLang);=0D - if (NumericValue !=3D NULL) {=0D - if (ProvisionMode || *MemoryCs->MemoryLocation->Channel !=3D *Numeri= cValue) {=0D - MemoryCs->MemoryLocation->Channel =3D NumericValue;=0D - PropertyChanged =3D TRUE;=0D - UnusedProperty =3D FALSE;=0D + if (MemoryCs->MemoryLocation !=3D NULL) {=0D + //=0D + // Handle MEMORYLOCATION->CHANNEL=0D + //=0D + if (PropertyChecker (MemoryCs->MemoryLocation->Channel, ProvisionMode)= ) {=0D + NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, RESOURCE_= SCHEMA_VERSION, L"MemoryLocation/Channel", ConfigureLang);=0D + if (NumericValue !=3D NULL) {=0D + if (ProvisionMode || *MemoryCs->MemoryLocation->Channel !=3D *Nume= ricValue) {=0D + MemoryCs->MemoryLocation->Channel =3D NumericValue;=0D + PropertyChanged =3D TRUE;=0D + }=0D }=0D }=0D - }=0D -=0D - //=0D - // Handle MEMORYLOCATION->MEMORYCONTROLLER=0D - //=0D - if (PropertyChecker (MemoryCs->MemoryLocation->MemoryController, Provisi= onMode)) {=0D - NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, RESOURCE_SC= HEMA_VERSION, L"MemoryLocation/MemoryController", ConfigureLang);=0D - if (NumericValue !=3D NULL) {=0D - if (ProvisionMode || *MemoryCs->MemoryLocation->MemoryController != =3D *NumericValue) {=0D - MemoryCs->MemoryLocation->MemoryController =3D NumericValue;=0D - PropertyChanged =3D TRUE;=0D - UnusedProperty =3D FALSE;=0D + //=0D + // Handle MEMORYLOCATION->MEMORYCONTROLLER=0D + //=0D + if (PropertyChecker (MemoryCs->MemoryLocation->MemoryController, Provi= sionMode)) {=0D + NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, RESOURCE_= SCHEMA_VERSION, L"MemoryLocation/MemoryController", ConfigureLang);=0D + if (NumericValue !=3D NULL) {=0D + if (ProvisionMode || *MemoryCs->MemoryLocation->MemoryController != =3D *NumericValue) {=0D + MemoryCs->MemoryLocation->MemoryController =3D NumericValue;=0D + PropertyChanged =3D TRUE;=0D + }=0D }=0D }=0D - }=0D -=0D - //=0D - // Handle MEMORYLOCATION->SLOT=0D - //=0D - if (PropertyChecker (MemoryCs->MemoryLocation->Slot, ProvisionMode)) {=0D - NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, RESOURCE_SC= HEMA_VERSION, L"MemoryLocation/Slot", ConfigureLang);=0D - if (NumericValue !=3D NULL) {=0D - if (ProvisionMode || *MemoryCs->MemoryLocation->Slot !=3D *NumericVa= lue) {=0D - MemoryCs->MemoryLocation->Slot =3D NumericValue;=0D - PropertyChanged =3D TRUE;=0D - UnusedProperty =3D FALSE;=0D + //=0D + // Handle MEMORYLOCATION->SLOT=0D + //=0D + if (PropertyChecker (MemoryCs->MemoryLocation->Slot, ProvisionMode)) {= =0D + NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, RESOURCE_= SCHEMA_VERSION, L"MemoryLocation/Slot", ConfigureLang);=0D + if (NumericValue !=3D NULL) {=0D + if (ProvisionMode || *MemoryCs->MemoryLocation->Slot !=3D *Numeric= Value) {=0D + MemoryCs->MemoryLocation->Slot =3D NumericValue;=0D + PropertyChanged =3D TRUE;=0D + }=0D }=0D }=0D - }=0D -=0D - //=0D - // Handle MEMORYLOCATION->SOCKET=0D - //=0D - if (PropertyChecker (MemoryCs->MemoryLocation->Socket, ProvisionMode)) {= =0D - NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, RESOURCE_SC= HEMA_VERSION, L"MemoryLocation/Socket", ConfigureLang);=0D - if (NumericValue !=3D NULL) {=0D - if (ProvisionMode || *MemoryCs->MemoryLocation->Socket !=3D *Numeric= Value) {=0D - MemoryCs->MemoryLocation->Socket =3D NumericValue;=0D - PropertyChanged =3D TRUE;=0D - UnusedProperty =3D FALSE;=0D + //=0D + // Handle MEMORYLOCATION->SOCKET=0D + //=0D + if (PropertyChecker (MemoryCs->MemoryLocation->Socket, ProvisionMode))= {=0D + NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, RESOURCE_= SCHEMA_VERSION, L"MemoryLocation/Socket", ConfigureLang);=0D + if (NumericValue !=3D NULL) {=0D + if (ProvisionMode || *MemoryCs->MemoryLocation->Socket !=3D *Numer= icValue) {=0D + MemoryCs->MemoryLocation->Socket =3D NumericValue;=0D + PropertyChanged =3D TRUE;=0D + }=0D }=0D }=0D }=0D =0D - if (UnusedProperty) {=0D - FreePool (MemoryCs->MemoryLocation);=0D - MemoryCs->MemoryLocation =3D NULL;=0D - }=0D + //=0D + // Handle MEMORYMEDIA=0D + //=0D +//// ****** Warning ******=0D +// Unsupported array type:=0D +//=0D =0D //=0D // Handle MEMORYSUBSYSTEMCONTROLLERMANUFACTURERID=0D @@ -1558,7 +1663,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle MEMORYSUBSYSTEMCONTROLLERPRODUCTID=0D //=0D @@ -1571,7 +1675,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle MEMORYTYPE=0D //=0D @@ -1584,7 +1687,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle MODULEMANUFACTURERID=0D //=0D @@ -1597,7 +1699,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle MODULEPRODUCTID=0D //=0D @@ -1610,7 +1711,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle NONVOLATILESIZEMIB=0D //=0D @@ -1623,6 +1723,12 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D + //=0D + // Handle OPERATINGMEMORYMODES=0D + //=0D +//// ****** Warning ******=0D +// Unsupported array type:=0D +//=0D =0D //=0D // Handle OPERATINGSPEEDMHZ=0D @@ -1636,7 +1742,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle PARTNUMBER=0D //=0D @@ -1649,7 +1754,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle PERSISTENTREGIONNUMBERLIMIT=0D //=0D @@ -1662,7 +1766,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle PERSISTENTREGIONSIZELIMITMIB=0D //=0D @@ -1675,7 +1778,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle PERSISTENTREGIONSIZEMAXMIB=0D //=0D @@ -1688,83 +1790,64 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle POWERMANAGEMENTPOLICY=0D //=0D - if(MemoryCs->PowerManagementPolicy =3D=3D NULL) {=0D - MemoryCs->PowerManagementPolicy =3D AllocateZeroPool (sizeof (RedfishM= emory_V1_7_1_PowerManagementPolicy_CS));=0D - ASSERT (MemoryCs->PowerManagementPolicy !=3D NULL);=0D - UnusedProperty =3D TRUE;=0D - } else {=0D - UnusedProperty =3D FALSE;=0D - }=0D -=0D - //=0D - // Handle POWERMANAGEMENTPOLICY->AVERAGEPOWERBUDGETMILLIWATTS=0D - //=0D - if (PropertyChecker (MemoryCs->PowerManagementPolicy->AveragePowerBudget= MilliWatts, ProvisionMode)) {=0D - NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, RESOURCE_SC= HEMA_VERSION, L"PowerManagementPolicy/AveragePowerBudgetMilliWatts", Config= ureLang);=0D - if (NumericValue !=3D NULL) {=0D - if (ProvisionMode || *MemoryCs->PowerManagementPolicy->AveragePowerB= udgetMilliWatts !=3D *NumericValue) {=0D - MemoryCs->PowerManagementPolicy->AveragePowerBudgetMilliWatts =3D = NumericValue;=0D - PropertyChanged =3D TRUE;=0D - UnusedProperty =3D FALSE;=0D + if (MemoryCs->PowerManagementPolicy !=3D NULL) {=0D + //=0D + // Handle POWERMANAGEMENTPOLICY->AVERAGEPOWERBUDGETMILLIWATTS=0D + //=0D + if (PropertyChecker (MemoryCs->PowerManagementPolicy->AveragePowerBudg= etMilliWatts, ProvisionMode)) {=0D + NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, RESOURCE_= SCHEMA_VERSION, L"PowerManagementPolicy/AveragePowerBudgetMilliWatts", Conf= igureLang);=0D + if (NumericValue !=3D NULL) {=0D + if (ProvisionMode || *MemoryCs->PowerManagementPolicy->AveragePowe= rBudgetMilliWatts !=3D *NumericValue) {=0D + MemoryCs->PowerManagementPolicy->AveragePowerBudgetMilliWatts = =3D NumericValue;=0D + PropertyChanged =3D TRUE;=0D + }=0D }=0D }=0D - }=0D -=0D - //=0D - // Handle POWERMANAGEMENTPOLICY->MAXTDPMILLIWATTS=0D - //=0D - if (PropertyChecker (MemoryCs->PowerManagementPolicy->MaxTDPMilliWatts, = ProvisionMode)) {=0D - NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, RESOURCE_SC= HEMA_VERSION, L"PowerManagementPolicy/MaxTDPMilliWatts", ConfigureLang);=0D - if (NumericValue !=3D NULL) {=0D - if (ProvisionMode || *MemoryCs->PowerManagementPolicy->MaxTDPMilliWa= tts !=3D *NumericValue) {=0D - MemoryCs->PowerManagementPolicy->MaxTDPMilliWatts =3D NumericValue= ;=0D - PropertyChanged =3D TRUE;=0D - UnusedProperty =3D FALSE;=0D + //=0D + // Handle POWERMANAGEMENTPOLICY->MAXTDPMILLIWATTS=0D + //=0D + if (PropertyChecker (MemoryCs->PowerManagementPolicy->MaxTDPMilliWatts= , ProvisionMode)) {=0D + NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, RESOURCE_= SCHEMA_VERSION, L"PowerManagementPolicy/MaxTDPMilliWatts", ConfigureLang);= =0D + if (NumericValue !=3D NULL) {=0D + if (ProvisionMode || *MemoryCs->PowerManagementPolicy->MaxTDPMilli= Watts !=3D *NumericValue) {=0D + MemoryCs->PowerManagementPolicy->MaxTDPMilliWatts =3D NumericVal= ue;=0D + PropertyChanged =3D TRUE;=0D + }=0D }=0D }=0D - }=0D -=0D - //=0D - // Handle POWERMANAGEMENTPOLICY->PEAKPOWERBUDGETMILLIWATTS=0D - //=0D - if (PropertyChecker (MemoryCs->PowerManagementPolicy->PeakPowerBudgetMil= liWatts, ProvisionMode)) {=0D - NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, RESOURCE_SC= HEMA_VERSION, L"PowerManagementPolicy/PeakPowerBudgetMilliWatts", Configure= Lang);=0D - if (NumericValue !=3D NULL) {=0D - if (ProvisionMode || *MemoryCs->PowerManagementPolicy->PeakPowerBudg= etMilliWatts !=3D *NumericValue) {=0D - MemoryCs->PowerManagementPolicy->PeakPowerBudgetMilliWatts =3D Num= ericValue;=0D - PropertyChanged =3D TRUE;=0D - UnusedProperty =3D FALSE;=0D + //=0D + // Handle POWERMANAGEMENTPOLICY->PEAKPOWERBUDGETMILLIWATTS=0D + //=0D + if (PropertyChecker (MemoryCs->PowerManagementPolicy->PeakPowerBudgetM= illiWatts, ProvisionMode)) {=0D + NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, RESOURCE_= SCHEMA_VERSION, L"PowerManagementPolicy/PeakPowerBudgetMilliWatts", Configu= reLang);=0D + if (NumericValue !=3D NULL) {=0D + if (ProvisionMode || *MemoryCs->PowerManagementPolicy->PeakPowerBu= dgetMilliWatts !=3D *NumericValue) {=0D + MemoryCs->PowerManagementPolicy->PeakPowerBudgetMilliWatts =3D N= umericValue;=0D + PropertyChanged =3D TRUE;=0D + }=0D }=0D }=0D - }=0D -=0D - //=0D - // Handle POWERMANAGEMENTPOLICY->POLICYENABLED=0D - //=0D - if (PropertyChecker (MemoryCs->PowerManagementPolicy->PolicyEnabled, Pro= visionMode)) {=0D - BooleanValue =3D GetPropertyBooleanValue (RESOURCE_SCHEMA, RESOURCE_SC= HEMA_VERSION, L"PowerManagementPolicy/PolicyEnabled", ConfigureLang);=0D - if (BooleanValue !=3D NULL) {=0D - if (ProvisionMode || *MemoryCs->PowerManagementPolicy->PolicyEnabled= !=3D *BooleanValue) {=0D - IntegerValue =3D AllocatePool (sizeof (*IntegerValue));=0D - if (IntegerValue !=3D NULL) {=0D - *IntegerValue =3D (BooleanValue ? 0x01 : 0x00);=0D - MemoryCs->PowerManagementPolicy->PolicyEnabled =3D IntegerValue;= =0D - PropertyChanged =3D TRUE;=0D - UnusedProperty =3D FALSE;=0D + //=0D + // Handle POWERMANAGEMENTPOLICY->POLICYENABLED=0D + //=0D + if (PropertyChecker (MemoryCs->PowerManagementPolicy->PolicyEnabled, P= rovisionMode)) {=0D + BooleanValue =3D GetPropertyBooleanValue (RESOURCE_SCHEMA, RESOURCE_= SCHEMA_VERSION, L"PowerManagementPolicy/PolicyEnabled", ConfigureLang);=0D + if (BooleanValue !=3D NULL) {=0D + if (ProvisionMode || *MemoryCs->PowerManagementPolicy->PolicyEnabl= ed !=3D *BooleanValue) {=0D + IntegerValue =3D AllocatePool (sizeof (*IntegerValue));=0D + if (IntegerValue !=3D NULL) {=0D + *IntegerValue =3D (BooleanValue ? 0x01 : 0x00);=0D + MemoryCs->PowerManagementPolicy->PolicyEnabled =3D IntegerValu= e;=0D + PropertyChanged =3D TRUE;=0D + }=0D }=0D }=0D }=0D }=0D =0D - if (UnusedProperty) {=0D - FreePool (MemoryCs->PowerManagementPolicy);=0D - MemoryCs->PowerManagementPolicy =3D NULL;=0D - }=0D -=0D //=0D // Handle RANKCOUNT=0D //=0D @@ -1777,103 +1860,96 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D - // Handle SECURITYCAPABILITIES=0D + // Handle REGIONS=0D //=0D - if(MemoryCs->SecurityCapabilities =3D=3D NULL) {=0D - MemoryCs->SecurityCapabilities =3D AllocateZeroPool (sizeof (RedfishMe= mory_V1_7_1_SecurityCapabilities_CS));=0D - ASSERT (MemoryCs->SecurityCapabilities !=3D NULL);=0D - UnusedProperty =3D TRUE;=0D - } else {=0D - UnusedProperty =3D FALSE;=0D - }=0D +//// ****** Warning ******=0D +// Unsupported array type:=0D +//=0D =0D //=0D - // Handle SECURITYCAPABILITIES->CONFIGURATIONLOCKCAPABLE=0D + // Handle SECURITYCAPABILITIES=0D //=0D - if (PropertyChecker (MemoryCs->SecurityCapabilities->ConfigurationLockCa= pable, ProvisionMode)) {=0D - BooleanValue =3D GetPropertyBooleanValue (RESOURCE_SCHEMA, RESOURCE_SC= HEMA_VERSION, L"SecurityCapabilities/ConfigurationLockCapable", ConfigureLa= ng);=0D - if (BooleanValue !=3D NULL) {=0D - if (ProvisionMode || *MemoryCs->SecurityCapabilities->ConfigurationL= ockCapable !=3D *BooleanValue) {=0D - IntegerValue =3D AllocatePool (sizeof (*IntegerValue));=0D - if (IntegerValue !=3D NULL) {=0D - *IntegerValue =3D (BooleanValue ? 0x01 : 0x00);=0D - MemoryCs->SecurityCapabilities->ConfigurationLockCapable =3D Int= egerValue;=0D - PropertyChanged =3D TRUE;=0D - UnusedProperty =3D FALSE;=0D + if (MemoryCs->SecurityCapabilities !=3D NULL) {=0D + //=0D + // Handle SECURITYCAPABILITIES->CONFIGURATIONLOCKCAPABLE=0D + //=0D + if (PropertyChecker (MemoryCs->SecurityCapabilities->ConfigurationLock= Capable, ProvisionMode)) {=0D + BooleanValue =3D GetPropertyBooleanValue (RESOURCE_SCHEMA, RESOURCE_= SCHEMA_VERSION, L"SecurityCapabilities/ConfigurationLockCapable", Configure= Lang);=0D + if (BooleanValue !=3D NULL) {=0D + if (ProvisionMode || *MemoryCs->SecurityCapabilities->Configuratio= nLockCapable !=3D *BooleanValue) {=0D + IntegerValue =3D AllocatePool (sizeof (*IntegerValue));=0D + if (IntegerValue !=3D NULL) {=0D + *IntegerValue =3D (BooleanValue ? 0x01 : 0x00);=0D + MemoryCs->SecurityCapabilities->ConfigurationLockCapable =3D I= ntegerValue;=0D + PropertyChanged =3D TRUE;=0D + }=0D }=0D }=0D }=0D - }=0D -=0D - //=0D - // Handle SECURITYCAPABILITIES->DATALOCKCAPABLE=0D - //=0D - if (PropertyChecker (MemoryCs->SecurityCapabilities->DataLockCapable, Pr= ovisionMode)) {=0D - BooleanValue =3D GetPropertyBooleanValue (RESOURCE_SCHEMA, RESOURCE_SC= HEMA_VERSION, L"SecurityCapabilities/DataLockCapable", ConfigureLang);=0D - if (BooleanValue !=3D NULL) {=0D - if (ProvisionMode || *MemoryCs->SecurityCapabilities->DataLockCapabl= e !=3D *BooleanValue) {=0D - IntegerValue =3D AllocatePool (sizeof (*IntegerValue));=0D - if (IntegerValue !=3D NULL) {=0D - *IntegerValue =3D (BooleanValue ? 0x01 : 0x00);=0D - MemoryCs->SecurityCapabilities->DataLockCapable =3D IntegerValue= ;=0D + //=0D + // Handle SECURITYCAPABILITIES->DATALOCKCAPABLE=0D + //=0D + if (PropertyChecker (MemoryCs->SecurityCapabilities->DataLockCapable, = ProvisionMode)) {=0D + BooleanValue =3D GetPropertyBooleanValue (RESOURCE_SCHEMA, RESOURCE_= SCHEMA_VERSION, L"SecurityCapabilities/DataLockCapable", ConfigureLang);=0D + if (BooleanValue !=3D NULL) {=0D + if (ProvisionMode || *MemoryCs->SecurityCapabilities->DataLockCapa= ble !=3D *BooleanValue) {=0D + IntegerValue =3D AllocatePool (sizeof (*IntegerValue));=0D + if (IntegerValue !=3D NULL) {=0D + *IntegerValue =3D (BooleanValue ? 0x01 : 0x00);=0D + MemoryCs->SecurityCapabilities->DataLockCapable =3D IntegerVal= ue;=0D + PropertyChanged =3D TRUE;=0D + }=0D + }=0D + }=0D + }=0D + //=0D + // Handle SECURITYCAPABILITIES->MAXPASSPHRASECOUNT=0D + //=0D + if (PropertyChecker (MemoryCs->SecurityCapabilities->MaxPassphraseCoun= t, ProvisionMode)) {=0D + NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, RESOURCE_= SCHEMA_VERSION, L"SecurityCapabilities/MaxPassphraseCount", ConfigureLang);= =0D + if (NumericValue !=3D NULL) {=0D + if (ProvisionMode || *MemoryCs->SecurityCapabilities->MaxPassphras= eCount !=3D *NumericValue) {=0D + MemoryCs->SecurityCapabilities->MaxPassphraseCount =3D NumericVa= lue;=0D PropertyChanged =3D TRUE;=0D - UnusedProperty =3D FALSE;=0D }=0D }=0D }=0D - }=0D -=0D - //=0D - // Handle SECURITYCAPABILITIES->MAXPASSPHRASECOUNT=0D - //=0D - if (PropertyChecker (MemoryCs->SecurityCapabilities->MaxPassphraseCount,= ProvisionMode)) {=0D - NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, RESOURCE_SC= HEMA_VERSION, L"SecurityCapabilities/MaxPassphraseCount", ConfigureLang);=0D - if (NumericValue !=3D NULL) {=0D - if (ProvisionMode || *MemoryCs->SecurityCapabilities->MaxPassphraseC= ount !=3D *NumericValue) {=0D - MemoryCs->SecurityCapabilities->MaxPassphraseCount =3D NumericValu= e;=0D - PropertyChanged =3D TRUE;=0D - UnusedProperty =3D FALSE;=0D + //=0D + // Handle SECURITYCAPABILITIES->PASSPHRASECAPABLE=0D + //=0D + if (PropertyChecker (MemoryCs->SecurityCapabilities->PassphraseCapable= , ProvisionMode)) {=0D + BooleanValue =3D GetPropertyBooleanValue (RESOURCE_SCHEMA, RESOURCE_= SCHEMA_VERSION, L"SecurityCapabilities/PassphraseCapable", ConfigureLang);= =0D + if (BooleanValue !=3D NULL) {=0D + if (ProvisionMode || *MemoryCs->SecurityCapabilities->PassphraseCa= pable !=3D *BooleanValue) {=0D + IntegerValue =3D AllocatePool (sizeof (*IntegerValue));=0D + if (IntegerValue !=3D NULL) {=0D + *IntegerValue =3D (BooleanValue ? 0x01 : 0x00);=0D + MemoryCs->SecurityCapabilities->PassphraseCapable =3D IntegerV= alue;=0D + PropertyChanged =3D TRUE;=0D + }=0D + }=0D }=0D }=0D - }=0D -=0D - //=0D - // Handle SECURITYCAPABILITIES->PASSPHRASECAPABLE=0D - //=0D - if (PropertyChecker (MemoryCs->SecurityCapabilities->PassphraseCapable, = ProvisionMode)) {=0D - BooleanValue =3D GetPropertyBooleanValue (RESOURCE_SCHEMA, RESOURCE_SC= HEMA_VERSION, L"SecurityCapabilities/PassphraseCapable", ConfigureLang);=0D - if (BooleanValue !=3D NULL) {=0D - if (ProvisionMode || *MemoryCs->SecurityCapabilities->PassphraseCapa= ble !=3D *BooleanValue) {=0D - IntegerValue =3D AllocatePool (sizeof (*IntegerValue));=0D - if (IntegerValue !=3D NULL) {=0D - *IntegerValue =3D (BooleanValue ? 0x01 : 0x00);=0D - MemoryCs->SecurityCapabilities->PassphraseCapable =3D IntegerVal= ue;=0D + //=0D + // Handle SECURITYCAPABILITIES->PASSPHRASELOCKLIMIT=0D + //=0D + if (PropertyChecker (MemoryCs->SecurityCapabilities->PassphraseLockLim= it, ProvisionMode)) {=0D + NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, RESOURCE_= SCHEMA_VERSION, L"SecurityCapabilities/PassphraseLockLimit", ConfigureLang)= ;=0D + if (NumericValue !=3D NULL) {=0D + if (ProvisionMode || *MemoryCs->SecurityCapabilities->PassphraseLo= ckLimit !=3D *NumericValue) {=0D + MemoryCs->SecurityCapabilities->PassphraseLockLimit =3D NumericV= alue;=0D PropertyChanged =3D TRUE;=0D - UnusedProperty =3D FALSE;=0D }=0D }=0D }=0D - }=0D -=0D - //=0D - // Handle SECURITYCAPABILITIES->PASSPHRASELOCKLIMIT=0D + //=0D + // Handle SECURITYCAPABILITIES->SECURITYSTATES=0D + //=0D + //// ****** Warning ******=0D + // Unsupported array type:=0D //=0D - if (PropertyChecker (MemoryCs->SecurityCapabilities->PassphraseLockLimit= , ProvisionMode)) {=0D - NumericValue =3D GetPropertyNumericValue (RESOURCE_SCHEMA, RESOURCE_SC= HEMA_VERSION, L"SecurityCapabilities/PassphraseLockLimit", ConfigureLang);= =0D - if (NumericValue !=3D NULL) {=0D - if (ProvisionMode || *MemoryCs->SecurityCapabilities->PassphraseLock= Limit !=3D *NumericValue) {=0D - MemoryCs->SecurityCapabilities->PassphraseLockLimit =3D NumericVal= ue;=0D - PropertyChanged =3D TRUE;=0D - UnusedProperty =3D FALSE;=0D - }=0D - }=0D - }=0D =0D - if (UnusedProperty) {=0D - FreePool (MemoryCs->SecurityCapabilities);=0D - MemoryCs->SecurityCapabilities =3D NULL;=0D }=0D =0D //=0D @@ -1888,7 +1964,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle SERIALNUMBER=0D //=0D @@ -1901,7 +1976,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle SPAREDEVICECOUNT=0D //=0D @@ -1914,7 +1988,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle SUBSYSTEMDEVICEID=0D //=0D @@ -1927,7 +2000,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle SUBSYSTEMVENDORID=0D //=0D @@ -1940,7 +2012,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle VENDORID=0D //=0D @@ -1953,7 +2024,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle VOLATILEREGIONNUMBERLIMIT=0D //=0D @@ -1966,7 +2036,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle VOLATILEREGIONSIZELIMITMIB=0D //=0D @@ -1979,7 +2048,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle VOLATILEREGIONSIZEMAXMIB=0D //=0D @@ -1992,7 +2060,6 @@ ProvisioningMemoryProperties ( }=0D }=0D }=0D -=0D //=0D // Handle VOLATILESIZEMIB=0D //=0D @@ -2006,8 +2073,6 @@ ProvisioningMemoryProperties ( }=0D }=0D =0D -=0D -=0D //=0D // Convert C structure back to JSON text.=0D //=0D @@ -2039,18 +2104,17 @@ ProvisioningMemoryResource ( IN EFI_STRING ConfigureLang=0D )=0D {=0D - CHAR8 *MemoryJson;=0D + CHAR8 *Json;=0D EFI_STATUS Status;=0D - CHAR8 *NewResourceLocation;=0D - CHAR8 *NewKey;=0D + EFI_STRING NewResourceLocation;=0D CHAR8 *EtagStr;=0D CHAR8 ResourceId[16];=0D - CHAR8 NewUri[255];=0D =0D if (IS_EMPTY_STRING (ConfigureLang) || Private =3D=3D NULL) {=0D return EFI_INVALID_PARAMETER;=0D }=0D =0D + EtagStr =3D NULL;=0D AsciiSPrint (ResourceId, sizeof (ResourceId), "%d", Index);=0D =0D Status =3D ProvisioningMemoryProperties (=0D @@ -2059,54 +2123,45 @@ ProvisioningMemoryResource ( ResourceId,=0D ConfigureLang,=0D TRUE,=0D - &MemoryJson=0D + &Json=0D );=0D if (EFI_ERROR (Status)) {=0D DEBUG ((DEBUG_ERROR, "%a, provisioning resource for %s failed: %r\n", = __FUNCTION__, ConfigureLang, Status));=0D return Status;=0D }=0D =0D - Status =3D CreatePayloadToPostResource (Private->RedfishService, Private= ->Payload, MemoryJson, &NewResourceLocation, &EtagStr);=0D + Status =3D CreatePayloadToPostResource (Private->RedfishService, Private= ->Payload, Json, &NewResourceLocation, &EtagStr);=0D if (EFI_ERROR (Status)) {=0D - DEBUG ((DEBUG_ERROR, "%a, post memory resource for %s failed: %r\n", _= _FUNCTION__, ConfigureLang, Status));=0D + DEBUG ((DEBUG_ERROR, "%a, post Memory resource for %s failed: %r\n", _= _FUNCTION__, ConfigureLang, Status));=0D goto RELEASE_RESOURCE;=0D }=0D =0D - NewUri[0] =3D '\0';=0D + ASSERT (NewResourceLocation !=3D NULL);=0D =0D //=0D // Keep location of new resource.=0D //=0D if (NewResourceLocation !=3D NULL) {=0D - //=0D - // Find key=0D - //=0D - NewKey =3D AsciiStrStr (NewResourceLocation, RESOURCE_SCHEMA);=0D - if (NewKey !=3D NULL) {=0D - NewKey +=3D 6;=0D - //=0D - // skip '/'=0D - //=0D - if (NewKey[0] =3D=3D '/') {=0D - NewKey++;=0D - }=0D - SetConfigureLangWithkey (RESOURCE_SCHEMA, RESOURCE_SCHEMA_VERSION, N= ewKey, Index);=0D - AsciiSPrint (NewUri, sizeof (NewUri), "%a[%a]", Private->Uri, NewKey= );=0D - FreePool (NewResourceLocation);=0D - }=0D + RedfisSetRedfishUri (ConfigureLang, NewResourceLocation);=0D }=0D =0D //=0D // Handle Etag=0D //=0D if (EtagStr !=3D NULL) {=0D - SetEtagWithUri (EtagStr, NewUri);=0D + SetEtagWithUri (EtagStr, NewResourceLocation);=0D FreePool (EtagStr);=0D }=0D =0D RELEASE_RESOURCE:=0D =0D - FreePool (MemoryJson);=0D + if (NewResourceLocation !=3D NULL) {=0D + FreePool (NewResourceLocation);=0D + }=0D +=0D + if (Json !=3D NULL) {=0D + FreePool (Json);=0D + }=0D =0D return Status;=0D }=0D @@ -2126,12 +2181,17 @@ ProvisioningMemoryResources ( =0D Status =3D RedfishFeatureGetUnifiedArrayTypeConfigureLang (RESOURCE_SCHE= MA, RESOURCE_SCHEMA_VERSION, REDPATH_ARRAY_PATTERN, &UnifiedConfigureLangLi= st);=0D if (EFI_ERROR (Status) || UnifiedConfigureLangList.Count =3D=3D 0) {=0D - DEBUG ((DEBUG_ERROR, "%a, No HII question found with redpath: %s: %r\n= ", __FUNCTION__, REDPATH_ARRAY_PATTERN, Status));=0D + DEBUG ((DEBUG_ERROR, "%a, No HII question found with configure languag= e: %s: %r\n", __FUNCTION__, REDPATH_ARRAY_PATTERN, Status));=0D return EFI_NOT_FOUND;=0D }=0D + //=0D + // Set the configuration language in the RESOURCE_INFORMATION_EXCHANGE.= =0D + // This information is sent back to the parent resource (e.g. the collec= tion driver).=0D + //=0D + EdkIIRedfishResourceSetConfigureLang (&UnifiedConfigureLangList);=0D =0D for (Index =3D 0; Index < UnifiedConfigureLangList.Count; Index++) {=0D - DEBUG ((DEBUG_INFO, "[%d] create memory resource from: %s\n", UnifiedC= onfigureLangList.List[Index].Index, UnifiedConfigureLangList.List[Index].Co= nfigureLang));=0D + DEBUG ((DEBUG_INFO, "[%d] create Memory resource from: %s\n", UnifiedC= onfigureLangList.List[Index].Index, UnifiedConfigureLangList.List[Index].Co= nfigureLang));=0D ProvisioningMemoryResource (Private, UnifiedConfigureLangList.List[Ind= ex].Index, UnifiedConfigureLangList.List[Index].ConfigureLang);=0D FreePool (UnifiedConfigureLangList.List[Index].ConfigureLang);=0D }=0D @@ -2145,14 +2205,69 @@ ProvisioningMemoryExistResource ( IN REDFISH_RESOURCE_COMMON_PRIVATE *Private=0D )=0D {=0D + EFI_STATUS Status;=0D + EFI_STRING ConfigureLang;=0D + CHAR8 *EtagStr;=0D + CHAR8 *Json;=0D +=0D if (Private =3D=3D NULL) {=0D return EFI_INVALID_PARAMETER;=0D }=0D =0D - Private->Json =3D JsonDumpString (RedfishJsonInPayload (Private->Payload= ), EDKII_JSON_COMPACT);=0D - ASSERT (Private->Json !=3D NULL);=0D + EtagStr =3D NULL;=0D + Json =3D NULL;=0D + ConfigureLang =3D NULL;=0D +=0D + ConfigureLang =3D RedfishGetConfigLanguage (Private->Uri);=0D + if (ConfigureLang =3D=3D NULL) {=0D + return EFI_NOT_FOUND;=0D + }=0D +=0D + Status =3D ProvisioningMemoryProperties (=0D + Private->JsonStructProtocol,=0D + MemoryEmptyJson,=0D + NULL,=0D + ConfigureLang,=0D + TRUE,=0D + &Json=0D + );=0D + if (EFI_ERROR (Status)) {=0D + if (Status =3D=3D EFI_NOT_FOUND) {=0D + DEBUG ((REDFISH_DEBUG_TRACE, "%a, provisioning existing resource for= %s ignored. Nothing changed\n", __FUNCTION__, ConfigureLang));=0D + } else {=0D + DEBUG ((DEBUG_ERROR, "%a, provisioning existing resource for %s fail= ed: %r\n", __FUNCTION__, ConfigureLang, Status));=0D + }=0D + goto ON_RELEASE;=0D + }=0D +=0D + DEBUG ((REDFISH_DEBUG_TRACE, "%a, provisioning existing resource for %s\= n", __FUNCTION__, ConfigureLang));=0D + //=0D + // PUT back to instance=0D + //=0D + Status =3D CreatePayloadToPatchResource (Private->RedfishService, Privat= e->Payload, Json, &EtagStr);=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_ERROR, "%a, patch resource for %s failed: %r\n", __FUNCT= ION__, ConfigureLang, Status));=0D + }=0D +=0D + //=0D + // Handle Etag=0D + //=0D + if (EtagStr !=3D NULL) {=0D + SetEtagWithUri (EtagStr, Private->Uri);=0D + FreePool (EtagStr);=0D + }=0D +=0D +ON_RELEASE:=0D =0D - return RedfishUpdateResourceCommon (Private, Private->Json);=0D + if (Json !=3D NULL) {=0D + FreePool (Json);=0D + }=0D +=0D + if (ConfigureLang !=3D NULL) {=0D + FreePool (ConfigureLang);=0D + }=0D +=0D + return Status;=0D }=0D =0D /**=0D @@ -2200,9 +2315,6 @@ RedfishCheckResourceCommon ( EFI_STRING *ConfigureLangList;=0D UINTN Count;=0D EFI_STRING Property;=0D - CHAR8 *PropertyAscii;=0D - UINTN BuffSize;=0D - CHAR8 *Match;=0D =0D if (Private =3D=3D NULL || IS_EMPTY_STRING (Json)) {=0D return EFI_INVALID_PARAMETER;=0D @@ -2221,27 +2333,16 @@ RedfishCheckResourceCommon ( Status =3D EFI_SUCCESS;=0D for (Index =3D 0; Index < Count; Index++) {=0D =0D - Property =3D GetPropertyFromConfigureLang (ConfigureLangList[Index]);= =0D + Property =3D GetPropertyFromConfigureLang (Private->Uri, ConfigureLang= List[Index]);=0D if (Property =3D=3D NULL) {=0D continue;=0D }=0D =0D - DEBUG ((DEBUG_INFO, "[%d] check resource from: %s\n", Index, Property)= );=0D -=0D - BuffSize =3D StrLen (Property) + 1;=0D - PropertyAscii =3D AllocatePool (BuffSize);=0D - UnicodeStrToAsciiStrS (Property, PropertyAscii, BuffSize);=0D -=0D - //=0D - // check to see if it is partial match.=0D - //=0D - Match =3D AsciiStrStr (Json, PropertyAscii);=0D - if (Match =3D=3D NULL || AsciiStrnCmp (Match, PropertyAscii, AsciiStrL= en (PropertyAscii)) !=3D 0) {=0D + DEBUG ((DEBUG_INFO, "%a, [%d] check attribute for: %s\n", __FUNCTION__= , Index, Property));=0D + if (!MatchPropertyWithJsonContext (Property, Json)) {=0D + DEBUG ((DEBUG_INFO, "%a, property is missing: %s\n", __FUNCTION__, P= roperty));=0D Status =3D EFI_NOT_FOUND;=0D - DEBUG ((DEBUG_ERROR, "%a, property %a is missing\n", __FUNCTION__, P= ropertyAscii));=0D }=0D -=0D - FreePool (PropertyAscii);=0D }=0D =0D FreePool (ConfigureLangList);=0D @@ -2249,7 +2350,6 @@ RedfishCheckResourceCommon ( return Status;=0D }=0D =0D -=0D /**=0D Update resource to given URI.=0D =0D @@ -2263,40 +2363,34 @@ RedfishCheckResourceCommon ( EFI_STATUS=0D RedfishUpdateResourceCommon (=0D IN REDFISH_RESOURCE_COMMON_PRIVATE *Private,=0D - IN CHAR8 *Json=0D + IN CHAR8 *InputJson=0D )=0D {=0D EFI_STATUS Status;=0D - CHAR8 *MemoryJson;=0D - CHAR8 *ArrayKey;=0D + CHAR8 *Json;=0D EFI_STRING ConfigureLang;=0D CHAR8 *EtagStr;=0D =0D - if (Private =3D=3D NULL || IS_EMPTY_STRING (Json)) {=0D + if (Private =3D=3D NULL || IS_EMPTY_STRING (InputJson)) {=0D return EFI_INVALID_PARAMETER;=0D }=0D =0D - MemoryJson =3D NULL;=0D + EtagStr =3D NULL;=0D + Json =3D NULL;=0D ConfigureLang =3D NULL;=0D - ArrayKey =3D NULL;=0D =0D - Status =3D GetArraykeyFromUri (Private->Uri, &ArrayKey);=0D - if (EFI_ERROR (Status)) {=0D - return Status;=0D - }=0D -=0D - ConfigureLang =3D GetConfigureLangByKey (RESOURCE_SCHEMA, RESOURCE_SCHEM= A_VERSION, NULL, ArrayKey);=0D + ConfigureLang =3D RedfishGetConfigLanguage (Private->Uri);=0D if (ConfigureLang =3D=3D NULL) {=0D return EFI_NOT_FOUND;=0D }=0D =0D Status =3D ProvisioningMemoryProperties (=0D Private->JsonStructProtocol,=0D - Json,=0D + InputJson,=0D NULL,=0D ConfigureLang,=0D FALSE,=0D - &MemoryJson=0D + &Json=0D );=0D if (EFI_ERROR (Status)) {=0D if (Status =3D=3D EFI_NOT_FOUND) {=0D @@ -2311,9 +2405,9 @@ RedfishUpdateResourceCommon ( //=0D // PUT back to instance=0D //=0D - Status =3D CreatePayloadToPatchResource (Private->RedfishService, Privat= e->Payload, MemoryJson, &EtagStr);=0D + Status =3D CreatePayloadToPatchResource (Private->RedfishService, Privat= e->Payload, Json, &EtagStr);=0D if (EFI_ERROR (Status)) {=0D - DEBUG ((DEBUG_ERROR, "%a, post memory resource for %s failed: %r\n", _= _FUNCTION__, ConfigureLang, Status));=0D + DEBUG ((DEBUG_ERROR, "%a, patch resource for %s failed: %r\n", __FUNCT= ION__, ConfigureLang, Status));=0D }=0D =0D //=0D @@ -2326,17 +2420,81 @@ RedfishUpdateResourceCommon ( =0D ON_RELEASE:=0D =0D - if (MemoryJson !=3D NULL) {=0D - FreePool (MemoryJson);=0D + if (Json !=3D NULL) {=0D + FreePool (Json);=0D }=0D =0D if (ConfigureLang !=3D NULL) {=0D FreePool (ConfigureLang);=0D }=0D =0D - if (ArrayKey !=3D NULL) {=0D - FreePool (ArrayKey);=0D + return Status;=0D +}=0D +=0D +/**=0D + Identify resource from given URI.=0D +=0D + @param[in] This Pointer to REDFISH_RESOURCE_COMMON_PRIV= ATE instance.=0D + @param[in] Json The JSON to consume.=0D +=0D + @retval EFI_SUCCESS Value is returned successfully.=0D + @retval Others Some error happened.=0D +=0D +**/=0D +EFI_STATUS=0D +RedfishIdentifyResourceCommon (=0D + IN REDFISH_RESOURCE_COMMON_PRIVATE *Private,=0D + IN CHAR8 *Json=0D + )=0D +{=0D + BOOLEAN Supported;=0D + EFI_STATUS Status;=0D + EFI_STRING EndOfChar;=0D + REDFISH_FEATURE_ARRAY_TYPE_CONFIG_LANG_LIST ConfigLangList;=0D +=0D + Supported =3D RedfishIdentifyResource (Private->Uri, Private->Json);=0D + if (Supported) {=0D + Status =3D RedfishFeatureGetUnifiedArrayTypeConfigureLang (RESOURCE_SC= HEMA, RESOURCE_SCHEMA_VERSION, REDPATH_ARRAY_PATTERN, &ConfigLangList);=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_ERROR, "%a, BiosConfigToRedfishGetConfigureLangRegex f= ailed: %r\n", __FUNCTION__, Status));=0D + return Status;=0D + }=0D +=0D + if (ConfigLangList.Count =3D=3D 0) {=0D + return EFI_SUCCESS;=0D + }=0D +=0D + EndOfChar =3D StrStr (ConfigLangList.List[0].ConfigureLang, L"}");=0D + if (EndOfChar =3D=3D NULL) {=0D + ASSERT (FALSE);=0D + return EFI_DEVICE_ERROR;=0D + }=0D +=0D + //EndOfChar =3D StrStr (ConfigLangList.List[0].ConfigureLang, L"}");=0D + Status =3D IsRedpathArray (ConfigLangList.List[0].ConfigureLang, NULL,= &EndOfChar);=0D + if (EFI_ERROR (Status) && Status !=3D EFI_NOT_FOUND) {=0D + ASSERT (FALSE);=0D + return EFI_DEVICE_ERROR;=0D + }=0D + if (Status !=3D EFI_SUCCESS) {=0D + //=0D + // This is not the collection redpath.=0D + //=0D + GetRedpathNodeByIndex (ConfigLangList.List[0].ConfigureLang, 0, &End= OfChar);=0D + }=0D + *(++EndOfChar) =3D '\0';=0D + //=0D + // Keep URI and ConfigLang mapping=0D + //=0D + RedfisSetRedfishUri (ConfigLangList.List[0].ConfigureLang, Private->Ur= i);=0D + //=0D + // Set the configuration language in the RESOURCE_INFORMATION_EXCHANGE= .=0D + // This information is sent back to the parent resource (e.g. the coll= ection driver).=0D + //=0D + EdkIIRedfishResourceSetConfigureLang (&ConfigLangList);=0D + DestroyConfiglanguageList (&ConfigLangList);=0D + return EFI_SUCCESS;=0D }=0D =0D - return Status;=0D + return EFI_UNSUPPORTED;=0D } \ 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/RedfishMemoryCommon.h +++ b/RedfishClientPkg/Features/Memory/V1_7_1/Common/MemoryCommon.h @@ -20,7 +20,7 @@ #define RESOURCE_SCHEMA_MINOR "7"=0D #define RESOURCE_SCHEMA_ERRATA "1"=0D #define RESOURCE_SCHEMA_VERSION "v1_7_1"=0D -#define REDPATH_ARRAY_PATTERN L"/Memory/{.*}/"=0D +#define REDPATH_ARRAY_PATTERN L"/Memory/\\{.*\\}/"=0D #define REDPATH_ARRAY_PREFIX L"/Memory/"=0D #define RESOURCE_SCHEMA_FULL "x-uefi-redfish-Memory.v1_7_1"=0D =0D 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=0D Redfish feature driver implementation - Memory=0D =0D - (C) Copyright 2020-2021 Hewlett Packard Enterprise Development LP
=0D + (C) Copyright 2020-2022 Hewlett Packard Enterprise Development LP
=0D =0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D =0D -#include "../Common/RedfishMemoryCommon.h"=0D +#include "../Common/MemoryCommon.h"=0D =0D extern REDFISH_RESOURCE_COMMON_PRIVATE *mRedfishResourcePrivate;=0D =0D +EFI_HANDLE medfishResourceConfigProtocolHandle;=0D +=0D /**=0D Provising redfish resource by given URI.=0D =0D @@ -26,8 +28,8 @@ extern REDFISH_RESOURCE_COMMON_PRIVATE *mRedfishResourceP= rivate; EFI_STATUS=0D RedfishResourceProvisioningResource (=0D IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This,=0D - IN CHAR8 *Uri,=0D - IN BOOLEAN PostMode=0D + IN EFI_STRING Uri,=0D + IN BOOLEAN PostMode=0D )=0D {=0D REDFISH_RESOURCE_COMMON_PRIVATE *Private;=0D @@ -38,9 +40,7 @@ RedfishResourceProvisioningResource ( return EFI_INVALID_PARAMETER;=0D }=0D =0D - if (!PostMode) {=0D - return EFI_UNSUPPORTED;=0D - }=0D + DEBUG ((DEBUG_INFO, "%a, provisioning in %s mode\n", __FUNCTION__, (Post= Mode ? L"POST" : L"PATCH")));=0D =0D Private =3D REDFISH_RESOURCE_COMMON_PRIVATE_DATA_FROM_RESOURCE_PROTOCOL = (This);=0D =0D @@ -48,9 +48,9 @@ RedfishResourceProvisioningResource ( return EFI_NOT_READY;=0D }=0D =0D - Status =3D GetResourceByPath (Private->RedfishService, Uri, &Response);= =0D + Status =3D GetResourceByUri (Private->RedfishService, Uri, &Response);=0D if (EFI_ERROR (Status)) {=0D - DEBUG ((DEBUG_ERROR, "%a, get resource from: %a failed\n", __FUNCTION_= _, Uri));=0D + DEBUG ((DEBUG_ERROR, "%a, get resource from: %s failed\n", __FUNCTION_= _, Uri));=0D return Status;=0D }=0D =0D @@ -58,7 +58,7 @@ RedfishResourceProvisioningResource ( Private->Payload =3D Response.Payload;=0D ASSERT (Private->Payload !=3D NULL);=0D =0D - Status =3D RedfishProvisioningResourceCommon (Private, FALSE);=0D + Status =3D RedfishProvisioningResourceCommon (Private, !PostMode);=0D =0D //=0D // Release resource=0D @@ -89,12 +89,13 @@ RedfishResourceProvisioningResource ( EFI_STATUS=0D RedfishResourceConsumeResource (=0D IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This,=0D - IN CHAR8 *Uri=0D + IN EFI_STRING Uri=0D )=0D {=0D REDFISH_RESOURCE_COMMON_PRIVATE *Private;=0D EFI_STATUS Status;=0D REDFISH_RESPONSE Response;=0D + CHAR8 *Etag;=0D =0D if (This =3D=3D NULL || IS_EMPTY_STRING (Uri)) {=0D return EFI_INVALID_PARAMETER;=0D @@ -106,9 +107,9 @@ RedfishResourceConsumeResource ( return EFI_NOT_READY;=0D }=0D =0D - Status =3D GetResourceByPath (Private->RedfishService, Uri, &Response);= =0D + Status =3D GetResourceByUri (Private->RedfishService, Uri, &Response);=0D if (EFI_ERROR (Status)) {=0D - DEBUG ((DEBUG_ERROR, "%a, get resource from: %a failed\n", __FUNCTION_= _, Uri));=0D + DEBUG ((DEBUG_ERROR, "%a, get resource from: %s failed\n", __FUNCTION_= _, Uri));=0D return Status;=0D }=0D =0D @@ -119,9 +120,27 @@ RedfishResourceConsumeResource ( Private->Json =3D JsonDumpString (RedfishJsonInPayload (Private->Payload= ), EDKII_JSON_COMPACT);=0D ASSERT (Private->Json !=3D NULL);=0D =0D - Status =3D RedfishConsumeResourceCommon (Private, Private->Json);=0D + //=0D + // Find etag in HTTP response header=0D + //=0D + Etag =3D NULL;=0D + Status =3D GetEtagAndLocation (&Response, &Etag, NULL);=0D if (EFI_ERROR (Status)) {=0D - DEBUG ((DEBUG_ERROR, "%a, failed to consume resource from: %a %r\n", _= _FUNCTION__, Uri, Status));=0D + DEBUG ((DEBUG_ERROR, "%a, failed to get ETag from HTTP header\n", __FU= NCTION__));=0D + }=0D +=0D + Status =3D RedfishConsumeResourceCommon (Private, Private->Json, Etag);= =0D + if (EFI_ERROR (Status)) {=0D + if (Status !=3D EFI_ALREADY_STARTED) {=0D + DEBUG ((DEBUG_ERROR, "%a, failed to consume resource from: %s: %r\n"= , __FUNCTION__, Uri, Status));=0D + }=0D + } else {=0D + //=0D + // Keep etag after consuming pending settings.=0D + //=0D + if (Etag !=3D NULL) {=0D + SetEtagWithUri (Etag, Private->Uri);=0D + }=0D }=0D =0D //=0D @@ -193,7 +212,7 @@ RedfishResourceGetInfo ( EFI_STATUS=0D RedfishResourceUpdate (=0D IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This,=0D - IN CHAR8 *Uri=0D + IN EFI_STRING Uri=0D )=0D {=0D REDFISH_RESOURCE_COMMON_PRIVATE *Private;=0D @@ -210,9 +229,9 @@ RedfishResourceUpdate ( return EFI_NOT_READY;=0D }=0D =0D - Status =3D GetResourceByPath (Private->RedfishService, Uri, &Response);= =0D + Status =3D GetResourceByUri (Private->RedfishService, Uri, &Response);=0D if (EFI_ERROR (Status)) {=0D - DEBUG ((DEBUG_ERROR, "%a, get resource from: %a failed\n", __FUNCTION_= _, Uri));=0D + DEBUG ((DEBUG_ERROR, "%a, get resource from: %s failed\n", __FUNCTION_= _, Uri));=0D return Status;=0D }=0D =0D @@ -225,7 +244,7 @@ RedfishResourceUpdate ( =0D Status =3D RedfishUpdateResourceCommon (Private, Private->Json);=0D if (EFI_ERROR (Status)) {=0D - DEBUG ((DEBUG_ERROR, "%a, failed to update resource from: %a %r\n", __= FUNCTION__, Uri, Status));=0D + DEBUG ((DEBUG_ERROR, "%a, failed to update resource from: %s: %r\n", _= _FUNCTION__, Uri, Status));=0D }=0D =0D //=0D @@ -262,7 +281,7 @@ RedfishResourceUpdate ( EFI_STATUS=0D RedfishResourceCheck (=0D IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This,=0D - IN CHAR8 *Uri=0D + IN EFI_STRING Uri=0D )=0D {=0D REDFISH_RESOURCE_COMMON_PRIVATE *Private;=0D @@ -279,9 +298,9 @@ RedfishResourceCheck ( return EFI_NOT_READY;=0D }=0D =0D - Status =3D GetResourceByPath (Private->RedfishService, Uri, &Response);= =0D + Status =3D GetResourceByUri (Private->RedfishService, Uri, &Response);=0D if (EFI_ERROR (Status)) {=0D - DEBUG ((DEBUG_ERROR, "%a, get resource from: %a failed\n", __FUNCTION_= _, Uri));=0D + DEBUG ((DEBUG_ERROR, "%a, get resource from: %s failed\n", __FUNCTION_= _, Uri));=0D return Status;=0D }=0D =0D @@ -294,7 +313,7 @@ RedfishResourceCheck ( =0D Status =3D RedfishCheckResourceCommon (Private, Private->Json);=0D if (EFI_ERROR (Status)) {=0D - DEBUG ((DEBUG_ERROR, "%a, failed to check resource from: %a %r\n", __F= UNCTION__, Uri, Status));=0D + DEBUG ((DEBUG_ERROR, "%a, failed to check resource from: %s: %r\n", __= FUNCTION__, Uri, Status));=0D }=0D =0D //=0D @@ -318,11 +337,82 @@ RedfishResourceCheck ( return Status;=0D }=0D =0D +/**=0D + Identify resource on given URI.=0D +=0D + @param[in] This Pointer to EDKII_REDFISH_RESOURCE_CONFI= G_PROTOCOL instance.=0D + @param[in] Uri The target URI to consume.=0D +=0D + @retval EFI_SUCCESS This is target resource which we want t= o handle.=0D + @retval EFI_UNSUPPORTED This is not the target resource.=0D + @retval Others Some error happened.=0D +=0D +**/=0D +=0D +EFI_STATUS=0D +RedfishResourceIdentify (=0D + IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This,=0D + IN EFI_STRING Uri=0D + )=0D +{=0D + REDFISH_RESOURCE_COMMON_PRIVATE *Private;=0D + EFI_STATUS Status;=0D + REDFISH_RESPONSE Response;=0D +=0D + if (This =3D=3D NULL || IS_EMPTY_STRING (Uri)) {=0D + return EFI_INVALID_PARAMETER;=0D + }=0D +=0D + Private =3D REDFISH_RESOURCE_COMMON_PRIVATE_DATA_FROM_RESOURCE_PROTOCOL = (This);=0D +=0D + if (Private->RedfishService =3D=3D NULL) {=0D + return EFI_NOT_READY;=0D + }=0D +=0D + Status =3D GetResourceByUri (Private->RedfishService, Uri, &Response);=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_ERROR, "%a, get resource from: %s failed\n", __FUNCTION_= _, Uri));=0D + return Status;=0D + }=0D +=0D + Private->Uri =3D Uri;=0D + Private->Payload =3D Response.Payload;=0D + ASSERT (Private->Payload !=3D NULL);=0D +=0D + Private->Json =3D JsonDumpString (RedfishJsonInPayload (Private->Payload= ), EDKII_JSON_COMPACT);=0D + ASSERT (Private->Json !=3D NULL);=0D +=0D + Status =3D RedfishIdentifyResourceCommon (Private, Private->Json);=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_ERROR, "%a, identify %s failed: %r\n", __FUNCTION__, Uri= , Status));=0D + }=0D + //=0D + // Release resource=0D + //=0D + if (Private->Payload !=3D NULL) {=0D + RedfishFreeResponse (=0D + Response.StatusCode,=0D + Response.HeaderCount,=0D + Response.Headers,=0D + Response.Payload=0D + );=0D + Private->Payload =3D NULL;=0D + }=0D +=0D + if (Private->Json !=3D NULL) {=0D + FreePool (Private->Json);=0D + Private->Json =3D NULL;=0D + }=0D +=0D + return Status;=0D +}=0D +=0D EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL mRedfishResourceConfig =3D {=0D RedfishResourceProvisioningResource,=0D RedfishResourceConsumeResource,=0D RedfishResourceUpdate,=0D RedfishResourceCheck,=0D + RedfishResourceIdentify,=0D RedfishResourceGetInfo=0D };=0D =0D @@ -525,6 +615,8 @@ RedfishResourceEntryPoint ( return EFI_ALREADY_STARTED;=0D }=0D =0D + medfishResourceConfigProtocolHandle =3D ImageHandle;=0D +=0D mRedfishResourcePrivate =3D AllocateZeroPool (sizeof (REDFISH_RESOURCE_C= OMMON_PRIVATE));=0D CopyMem (&mRedfishResourcePrivate->ConfigHandler, &mRedfishConfigHandler= , sizeof (EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL));=0D CopyMem (&mRedfishResourcePrivate->RedfishResourceConfig, &mRedfishResou= rceConfig, sizeof (EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL));=0D diff --git a/RedfishClientPkg/Features/Memory/V1_7_1/Dxe/RedfishMemoryDxe.i= nf 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=0D #=0D -# (C) Copyright 2020-2021 Hewlett Packard Enterprise Development LP
=0D +# (C) Copyright 2020-2022 Hewlett Packard Enterprise Development LP
=0D #=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D @@ -9,8 +9,8 @@ =0D [Defines]=0D INF_VERSION =3D 0x00010005=0D - BASE_NAME =3D RedfishMemoryDxe=0D - FILE_GUID =3D f5594d13-ca13-485f-ac3a-80c5074dd8c0=0D + BASE_NAME =3D MemoryDxe=0D + FILE_GUID =3D 69a1a994-ec14-4dd0-ba0d-d1b51b7bab51=0D MODULE_TYPE =3D DXE_DRIVER=0D VERSION_STRING =3D 1.0=0D ENTRY_POINT =3D RedfishResourceEntryPoint=0D @@ -23,22 +23,25 @@ RedfishClientPkg/RedfishClientPkg.dec=0D =0D [Sources]=0D - ../Common/RedfishMemoryCommon.h=0D - ../Common/RedfishMemoryCommon.c=0D - RedfishMemoryDxe.c=0D + ../Common/MemoryCommon.h=0D + ../Common/MemoryCommon.c=0D + MemoryDxe.c=0D =0D [LibraryClasses]=0D BaseMemoryLib=0D DebugLib=0D + EdkIIRedfishResourceConfigLib=0D RedfishLib=0D RedfishFeatureUtilityLib=0D + RedfishResourceIdentifyLib=0D UefiLib=0D UefiDriverEntryPoint=0D =0D +=0D [Protocols]=0D - gEdkIIRedfishConfigHandlerProtocolGuid ## PRODUCED=0D - gEfiRestJsonStructureProtocolGuid ## CONSUMED=0D - gEdkIIRedfishResourceConfigProtocolGuid ## PRODUCED=0D + gEdkIIRedfishConfigHandlerProtocolGuid ## PRODUCED=0D + gEfiRestJsonStructureProtocolGuid ## CONSUMED=0D + gEdkIIRedfishResourceConfigProtocolGuid ## PRODUCED=0D =0D [Pcd]=0D gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaStringSize=0D diff --git a/RedfishClientPkg/Include/RedfishResourceCommon.h b/RedfishClie= ntPkg/Include/RedfishResourceCommon.h index 1ba992bb69..af4b809121 100644 --- a/RedfishClientPkg/Include/RedfishResourceCommon.h +++ b/RedfishClientPkg/Include/RedfishResourceCommon.h @@ -1,7 +1,7 @@ /** @file=0D Redfish feature driver common header file.=0D =0D - (C) Copyright 2020-2021 Hewlett Packard Enterprise Development LP
=0D + (C) Copyright 2020-2022 Hewlett Packard Enterprise Development LP
=0D =0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D @@ -11,8 +11,8 @@ #define EFI_REDFISH_RESOURCE_COMMON_H_=0D =0D #define MAX_RED_PATH_LEN 128=0D -#define IS_EMPTY_STRING(a) ((a) =3D=3D NULL || (a)[0] =3D=3D '\0')=0D -#define REDFISH_DEBUG_TRACE DEBUG_INFO=0D +=0D +#include =0D =0D //=0D // Libraries=0D @@ -23,14 +23,18 @@ #include =0D #include =0D #include =0D +#include =0D #include =0D #include =0D #include =0D #include =0D +#include =0D +#include =0D =0D //=0D // Protocols=0D //=0D +#include =0D #include =0D #include =0D #include =0D @@ -43,9 +47,15 @@ typedef struct _REDFISH_RESOURCE_COMMON_PRIVATE { EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL RedfishResourceConfig;=0D EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL ConfigHandler;=0D EFI_EVENT Event;=0D - CHAR8 *Uri;=0D + EFI_STRING Uri;=0D CHAR8 *Json;=0D REDFISH_PAYLOAD Payload;=0D + //=0D + // Below are used for the external resource.=0D + //=0D + EDKII_REDFISH_FEATURE_PROTOCOL *FeatureProtocol;=0D + RESOURCE_INFORMATION_EXCHANGE *InformationExchange;=0D + EFI_STRING RedfishVersion;=0D } REDFISH_RESOURCE_COMMON_PRIVATE;=0D =0D #define REDFISH_RESOURCE_COMMON_PRIVATE_DATA_FROM_CONFIG_PROTOCOL(This) \= =0D @@ -60,6 +70,7 @@ typedef struct _REDFISH_RESOURCE_COMMON_PRIVATE { =0D @param[in] This Pointer to REDFISH_RESOURCE_COMMON_PRIV= ATE instance.=0D @param[in] Json The JSON to consume.=0D + @param[in] HeaderEtag The Etag string returned in HTTP header= .=0D =0D @retval EFI_SUCCESS Value is returned successfully.=0D @retval Others Some error happened.=0D @@ -68,7 +79,8 @@ typedef struct _REDFISH_RESOURCE_COMMON_PRIVATE { EFI_STATUS=0D RedfishConsumeResourceCommon (=0D IN REDFISH_RESOURCE_COMMON_PRIVATE *Private,=0D - IN CHAR8 *Json=0D + IN CHAR8 *Json,=0D + IN CHAR8 *HeaderEtag OPTIONAL=0D );=0D =0D /**=0D @@ -120,4 +132,20 @@ RedfishUpdateResourceCommon ( IN CHAR8 *Json=0D );=0D =0D +/**=0D + Identify resource from given URI.=0D +=0D + @param[in] This Pointer to REDFISH_RESOURCE_COMMON_PRIV= ATE instance.=0D + @param[in] Json The JSON to consume.=0D +=0D + @retval EFI_SUCCESS Value is returned successfully.=0D + @retval Others Some error happened.=0D +=0D +**/=0D +EFI_STATUS=0D +RedfishIdentifyResourceCommon (=0D + IN REDFISH_RESOURCE_COMMON_PRIVATE *Private,=0D + IN CHAR8 *Json=0D + );=0D +=0D #endif=0D diff --git a/RedfishClientPkg/RedfishClient.fdf.inc b/RedfishClientPkg/Redf= ishClient.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=0D INF RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.inf=0D INF RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.inf= =0D - INF RedfishClientPkg/Features/Memory/V1_7_1/Dxe/RedfishMemoryDxe.inf=0D + INF RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.inf=0D INF RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.in= f=0D =0D !include RedfishClientPkg/RedfishJsonStructureDxe.fdf.inc=0D diff --git a/RedfishClientPkg/RedfishClientComponents.dsc.inc b/RedfishClie= ntPkg/RedfishClientComponents.dsc.inc index 5f1aff3c4b..031d87558e 100644 --- a/RedfishClientPkg/RedfishClientComponents.dsc.inc +++ b/RedfishClientPkg/RedfishClientComponents.dsc.inc @@ -19,7 +19,7 @@ #=0D # Below two modules should be pulled in by build tool.=0D #=0D - RedfishClientPkg/Features/Memory/V1_7_1/Dxe/RedfishMemoryDxe.inf=0D + RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.inf=0D RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.inf=0D =0D !include RedfishClientPkg/RedfishJsonStructureDxe.dsc.inc=0D --=20 2.32.0.windows.2