From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 432AE740034 for ; Mon, 26 Feb 2024 02:44:13 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=sb9+aWuFTlJBRzVWsphVOrACeVQ411bAji15RbvXE7M=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1708915451; v=1; b=mz6buG/+ErtKB7oEQWTK7queROLBCia2ylSb3Gc9ary9oZwEyV9LyfRhsl5sWbGVSGtfUWcJ 1UjZa3PPg8e5a6gARfl6ZPMsCnlVVVr5VBmruyiYWdS/0ZlrEEeR41lrdIajh+pfbGZBqVvqyZ3 Q7Ogj9U2Us9VDMx1xPQ/dGPM= X-Received: by 127.0.0.2 with SMTP id gnvLYY7687511xrdICoFJJCB; Sun, 25 Feb 2024 18:44:11 -0800 X-Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [40.107.94.76]) by mx.groups.io with SMTP id smtpd.web11.12467.1708915450918725120 for ; Sun, 25 Feb 2024 18:44:11 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mw4pJE1OaMcclR/1iN8czljkDNDl28lc4UFicUgcXQ0AdQzbRQ44WZO6WJmn7DfCDoLVdksofm/LXnV/IkASmFueAQ95g4Je0idI8i1EdDFAuNum2JyuhxiUnAeYRxDnW+tleVP9Vwu/UX/CHFv0MPIlMYBEVyARu8rmXNW8pZgYCT0wm8hWWVvRjULfQuKoJKnIzrVGqqiaFn9Fc0Z7fYvvY3wDsCnAemWW2S5//RDWZ/sBQmjSKql7ekmf8vr00lT/V4mIAkwraW/FmihDWa6w66PFdLTn8RImPlz8R+TozU+plvmRZSM3VV/N6TmqhZ1L/9IiPCyPjUPFvafb3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=H0SwMt3SrVdVCcFO/mYgW0oFnlTGME+E7hHfh6RGq9Q=; b=XyjEc3ZTRRwYBWQNYg8IFLVoLiCery2eLCrY11o3iZhn2CWVNcQYlaUHbaFSg/tOqHr+6ly//h5zjYhu15GQvF6xPEarbrWU/cRLYfTQTL3PrKLyf8P0sBH5wjM6gSb1gDnlE6KkMEWoEk9dA0oFDBDKh+XtHvzGgcawTX5dUT4jQWxDJLrXpZImiR2MBovRsnV8nwFea7UO6kMqmqKgfWbjWqIcFJpdo9qhFHIOFCFMSNHm0fZhSsxenGs3PzdVSBfkpCB/Nqf30hEV0ackh1Dy5SugSeZbzeD/AUNzk/kUaYLM5eV2e/xmluqmB9fahAB/n+9Ro1SrONycyWMfYw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) X-Received: from CY8PR11CA0026.namprd11.prod.outlook.com (2603:10b6:930:4a::24) by MN0PR12MB6197.namprd12.prod.outlook.com (2603:10b6:208:3c6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.32; Mon, 26 Feb 2024 02:44:07 +0000 X-Received: from CY4PEPF0000EE34.namprd05.prod.outlook.com (2603:10b6:930:4a:cafe::93) by CY8PR11CA0026.outlook.office365.com (2603:10b6:930:4a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.49 via Frontend Transport; Mon, 26 Feb 2024 02:44:07 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C X-Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000EE34.mail.protection.outlook.com (10.167.242.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7292.25 via Frontend Transport; Mon, 26 Feb 2024 02:44:07 +0000 X-Received: from TPE-L1-ABNCHANG.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sun, 25 Feb 2024 20:44:05 -0600 From: "Chang, Abner via groups.io" To: CC: Nickle Wang , Igor Kulchytskyy Subject: [edk2-devel] [PATCH] RedfishPkg/RestJsonStructureDxe: Refine REST JSON C Structure DXE driver Date: Mon, 26 Feb 2024 10:43:38 +0800 Message-ID: <20240226024338.157-1-abner.chang@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE34:EE_|MN0PR12MB6197:EE_ X-MS-Office365-Filtering-Correlation-Id: 28b7811e-d777-40fe-9a4e-08dc3674cdcc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: h+TifhgrnyafBl5gSvG5UMGZOF3ctDf+tPpElpvwDK3CRa8nhgCzvPH7kxPo5fVvhNA9WV+I4J5Maty3SJMBXsSy1Py8RhsuziX4Z+WUZcyBlr7oF/4mrpyQZ09fWSs5o+sH7Nm9q4AuZyIVY4YjUQ7jDoiw8QOdrlsHwP05613JPGFE4rbemYnDQL0vBBu2Nm7O8Ai3LJoy8ZMiy66zK24EXDLDXZddxLPzqJW1BT4ezxdx3qJpCNshgSE11JphqvjZBw/0DvzgRdAD1xCMtP5SDu+kzx3JtMXIhMdQ7/lAzb7nnLLogfJdRVwWOe2RxE2PaXKew6gkW1/lWduOUYQTndtRC17O0XlEniVm/qixEG7hcIpA6C+by/GMPf4nvCyUFPfizXn2VSBhPwsSS2PVOazprfpsiglxcWcNJJLUkMzNGQxpauRAYE5Fj23lc/Ybx+CiOQgyLnDom4Cn1bDdhK+bYJvO19+Wt5fFcfZH1sYtdJ0Un6HWz9C9fmZ6cV9cKXS4hQGgIKbuWKGuOYC9aXZ8AbV0pXYuw71+4XUgiHBzbtPo7bg6xFb4NHugnLEZemCp3bhG8PJMRGw8gSC0t9gk8egAZAbv0ukxXp14UYZoK/w6/7s7LgF+VshDryhopGDCpRFFnzirpNyUo3efa1Xp3LOSRXoTNOMfgXOn3sn4YO8sj/dl0WSexuUTS+Cab7vvuyaPBcMHtmUev4TaAycIU7gyKrqTWgHSoK7cfhviD+F+SJ0cKosBCy9M X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Feb 2024 02:44:07.5518 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 28b7811e-d777-40fe-9a4e-08dc3674cdcc X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EE34.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6197 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abner.chang@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: mDxLbmiqe1iPMCbIVdFsP7DBx7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="mz6buG/+"; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") From: Abner Chang BZ #: 4711 - Add mode debug messages. - This driver shouldn't have a dependency on Redfish package and the references of "Redfish" terminology. Remove the references of "Redfish" from this driver. - Fix the missing parameter of DEBUG macros used in this driver. Signed-off-by: Abner Chang Cc: Nickle Wang Cc: Igor Kulchytskyy --- .../RestJsonStructureDxe.inf | 3 +- .../RestJsonStructureInternal.h | 3 +- .../RestJsonStructureDxe.c | 96 ++++++++++++++++++- 3 files changed, 96 insertions(+), 6 deletions(-) diff --git a/RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.inf b/Red= fishPkg/RestJsonStructureDxe/RestJsonStructureDxe.inf index 61e6253d318..e74c9dfd38b 100644 --- a/RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.inf +++ b/RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.inf @@ -2,6 +2,7 @@ # Implementation of EFI REST JSON Structure Protocol. # # (C) Copyright 2020 Hewlett Packard Enterprise Development LP
+# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. # SPDX-License-Identifier: BSD-2-Clause-Patent ## =20 @@ -17,7 +18,6 @@ [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec - RedfishPkg/RedfishPkg.dec =20 [Sources] RestJsonStructureDxe.c @@ -26,6 +26,7 @@ [LibraryClasses] BaseLib BaseMemoryLib + DebugLib MemoryAllocationLib UefiBootServicesTableLib UefiDriverEntryPoint diff --git a/RedfishPkg/RestJsonStructureDxe/RestJsonStructureInternal.h b/= RedfishPkg/RestJsonStructureDxe/RestJsonStructureInternal.h index 8d7175125c1..04be5cc80b5 100644 --- a/RedfishPkg/RestJsonStructureDxe/RestJsonStructureInternal.h +++ b/RedfishPkg/RestJsonStructureDxe/RestJsonStructureInternal.h @@ -3,6 +3,7 @@ Protocol. =20 (C) Copyright 2020 Hewlett Packard Enterprise Development LP
+ Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -25,7 +26,7 @@ typedef struct _REST_JSON_STRUCTURE_INSTANCE { LIST_ENTRY NextRestJsonStructureInstan= ce; ///< Next convertor instance UINTN NumberOfNameSpaceToConvert;= ///< Number of resource type this convertor supports. - EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER *SupportedRsrcIndentifier; = ///< The resource type linklist + EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER *SupportedRsrcIndentifier; = ///< The supported resource type array. EFI_REST_JSON_STRUCTURE_TO_STRUCTURE JsonToStructure; = ///< JSON to C structure function EFI_REST_JSON_STRUCTURE_TO_JSON StructureToJson; = ///< C structure to JSON function EFI_REST_JSON_STRUCTURE_DESTORY_STRUCTURE DestroyStructure; = ///< Destory C struture function. diff --git a/RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.c b/Redfi= shPkg/RestJsonStructureDxe/RestJsonStructureDxe.c index 404866fb319..0da5132e5ae 100644 --- a/RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.c +++ b/RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.c @@ -4,12 +4,14 @@ Protocol. =20 (C) Copyright 2020 Hewlett Packard Enterprise Development LP
+ Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ =20 #include +#include #include #include "RestJsonStructureInternal.h" =20 @@ -72,6 +74,8 @@ RestJsonStructureRegister ( } } =20 + DEBUG ((DEBUG_MANAGEABILITY, "%a: %d REST JSON-C interpreter(s) to regis= ter for the name spaces.\n", __func__, NumberOfNS)); + Instance =3D (REST_JSON_STRUCTURE_INSTANCE *)AllocateZeroPool (sizeof (REST_JSON_ST= RUCTURE_INSTANCE) + NumberOfNS * sizeof (EFI_REST_JSON_RESOURCE_TYPE_IDENTI= FIER)); if (Instance =3D=3D NULL) { @@ -88,6 +92,10 @@ RestJsonStructureRegister ( ThisSupportedInterp =3D JsonStructureSupported; for (Index =3D 0; Index < NumberOfNS; Index++) { CopyMem ((VOID *)CloneSupportedInterpId, (VOID *)&ThisSupportedInterp-= >RestResourceInterp, sizeof (EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER)); + DEBUG ((DEBUG_MANAGEABILITY, " Resource type : %a\n", ThisSupportedIn= terp->RestResourceInterp.NameSpace.ResourceTypeName)); + DEBUG ((DEBUG_MANAGEABILITY, " Major version : %a\n", ThisSupportedIn= terp->RestResourceInterp.NameSpace.MajorVersion)); + DEBUG ((DEBUG_MANAGEABILITY, " Minor version : %a\n", ThisSupportedIn= terp->RestResourceInterp.NameSpace.MinorVersion)); + DEBUG ((DEBUG_MANAGEABILITY, " Errata version: %a\n\n", ThisSupported= Interp->RestResourceInterp.NameSpace.ErrataVersion)); ThisSupportedInterp =3D (EFI_REST_JSON_STRUCTURE_SUPPORTED *)ThisSuppo= rtedInterp->NextSupportedRsrcInterp.ForwardLink; CloneSupportedInterpId++; } @@ -125,6 +133,8 @@ InterpreterInstanceToStruct ( EFI_STATUS Status; EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER *ThisSupportedRsrcTypeId; =20 + DEBUG ((DEBUG_MANAGEABILITY, "%a: Entry\n", __func__)); + if ((This =3D=3D NULL) || (InterpreterInstance =3D=3D NULL) || (ResourceRaw =3D=3D NULL) || @@ -146,9 +156,23 @@ InterpreterInstanceToStruct ( ResourceRaw, RestJSonHeader ); + if (EFI_ERROR (Status)) { + if (Status =3D=3D EFI_UNSUPPORTED) { + DEBUG (( + DEBUG_MANAGEABILITY, + "%a %a.%a.%a REST JSON to C structure interpreter has no capabil= ity to interpret the resource.\n", + InterpreterInstance->SupportedRsrcIndentifier->NameSpace.Resourc= eTypeName, + InterpreterInstance->SupportedRsrcIndentifier->NameSpace.MajorVe= rsion, + InterpreterInstance->SupportedRsrcIndentifier->NameSpace.MinorVe= rsion, + InterpreterInstance->SupportedRsrcIndentifier->NameSpace.ErrataV= ersion + )); + } else { + DEBUG ((DEBUG_MANAGEABILITY, "REST JsonToStructure returns failure= - %r\n", Status)); + } + } } else { // - // Check if the namesapce and version is supported by this interpreter= . + // Check if the namespace and version is supported by this interpreter= . // ThisSupportedRsrcTypeId =3D InterpreterInstance->SupportedRsrcIndentif= ier; for (Index =3D 0; Index < InterpreterInstance->NumberOfNameSpaceToConv= ert; Index++) { @@ -171,6 +195,11 @@ InterpreterInstanceToStruct ( ResourceRaw, RestJSonHeader ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_MANAGEABILITY, "Don't check version of this reso= urce type identifier JsonToStructure returns %r\n", Status)); + DEBUG ((DEBUG_MANAGEABILITY, " Supported ResourceTypeName =3D= %a\n", ThisSupportedRsrcTypeId->NameSpace.ResourceTypeName)); + } + break; } else { // @@ -195,6 +224,14 @@ InterpreterInstanceToStruct ( ResourceRaw, RestJSonHeader ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_MANAGEABILITY, "Check version of this resource= type identifier JsonToStructure returns %r\n", Status)); + DEBUG ((DEBUG_MANAGEABILITY, " Supported ResourceTypeName = =3D %a\n", ThisSupportedRsrcTypeId->NameSpace.ResourceTypeName)); + DEBUG ((DEBUG_MANAGEABILITY, " Supported MajorVersion = =3D %a\n", ThisSupportedRsrcTypeId->NameSpace.MajorVersion)); + DEBUG ((DEBUG_MANAGEABILITY, " Supported MinorVersion = =3D %a\n", ThisSupportedRsrcTypeId->NameSpace.MinorVersion)); + DEBUG ((DEBUG_MANAGEABILITY, " Supported ErrataVersion = =3D %a\n", ThisSupportedRsrcTypeId->NameSpace.ErrataVersion)); + } + break; } } @@ -232,6 +269,8 @@ InterpreterEfiStructToInstance ( EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER *ThisSupportedRsrcTypeId; EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER *RsrcTypeIdentifier; =20 + DEBUG ((DEBUG_MANAGEABILITY, "%a: Entry\n", __func__)); + if ((This =3D=3D NULL) || (InterpreterInstance =3D=3D NULL) || (RestJSonHeader =3D=3D NULL) || @@ -284,6 +323,14 @@ InterpreterEfiStructToInstance ( RestJSonHeader, ResourceRaw ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_MANAGEABILITY, "StructureToJson returns %r\n", Sta= tus)); + DEBUG ((DEBUG_MANAGEABILITY, " Supported ResourceTypeName =3D %= a\n", ThisSupportedRsrcTypeId->NameSpace.ResourceTypeName)); + DEBUG ((DEBUG_MANAGEABILITY, " Supported MajorVersion =3D %= a\n", ThisSupportedRsrcTypeId->NameSpace.MajorVersion)); + DEBUG ((DEBUG_MANAGEABILITY, " Supported MinorVersion =3D %= a\n", ThisSupportedRsrcTypeId->NameSpace.MinorVersion)); + DEBUG ((DEBUG_MANAGEABILITY, " Supported ErrataVersion =3D %= a\n", ThisSupportedRsrcTypeId->NameSpace.ErrataVersion)); + } + break; } } @@ -416,6 +463,35 @@ RestJsonStructureToStruct ( return EFI_UNSUPPORTED; } =20 + if (RsrcTypeIdentifier !=3D NULL) { + DEBUG ((DEBUG_MANAGEABILITY, "%a: Looking for the REST JSON to C Struc= ture converter:\n", __func__)); + if (RsrcTypeIdentifier->NameSpace.ResourceTypeName !=3D NULL) { + DEBUG ((DEBUG_MANAGEABILITY, " ResourceType: %a\n", RsrcTypeIdentif= ier->NameSpace.ResourceTypeName)); + } else { + DEBUG ((DEBUG_MANAGEABILITY, " ResourceType: NULL")); + } + + if (RsrcTypeIdentifier->NameSpace.MajorVersion !=3D NULL) { + DEBUG ((DEBUG_MANAGEABILITY, " MajorVersion: %a\n", RsrcTypeIdentif= ier->NameSpace.MajorVersion)); + } else { + DEBUG ((DEBUG_MANAGEABILITY, " MajorVersion: NULL")); + } + + if (RsrcTypeIdentifier->NameSpace.MinorVersion !=3D NULL) { + DEBUG ((DEBUG_MANAGEABILITY, " MinorVersion: %a\n", RsrcTypeIdentif= ier->NameSpace.MinorVersion)); + } else { + DEBUG ((DEBUG_MANAGEABILITY, " MinorVersion: NULL")); + } + + if (RsrcTypeIdentifier->NameSpace.ErrataVersion !=3D NULL) { + DEBUG ((DEBUG_MANAGEABILITY, " ErrataVersion: %a\n", RsrcTypeIdenti= fier->NameSpace.ErrataVersion)); + } else { + DEBUG ((DEBUG_MANAGEABILITY, " ErrataVersion: NULL")); + } + } else { + DEBUG ((DEBUG_MANAGEABILITY, "%a: RsrcTypeIdentifier is given as NULL,= go through all of the REST JSON to C structure interpreters.\n", __func__)= ); + } + Status =3D EFI_SUCCESS; Instance =3D (REST_JSON_STRUCTURE_INSTANCE *)GetFirstNode (&mRestJsonStr= uctureList); while (TRUE) { @@ -427,10 +503,12 @@ RestJsonStructureToStruct ( JsonStructure ); if (!EFI_ERROR (Status)) { + DEBUG ((DEBUG_MANAGEABILITY, "%a: REST JSON to C structure is interp= reted successfully.\n", __func__)); break; } =20 if (IsNodeAtEnd (&mRestJsonStructureList, &Instance->NextRestJsonStruc= tureInstance)) { + DEBUG ((DEBUG_ERROR, "%a: No REST JSON to C structure interpreter fo= und.\n", __func__)); Status =3D EFI_UNSUPPORTED; break; } @@ -483,6 +561,7 @@ RestJsonStructureDestroyStruct ( } =20 if (IsNodeAtEnd (&mRestJsonStructureList, &Instance->NextRestJsonStruc= tureInstance)) { + DEBUG ((DEBUG_ERROR, "%a: No REST JSON to C structure interpreter fo= und.\n", __func__)); Status =3D EFI_UNSUPPORTED; break; } @@ -512,8 +591,9 @@ RestJsonStructureToJson ( OUT CHAR8 **ResourceRaw ) { - EFI_STATUS Status; - REST_JSON_STRUCTURE_INSTANCE *Instance; + EFI_STATUS Status; + REST_JSON_STRUCTURE_INSTANCE *Instance; + EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER *RsrcTypeIdentifier; =20 if ((This =3D=3D NULL) || (RestJSonHeader =3D=3D NULL) || (ResourceRaw = =3D=3D NULL)) { return EFI_INVALID_PARAMETER; @@ -523,6 +603,13 @@ RestJsonStructureToJson ( return EFI_UNSUPPORTED; } =20 + RsrcTypeIdentifier =3D &RestJSonHeader->JsonRsrcIdentifier; + DEBUG ((DEBUG_MANAGEABILITY, "Looking for the REST C Structure to JSON r= esource converter:\n")); + DEBUG ((DEBUG_MANAGEABILITY, " ResourceType : %a\n", RsrcTypeIdentifier= ->NameSpace.ResourceTypeName)); + DEBUG ((DEBUG_MANAGEABILITY, " MajorVersion : %a\n", RsrcTypeIdentifier= ->NameSpace.MajorVersion)); + DEBUG ((DEBUG_MANAGEABILITY, " MinorVersion : %a\n", RsrcTypeIdentifier= ->NameSpace.MinorVersion)); + DEBUG ((DEBUG_MANAGEABILITY, " ErrataVersion: %a\n", RsrcTypeIdentifier= ->NameSpace.ErrataVersion)); + Status =3D EFI_SUCCESS; Instance =3D (REST_JSON_STRUCTURE_INSTANCE *)GetFirstNode (&mRestJsonStr= uctureList); while (TRUE) { @@ -537,6 +624,7 @@ RestJsonStructureToJson ( } =20 if (IsNodeAtEnd (&mRestJsonStructureList, &Instance->NextRestJsonStruc= tureInstance)) { + DEBUG ((DEBUG_ERROR, "%a: No REST C structure to JSON interpreter fo= und.\n", __func__)); Status =3D EFI_UNSUPPORTED; break; } @@ -587,7 +675,7 @@ RestJsonStructureEntryPoint ( } =20 /** - This is the unload handle for Redfish discover module. + This is the unload handle for REST JSON to C structure module. =20 Disconnect the driver specified by ImageHandle from all the devices in t= he handle database. Uninstall all the protocols installed in the driver entry point. --=20 2.37.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115938): https://edk2.groups.io/g/devel/message/115938 Mute This Topic: https://groups.io/mt/104575985/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-