From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (NAM10-DM6-obe.outbound.protection.outlook.com [40.107.93.61]) by mx.groups.io with SMTP id smtpd.web11.18413.1683876191649022998 for ; Fri, 12 May 2023 00:23:11 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@nvidia.com header.s=selector2 header.b=BdcmRezv; 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.93.61, mailfrom: nicklew@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NSjhUQeBwl2sGKoG13J1f/SDh+NMeF8rZWv29i6WDNBncjVsVof4iO04pIMKEixFMeTpKSxd/6cW54hp4tduEWBNt3/2UpLvn7o9EJQbwvLfkySiCaKU6cpgjk9DLqf1JbndopKsi0ebn8+R/t1ez2mAHK6a7B8Dddub1atntpiaeY2MAOk1JtJq0cWe1UtJOTCd6TWgbB0o7a6S8zoJBwjz03T00HAt6Tp9JWSQau59VsIMHGOz000+QCmO+YOXNhht4m3kQJGu1ErPJx9ztg83t4ISlLuM7VNl0oWqZmtSifsUlkwBv3HgZG0S1mAwSWguHgirDXVKRQ3wPUB0Fg== 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=ConBjM7FYoBP3kRRBEOm0YimJfIx5/dPKL/ZIF334aI=; b=c5reQO/fuqWlP/M0nw4fNjERfDU7avIW9vcYa2Mw/Cv0Gme7iCYdi9AGb2NrF1s/9SsOQjFjyLj+twK4ypfPMc7tl9mHCavbgj3cCGoU1RyIu1ywpBQLua/3j7iuzCMFbaiGnS4N8Qe2L/bZrzSxz4NGCkxHF8VZs3CNB1Esw9uZmBRXhUZjmlZSI7fPpj1jQXresqPQd9+uep5YUKfks0FLx9+2plVeYvOlWWwhhjo2LZDb7ruuzEQh+XEQRB6Yh789tg4AZJkFdIF7VIyCV94sHLbVvi0oXwbmAmAZ8R3N8lPpVgDiGLjDRJAw43PTxVudDhlaTesHhjGXjFxTFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=ConBjM7FYoBP3kRRBEOm0YimJfIx5/dPKL/ZIF334aI=; b=BdcmRezvsQYSSnnuCcwNf9E/KLbIwKBKi0dcXEVekIU22qaHtZ1F7GW0zs98Wt0GdcA0z97nLIfFwU/CAhW5obIdwMaVgMV4noNzqACOGl1mfY9Y2PBcthiOYqFmCzpbRZUBHO6Arpf7HtTxGYbuRigrBBl2PmSDSWG4xLPz2skpfGllj8Xqo2hcQtUxX4JbmhDOu767b5ejOTVTO90umOEvCphvDik+nnZx6u0BCrIqPYFGyaiqXQbVG/Nbi2RuwPSaJt5AbrSxIAeogRIKxUCh2lkiZ7+vuMlgcdk+M/fOm3Ehc8RMWyV0xOac2mVrKOrkLGsI+08ORkE9De5YfQ== Received: from SJ0PR05CA0125.namprd05.prod.outlook.com (2603:10b6:a03:33d::10) by PH0PR12MB8049.namprd12.prod.outlook.com (2603:10b6:510:28f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6363.33; Fri, 12 May 2023 07:23:09 +0000 Received: from DM6NAM11FT038.eop-nam11.prod.protection.outlook.com (2603:10b6:a03:33d:cafe::db) by SJ0PR05CA0125.outlook.office365.com (2603:10b6:a03:33d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.10 via Frontend Transport; Fri, 12 May 2023 07:23:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DM6NAM11FT038.mail.protection.outlook.com (10.13.173.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.23 via Frontend Transport; Fri, 12 May 2023 07:23:08 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Fri, 12 May 2023 00:22:55 -0700 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Fri, 12 May 2023 00:22:55 -0700 Received: from NV-CL38DL3.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Fri, 12 May 2023 00:22:54 -0700 From: "Nickle Wang" To: CC: Abner Chang , Igor Kulchytskyy Subject: [edk2-redfish-client][PATCH 1/3] RedfishClientPkg: Add Redfish Resource Addendum Protocol Date: Fri, 12 May 2023 15:22:54 +0800 Message-ID: <20230512072254.17782-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: DM6NAM11FT038:EE_|PH0PR12MB8049:EE_ X-MS-Office365-Filtering-Correlation-Id: fa8ee6e9-9800-4a25-81a2-08db52b9bc70 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cF4bPuqdN/h3UREdlaKDKWWaup7r0IfibwzzYA3D4SGnObjszMC0Q1IQvX8Y2ZL5AWUG9dX9EAP3CgoNDTuf7joggpr6ru5biN6CRup3QuixHh/YcnHO9c5E+BPFAR5JGkQAZUJUq/v6EpwEK8ZWZsPL2oUBaYcs0UPwXwksDDIJJSOWRRjE9kc0UEZW9NGsTGhCVAvHjALPi4OSdZ4qU9Q3t+RW3YyBT/h0FM708jyBOSpRvif7O7u8rFLfphoyvYDNRuTETZMlQXiiYKwuU5hB56v7q37E5MntfKt3MJWPutzNq2ZKJbE5bQKkg2eS8rBkDRFK0sPt64c+DEovdYgffMIPftyKZXPbgxZj6NWa0R6tfOJ7UKQcz4iIBEkbiJBhuUtgDYGXyhViZmCmjwe6lhXCC1RzGIBQnXff28JemBv7lRhLI235HPkez4+YRCc+XvmSgikLN0Aw6qXiWt9a4NQY+tm8cMXl+AkVHRKLzmf3nIsVCzR/l1G5ILetkxvgLnFElx8gP8U9l8N7Sk0/7doy65cZZMeMUQ+Z5ZYuYvVqy8zUHrMaO6dN8KP04oQ2kZmffjQ0p0BMLsLJ5G/Rp2ZQ4k7AaYGFaDiUQ7ULqcvlBTqfOI70sXQmy8Pu7ipLLF/lw0MDFdBF4y1t4Kop8PWAF80N42oMrxvcU40AUbrbmN3OHqxCxfzvWchtONg6BdUgTK71B41EqWA51A== X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(376002)(346002)(136003)(39860400002)(396003)(451199021)(36840700001)(46966006)(40470700004)(40460700003)(4326008)(6916009)(70206006)(478600001)(7696005)(70586007)(40480700001)(54906003)(316002)(36756003)(83380400001)(86362001)(426003)(2616005)(1076003)(47076005)(36860700001)(82310400005)(336012)(26005)(8676002)(8936002)(5660300002)(41300700001)(82740400003)(7636003)(186003)(2906002)(356005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2023 07:23:08.5565 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fa8ee6e9-9800-4a25-81a2-08db52b9bc70 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT038.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB8049 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 --- RedfishClientPkg/RedfishClientPkg.dec | 2 + .../EdkIIRedfishResourceAddendumProtocol.h | 80 +++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceA= ddendumProtocol.h diff --git a/RedfishClientPkg/RedfishClientPkg.dec b/RedfishClientPkg/Redfi= shClientPkg.dec index c0ab30ab..84bceca3 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 diff --git a/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceAddendum= Protocol.h b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceAddendum= Protocol.h new file mode 100644 index 00000000..fd28aba4 --- /dev/null +++ b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceAddendumProtoco= l.h @@ -0,0 +1,80 @@ +/** @file + This file defines the EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL interface= . + + Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights res= erved. + + 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; + +/** + Provide redfish resource 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 + ); + +/** + Provide redfish OEM resource with 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 + ); + +// +// The definition of _EDKII_REDFISH_RESOURCE_ADDENDUM_PROTOCOL +// +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 --=20 2.17.1