From nobody Sun May 5 20:57:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+70476+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+70476+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=hpe.com ARC-Seal: i=1; a=rsa-sha256; t=1610939983; cv=none; d=zohomail.com; s=zohoarc; b=cP5xCZ9yEi81r56m0QUPFfUGcGnVv9A2tU+c5nYGfgGy93xDgeQHbrb+bdyA1kQCeRHAK1FtgGZ9UXRPhJrkSHX8mSKwhh69vVsqtJr1DpmZFLWN3CfiTUfCRVCnRPG7x2o0cZQ1woz0AQ4TNzeyxF5BfcWUEfkh8AiAyCKQ0B4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610939983; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To; bh=2w1lCnrXcFuUNWDbwPEoq1KpiPrybMs0rWed6FDnvqk=; b=QVLN1aCP36ADWuvm6pIfEXVpN57FXzjHTEkNK584jGuMiU6kz0q19O0D96lYrGhkHvm+nSEJEUXM+W8/c78QKzYeGOSFCuxGW5D9Vcv8mYmmW9dPPQeRyUUkzWVCTlifdoeQXjEBP5iGf7cMaYSl8dogmNWg9lo3GEQJS26Et+w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+70476+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1610939983039484.8315748743785; Sun, 17 Jan 2021 19:19:43 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id SJ1wYY1788612x6YaYNyv4OO; Sun, 17 Jan 2021 19:19:42 -0800 X-Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web08.28863.1610939982076589265 for ; Sun, 17 Jan 2021 19:19:42 -0800 X-Received: from pps.filterd (m0150242.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 10I3DITx028540 for ; Mon, 18 Jan 2021 03:19:41 GMT X-Received: from g2t2353.austin.hpe.com (g2t2353.austin.hpe.com [15.233.44.26]) by mx0a-002e3701.pphosted.com with ESMTP id 3649ktnekf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 18 Jan 2021 03:19:41 +0000 X-Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2353.austin.hpe.com (Postfix) with ESMTP id D0E9065 for ; Mon, 18 Jan 2021 03:19:40 +0000 (UTC) X-Received: from abner-virtual-machine.asiapacific.hpqcorp.net (abner-virtual-machine.asiapacific.hpqcorp.net [15.119.210.153]) by g2t2360.austin.hpecorp.net (Postfix) with ESMTP id D7AF936; Mon, 18 Jan 2021 03:19:39 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: Nickle Wang Subject: [edk2-devel] [PATCH] RedfishPkg/Include: EDKII Redfish Config Handler Protocol header file Date: Mon, 18 Jan 2021 10:31:22 +0800 Message-Id: <20210118023122.9777-1-abner.chang@hpe.com> X-HPE-SCL: -1 Precedence: Bulk List-Unsubscribe: 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@hpe.com X-Gm-Message-State: ypyY7Od6Kd5WM4pFa1gteQE4x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1610939982; bh=ICtVUIV76aLXHwxA43KGSt9njWhpaLaCu59OLDVqWXk=; h=Cc:Date:From:Reply-To:Subject:To; b=D3Bo569/3xYzeeasdM2pZqNOzaP6OxQf2tI4FQUQEKUgR+wG4ZtGSKASJWqXVRoG9qo 9lzfZYfAJeC+JbP1anUa7MJReqp/007euTLHGjAPM7VqNb9OE8PNdlA8qN8GArLNEsrWY PId78gr0vT2MDyABtDRj1jxjiGhcO338Wdw= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" BZ:2911 This is the header file of EDKII Redfish config handler protocol, which is used by EDKII Redfish feature driver in order to manipulate Redfish properties based on the Redfish schema. Signed-off-by: Jiaxin Wu Signed-off-by: Siyuan Fu Signed-off-by: Fan Wang Signed-off-by: Abner Chang Cc: Nickle Wang --- RedfishPkg/RedfishPkg.dec | 3 + .../Protocol/EdkIIRedfishConfigHandler.h | 78 +++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 RedfishPkg/Include/Protocol/EdkIIRedfishConfigHandler.h diff --git a/RedfishPkg/RedfishPkg.dec b/RedfishPkg/RedfishPkg.dec index 2985676b60..b8ff98eb13 100644 --- a/RedfishPkg/RedfishPkg.dec +++ b/RedfishPkg/RedfishPkg.dec @@ -64,6 +64,9 @@ ## Include/Protocol/EdkIIRedfishCredential.h gEdkIIRedfishCredentialProtocolGuid =3D { 0x8804377, 0xaf7a, 0x4496, { 0= x8a, 0x7b, 0x17, 0x59, 0x0, 0xe9, 0xab, 0x46 } } =20 + ## Include/Protocol/Edk2RedfishConfigHandler.h + gEdkIIRedfishConfigHandlerProtocolGuid =3D { 0xbc0fe6bb, 0x2cc9, 0x463e,= { 0x90, 0x82, 0xfa, 0x11, 0x76, 0xfc, 0x67, 0xde } } + [Guids] gEfiRedfishPkgTokenSpaceGuid =3D { 0x4fdbccb7, 0xe829, 0x4b4c, { 0x= 88, 0x87, 0xb2, 0x3f, 0xd7, 0x25, 0x4b, 0x85 }} =20 diff --git a/RedfishPkg/Include/Protocol/EdkIIRedfishConfigHandler.h b/Redf= ishPkg/Include/Protocol/EdkIIRedfishConfigHandler.h new file mode 100644 index 0000000000..bbd60ed6bd --- /dev/null +++ b/RedfishPkg/Include/Protocol/EdkIIRedfishConfigHandler.h @@ -0,0 +1,78 @@ +/** @file + This file defines the EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL interface. + + Copyright (c) 2019, Intel Corporation. All rights reserved.
+ (C) Copyright 2021 Hewlett Packard Enterprise Development LP
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef EDKII_REDFISH_CONFIG_HANDLER_H_ +#define EDKII_REDFISH_CONFIG_HANDLER_H_ + +typedef struct _EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL EDKII_REDFISH_CONFIG= _HANDLER_PROTOCOL; + +#define EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL_GUID \ + { \ + 0xbc0fe6bb, 0x2cc9, 0x463e, { 0x90, 0x82, 0xfa, 0x11, 0x76, 0xfc, 0x= 67, 0xde } \ + } + +typedef struct { + EFI_HANDLE RedfishServiceRestExHandle; ///< REST EX EFI handle as= sociated with this Redfish service. + UINTN RedfishServiceVersion; ///< Redfish service versi= on. + CHAR16 *RedfishServiceLocation; ///< Redfish service locat= ion. + CHAR16 *RedfishServiceUuid; ///< Redfish service UUID. + CHAR16 *RedfishServiceOs; ///< Redfish service OS. + CHAR16 *RedfishServiceOsVersion; ///< Redfish service OS ve= rsion. + CHAR16 *RedfishServiceProduct; ///< Redfish service produ= ct name. + CHAR16 *RedfishServiceProductVer; ///< Redfish service produ= ct version. + BOOLEAN RedfishServiceUseHttps; ///< Redfish service uses = HTTPS. +} REDFISH_CONFIG_SERVICE_INFORMATION; + +/** + Initialize a configure handler of EDKII Redfish feature driver. + + This function will be called by the EDKII Redfish config handler driver = to + initialize the configure handler of each EDKII Redfish feature driver. + + @param[in] This Pointer to EDKII_REDFISH_CONFIG_HAN= DLER_PROTOCOL instance. + @param[in] RedfishServiceinfo Redfish service information. + + @retval EFI_SUCCESS The handler has been initialized su= ccessfully. + @retval EFI_DEVICE_ERROR Failed to create or configure the R= EST EX protocol instance. + @retval EFI_ALREADY_STARTED This handler has already been initi= alized. + @retval Other Error happens during the initializa= tion. + +**/ +typedef +EFI_STATUS +(EFIAPI *EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL_INIT) ( + IN EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL *This, + IN REDFISH_CONFIG_SERVICE_INFORMATION *RedfishServiceinfo + ); + +/** + Stop a Redfish configure handler of EDKII Redfish feature driver. + + @param[in] This Pointer to EDKII_REDFISH_CONFIG_HANDLER= _PROTOCOL instance. + + @retval EFI_SUCCESS This handler has been stoped successful= ly. + @retval Others Some error happened. + +**/ +typedef +EFI_STATUS +(EFIAPI *EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL_STOP) ( + IN EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL *This + ); + +struct _EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL { + EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL_INIT Init; + EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL_STOP Stop; +}; + + +extern EFI_GUID gdkIIRedfishConfigHandlerProtocolGuid; + +#endif --=20 2.17.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 (#70476): https://edk2.groups.io/g/devel/message/70476 Mute This Topic: https://groups.io/mt/79915284/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-