From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web08.11620.1604054855591784639 for ; Fri, 30 Oct 2020 03:47:35 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=W0ELYKqw; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0572814f16=abner.chang@hpe.com) Received: from pps.filterd (m0148664.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09UAkqZW005259; Fri, 30 Oct 2020 10:47:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=pps0720; bh=cjYchgpb/x24rH5x5FTl6MlExK0BR2IRaqw/CboSGR8=; b=W0ELYKqwm2m11+bHVdk1Gjo0KLgEuC1O6W/F907eUJmyF0bbvZDXKsUL9/3qyv7l75Nd 4uQu/fdaygNME3WYeO5BvyHL1WxwV8a+b0DlHbsKl8VTPNRgNqiGLt0UNwGZJvVBxUHK VooZy/jy/QkzaPL0GPhPog+0nxyUK1V+FP+g5Vnp0WzmPAy6SCxo4RGX6yKR7T2MkNWR LoKoFi+2X0zypn+KwVGx6Tj8Ee/PpiEReXreNXuhBXIqm9kB2ezYJbd83Mh2bYYsTjP2 hHdAIDqadL5pd48Jn7S7wnCtrQzridzqXYQ6uxDPRWRuJZwgwo4/u027PEKMCZLL8nUP JA== Received: from g2t2352.austin.hpe.com (g2t2352.austin.hpe.com [15.233.44.25]) by mx0b-002e3701.pphosted.com with ESMTP id 34ftgyapsv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 30 Oct 2020 10:47:34 +0000 Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2352.austin.hpe.com (Postfix) with ESMTP id 4815185; Fri, 30 Oct 2020 10:47:34 +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 E616942; Fri, 30 Oct 2020 10:47:32 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: Jiaxin Wu , Siyuan Fu , Fan Wang , Jiewen Yao , Nickle Wang Subject: [EFI Redfish Host Interface PATCH v2 2/6] RedfishPkg/Include: PlatformHostInterfaceLib header file Date: Fri, 30 Oct 2020 18:02:05 +0800 Message-Id: <20201030100209.9954-3-abner.chang@hpe.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201030100209.9954-1-abner.chang@hpe.com> References: <20201030100209.9954-1-abner.chang@hpe.com> X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-10-30_02:2020-10-30,2020-10-30 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxscore=0 suspectscore=3 impostorscore=0 spamscore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 clxscore=1015 mlxlogscore=771 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010300081 Signed-off-by: Abner Chang Cc: Jiaxin Wu Cc: Siyuan Fu Cc: Fan Wang Cc: Jiewen Yao Cc: Nickle Wang --- .../Include/Library/RedfishHostInterfaceLib.h | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 RedfishPkg/Include/Library/RedfishHostInterfaceLib.h diff --git a/RedfishPkg/Include/Library/RedfishHostInterfaceLib.h b/RedfishPkg/Include/Library/RedfishHostInterfaceLib.h new file mode 100644 index 0000000000..fe37b2739a --- /dev/null +++ b/RedfishPkg/Include/Library/RedfishHostInterfaceLib.h @@ -0,0 +1,52 @@ +/** @file + Definitinos of RedfishHostInterfaceDxe driver. + + (C) Copyright 2020 Hewlett Packard Enterprise Development LP
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ +#ifndef REDFISH_HOST_INTERFACE_LIB_H_ +#define REDFISH_HOST_INTERFACE_LIB_H_ + +#include +#include +#include + +#include + +/** + Get platform Redfish host interface device descriptor. + + @param[in] DeviceType Pointer to retrieve device type. + @param[out] DeviceDescriptor Pointer to retrieve REDFISH_INTERFACE_DATA, caller has to free + this memory using FreePool(). + @retval EFI_SUCCESS Device descriptor is returned successfully in DeviceDescriptor. + @retval EFI_NOT_FOUND No Redfish host interface descriptor provided on this platform. + @retval Others Fail to get device descriptor. +**/ +EFI_STATUS +RedfishPlatformHostInterfaceDeviceDescriptor ( + IN UINT8 *DeviceType, + OUT REDFISH_INTERFACE_DATA **DeviceDescriptor +); +/** + Get platform Redfish host interface protocol data. + Caller should pass NULL in ProtocolRecord to retrive the first protocol record. + Then continuously pass previous ProtocolRecord for retrieving the next ProtocolRecord. + + @param[in, out] ProtocolRecord Pointer to retrieve the first or the next protocol record. + caller has to free the new protocol record returned from + this function using FreePool(). + param[in] IndexOfProtocolData The index of protocol data. + + @retval EFI_SUCESS Protocol records are all returned. + @retval EFI_NOT_FOUND No more protocol records. + @retval Others Fail to get protocol records. +**/ +EFI_STATUS +RedfishPlatformHostInterfaceProtocolData ( + IN OUT MC_HOST_INTERFACE_PROTOCOL_RECORD **ProtocolRecord, + IN UINT8 IndexOfProtocolData +); +#endif -- 2.17.1