From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.67]) by mx.groups.io with SMTP id smtpd.web11.16867.1670424050461337720 for ; Wed, 07 Dec 2022 06:40:50 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@nvidia.com header.s=selector2 header.b=HGD3HvH2; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: nvidia.com, ip: 40.107.244.67, mailfrom: nicklew@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ia7F5bF/MNT7KGwJjdwHSpitd/triZ/lZyWLpi4YSx85hID6VcWyCo1RMj8Uijp481m9uYlIjnyiuzYcQcLi537N5/YX0WsNmpX2z+0XS9iiDXSimyJbA4ohA0ttnyAySMiRu9q1kVmhmhK8cuWqwMurE0+DnufZjpdlWwRCLDDhPrLNe8jb19WSznCeAn7jRBCMf2sEHZDCOPrCPVpTmXO12GQofGJ7V1mNApJp1aoYAJuOdbuKPVuBpmI+WQooKmRvrBSkFIrnGgs1ZfCUlzzNnmQiJt5FCq8iyQVPJ16c+sEY44iu77auqW88sAc+qzRdnZ33skrH/TA7PPn9xA== 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=gUtr79TsmljLOE0AkE3ZjsPhBfCealPZXAoJK4CBvXA=; b=dbWZEpJF9qEXufECgXjjzD6jnssLX6ryzAkmDXKGQv6q99FIu26pXEdWOrPpZxXWWxKbS/NgJ84pCYttfdCjz4VNGXogjYwt4pLBYgDOfM0dx4lljW8aK83o2L1WrSIvTO8X9TY2xTLts47rB5T7OQcNeb0vpxPNw4L2fCvqwWatpJVb1QnOcwjejiPJCFMST/Kb11sTOptZNUe/TqsakXwlwZoGsPEuOPAZxnonU5xqP/0i95Q+HWqfEN4tnNXJ6XDJdrofyU7BFq10tooogBtDzE3DAz/bUpotkA811Ogt++2dEL4RjJdwViiiASGSsNNi28DrtSsKSsaNyFKb1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gUtr79TsmljLOE0AkE3ZjsPhBfCealPZXAoJK4CBvXA=; b=HGD3HvH2obQMOKyrKYXNO17RgTBS0J3L0ywbUTcsFYehqhG/e1F9NZZwd1gpS2xPwAXAcKr6Vcxtf31i5tyJvixKxaAGtSVMdnfTR3UFok2YanGOsG/XvD5ln+vucEGKohfbuczeVoudt+oXnLWM3oYLVbubPVHw+YR4DzeKUdLjK3m8q6VPZrTXP+WzkEQKndy9saJ2vXbDAudUXCgU/s0GesmaS3ygG7Q+TJzsHdwy9FwiyCrq27gwmcMTUQtjo25Ea4oEVGE81l30FzqucX8AfL9nTQs7U+DzabnhmEkPL4guA6uxtBKyvuObZ9p9JDjG5FKXm+j0YWg626CNBw== Received: from MW4PR04CA0334.namprd04.prod.outlook.com (2603:10b6:303:8a::9) by MN0PR12MB6198.namprd12.prod.outlook.com (2603:10b6:208:3c5::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14; Wed, 7 Dec 2022 14:40:48 +0000 Received: from CO1NAM11FT052.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8a:cafe::51) by MW4PR04CA0334.outlook.office365.com (2603:10b6:303:8a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14 via Frontend Transport; Wed, 7 Dec 2022 14:40:47 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by CO1NAM11FT052.mail.protection.outlook.com (10.13.174.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5901.14 via Frontend Transport; Wed, 7 Dec 2022 14:40:47 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Wed, 7 Dec 2022 06:40:40 -0800 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Wed, 7 Dec 2022 06:40:40 -0800 Received: from NV-CL38DL3.nvidia.com (10.127.8.10) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.986.36 via Frontend Transport; Wed, 7 Dec 2022 06:40:39 -0800 From: "Nickle Wang" To: CC: Abner Chang , Igor Kulchytskyy , "Nick Ramirez" Subject: [edk2-staging][PATCH 1/3] edk2-staging/RedfishClientPkg: Add Redfish Resource Addendum Protocol Date: Wed, 7 Dec 2022 22:40:39 +0800 Message-ID: <20221207144039.310-1-nicklew@nvidia.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Return-Path: nicklew@nvidia.com X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT052:EE_|MN0PR12MB6198:EE_ X-MS-Office365-Filtering-Correlation-Id: ca3c6eb2-5ccb-447e-ece2-08dad861079f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: N58k/cQpQUATrPW8rJijn/wDvKsDLpHxr3lm6s2rlATccHUJ2ItZc29oBcvSoActGlm54WghwqWE3CXAZZQLO6TUunf3Z0JEOHUyft+N8RNV+peVaXsTfkrq4pYnql/IBv7E1kQAzc/wvOlqC69hFBmvmRRt4PhFA1hAm3saMvjp/WEvAjvcsnPGI5eAtzcYcy4vmbac0KdLEJ34IMabpHdvZSAmP7CRMwMge/s2L9ChN8kpux00eACwNy75rvmUS2SzkidyQQaxPRppkg8Q2IwwiwLhEqFR9sSurFJrJiJOJVaj1lxBZWy7r9n9R4FGQqH24UsKl+W+ujhjIxfwdwvimOpICWXKQ989v/zzbhxdRBiGXgdKd7msnA0+pFS/26Ipv2awFCifSlUaUJYbQAhe0Ov/Qek7V0whFsOubMq5yt3DHqI2eSwDmt/r/8TbeZhI/D3beHG1XUZQi5C8/sJZQVwguHSJ9jPlgP4W0G8OqZjXU++LhaB7aOM+DdovJcEWKFbx8iVPfpvfD7XHBe/awH6SpDFk2kyvfvr1CVJzNn2WQj2CMczBZ/qF73vj0yYvhV+5AYyYR7OUZ0ugECTTi8McA6s1lDFjPsjJc+GNp5/+k+ydFMWcqfjdvWlt054bG98uKpEMIK2DZ7uvwWqrY9SAO09nkPVILQvrxIe7MVuHSiPayguTeuOpiJYDU3OVlcIPHsN1bXt8Pvavrg== X-Forefront-Antispam-Report: CIP:216.228.118.232;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge1.nvidia.com;CAT:NONE;SFS:(13230022)(4636009)(346002)(396003)(376002)(136003)(39860400002)(451199015)(36840700001)(40470700004)(46966006)(2906002)(82740400003)(356005)(478600001)(7636003)(82310400005)(41300700001)(4326008)(8676002)(40460700003)(86362001)(40480700001)(8936002)(5660300002)(47076005)(426003)(70206006)(70586007)(36756003)(54906003)(186003)(336012)(26005)(2616005)(6916009)(1076003)(107886003)(83380400001)(316002)(7696005)(36860700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2022 14:40:47.6757 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ca3c6eb2-5ccb-447e-ece2-08dad861079f X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.232];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT052.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6198 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain Introduce Redfish Resource Addendum Protocol to Redfish feature driver. Feature driver uses this protocol to query OEM resource from platform in order to support Redfish OEM property. This protocol is also used to get addendum data that is required by BMC to manage Redfish BIOS service. Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy Cc: Nick Ramirez --- .../EdkIIRedfishResourceAddendumProtocol.h | 77 +++++++++++++++++++ RedfishClientPkg/RedfishClientPkg.dec | 2 + 2 files changed, 79 insertions(+) create mode 100644 RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceA= ddendumProtocol.h diff --git a/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceAddendum= Protocol.h b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceAddendum= Protocol.h new file mode 100644 index 0000000000..462d94fdc1 --- /dev/null +++ b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceAddendumProtoco= l.h @@ -0,0 +1,77 @@ +/** @file + This file defines the EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL interface= . + + Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved= . + + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL_H_ +#define EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL_H_ + +#include + +typedef struct _EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL EDKII_REDFISH_RES= OURCE_ADDENDUM_PROTOCOL; + +// +// The definition of REDFISH_SCHEMA_INFO +// +typedef struct { + CHAR8 *Uri; + CHAR8 *Schema; + CHAR8 *Version; +} REDFISH_RESOURCE_SCHEMA_INFO; + +/** + Provising redfish resource with with addendum data in given schema. + + @param[in] This Pointer to EDKII_REDFISH_RESOURCE_ADDEN= DUM_PROTOCOL instance. + @param[in] SchemaInfo Redfish schema information. + @param[in,out] Json On input, this is the Redfish data in g= iven Uri in JSON object. + On output, This is the Redfish data wit= h addendum information + which platform would like to add to Red= fish service. + + @retval EFI_SUCCESS Addendum data is attached. + @retval EFI_UNSUPPORTED No addendum data is required in given s= chema. + @retval Others Some error happened. + +**/ +typedef +EFI_STATUS +(EFIAPI *EDKII_REDFISH_RESOURCE_ADDENDUM_PROVISIONING)( + IN EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL *This, + IN REDFISH_RESOURCE_SCHEMA_INFO *SchemaInfo, + IN OUT EDKII_JSON_VALUE Json + ); + +/** + Provising redfish OEM resource in given schema information. + + @param[in] This Pointer to EDKII_REDFISH_RESOURCE_ADDENDUM= _PROTOCOL instance. + @param[in] SchemaInfo Redfish schema information. + @param[out] Json This is the Redfish data which is attached= to OEM object in given + schema. + + @retval EFI_SUCCESS OEM data is attached. + @retval EFI_UNSUPPORTED No OEM data is required in given schema= . + @retval Others Some error happened. + +**/ +typedef +EFI_STATUS +(EFIAPI *EDKII_REDFISH_RESOURCE_ADDENDUM_OEM)( + IN EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL *This, + IN REDFISH_RESOURCE_SCHEMA_INFO *SchemaInfo, + OUT EDKII_JSON_VALUE Json + ); + +struct _EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL { + UINT64 Revision; + EDKII_REDFISH_RESOURCE_ADDENDUM_OEM OemCallback; + EDKII_REDFISH_RESOURCE_ADDENDUM_PROVISIONING ProvisioningCallback; +}; + +extern EFI_GUID gEdkIIRedfishResourceAddendumProtocolGuid; + +#endif diff --git a/RedfishClientPkg/RedfishClientPkg.dec b/RedfishClientPkg/Redfi= shClientPkg.dec index d3c97ecf68..9d88680415 100644 --- a/RedfishClientPkg/RedfishClientPkg.dec +++ b/RedfishClientPkg/RedfishClientPkg.dec @@ -43,6 +43,8 @@ gEdkIIRedfishConfigLangMapProtocolGuid =3D { 0x1d9ba9fe, 0x5d5a, 0x4b= 66, {0x83, 0x5b, 0xe2, 0x5d, 0x13, 0x93, 0x4a, 0x9c } } ## Include/Protocol/EdkIIRedfishInterchangeData.h gEdkIIRedfishFeatureInterchangeDataProtocolGuid =3D { 0x4B8FF71C, 0x4A7B= , 0x9478, { 0xB7, 0x81, 0x35, 0x9B, 0x0A, 0xF2, 0x00, 0x91 } } + ## Include/Protocol/EdkIIRedfishResourceAddendumProtocol.h + gEdkIIRedfishResourceAddendumProtocolGuid =3D { 0xda36b12b, 0xaad4, 0x4e= 90, { 0xba, 0xcb, 0xe3, 0xb5, 0x3b, 0x08, 0xbc, 0x54 } } =20 [Guids] ## Include/Guid/RedfishClientPkgTokenSpace.h --=20 2.38.1.windows.1