From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=kojfbvvS; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=06524ce5c2=abner.chang@hpe.com) 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id; s=pps0720; bh=CHS+5PuVTNGoOwLG1Zfew4fZCtAmHehLv/pu0Yh6ZXg=; b=kojfbvvSTMGnmJpzml1O8UbE08GHvw8Nnk6LnkfhADtVf/4pYXVJRs9L5NVH2+KjJO5L B0z5opyolyO83UcduPQ3jAhCRHxSHQ2Hd9MO8/4RykeT777iGKFE1GHTH1hfcLnbTGQy Hb+bp26mqMwo4b2nVBDFSQnO+huW50F1zQzhAw4mJM7Ti/IdKoOhYftEdC6Uo7lHqDda v/wKE13cuyS3B3YNgSymnHQ5x/QPDDmzFGGsgzAmf9o2ZvKkEF71SnBomPA9uW4YWR7S 6KA7pwelj0IgNf6l3M73O56GduW7UlCQAI7bJNfhy9REEDFM8VxCznYHNaUMeAKyhzJJ lQ== 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 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) 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: [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-Mailer: git-send-email 2.17.1 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343,18.0.737 definitions=2021-01-18_02:2021-01-15,2021-01-18 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 bulkscore=0 mlxlogscore=999 clxscore=1015 mlxscore=0 suspectscore=0 phishscore=0 adultscore=0 lowpriorityscore=0 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101180018 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 = { 0x8804377, 0xaf7a, 0x4496, { 0x8a, 0x7b, 0x17, 0x59, 0x0, 0xe9, 0xab, 0x46 } } + ## Include/Protocol/Edk2RedfishConfigHandler.h + gEdkIIRedfishConfigHandlerProtocolGuid = { 0xbc0fe6bb, 0x2cc9, 0x463e, { 0x90, 0x82, 0xfa, 0x11, 0x76, 0xfc, 0x67, 0xde } } + [Guids] gEfiRedfishPkgTokenSpaceGuid = { 0x4fdbccb7, 0xe829, 0x4b4c, { 0x88, 0x87, 0xb2, 0x3f, 0xd7, 0x25, 0x4b, 0x85 }} diff --git a/RedfishPkg/Include/Protocol/EdkIIRedfishConfigHandler.h b/RedfishPkg/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, 0x67, 0xde } \ + } + +typedef struct { + EFI_HANDLE RedfishServiceRestExHandle; ///< REST EX EFI handle associated with this Redfish service. + UINTN RedfishServiceVersion; ///< Redfish service version. + CHAR16 *RedfishServiceLocation; ///< Redfish service location. + CHAR16 *RedfishServiceUuid; ///< Redfish service UUID. + CHAR16 *RedfishServiceOs; ///< Redfish service OS. + CHAR16 *RedfishServiceOsVersion; ///< Redfish service OS version. + CHAR16 *RedfishServiceProduct; ///< Redfish service product name. + CHAR16 *RedfishServiceProductVer; ///< Redfish service product 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_HANDLER_PROTOCOL instance. + @param[in] RedfishServiceinfo Redfish service information. + + @retval EFI_SUCCESS The handler has been initialized successfully. + @retval EFI_DEVICE_ERROR Failed to create or configure the REST EX protocol instance. + @retval EFI_ALREADY_STARTED This handler has already been initialized. + @retval Other Error happens during the initialization. + +**/ +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 successfully. + @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 -- 2.17.1