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.web11.15216.1601219807922948143 for ; Sun, 27 Sep 2020 08:16:47 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@hpe.com header.s=pps0720 header.b=RmpTQW6S; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=05397b83fd=abner.chang@hpe.com) Received: from pps.filterd (m0134422.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 08RFGlUu019357; Sun, 27 Sep 2020 15:16:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : mime-version; s=pps0720; bh=RXHjtF/QQ8/U8c0wCq58jq9KJyDy1ZT7MOb87DU7Bf0=; b=RmpTQW6SPkqtAVxD1+qKQ/XN62qwV8xlYVXOWeF9NkamBd3KSO/+589BhE1RAqI57an8 zvrmmkau1vgv3Hqt1ALa0wspv6Yte6R0huouZDmr6Re0F6zmRszdkroNpQVflhYCmGFi YvtX1elqd4BnHreRgN4LEce79JGtymNw8PwbK2VAQB4maB1D/873eofdjGKHxh0ec5k7 OxPWvZpfe1qy7gCVTQp3rY7yLdXxQ76AHcxEdreGC9ph8hBibkVpv9eQEzGen4bRK7C7 7wQo+U+yDvPXnkCeysqiwqfln8B1SE4RKoo1F7UOnnVDxkbbHLWbvEV/31lBkaxHmeQD Hw== Received: from g4t3426.houston.hpe.com (g4t3426.houston.hpe.com [15.241.140.75]) by mx0b-002e3701.pphosted.com with ESMTP id 33sy1gefh0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 27 Sep 2020 15:16:47 +0000 Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g4t3426.houston.hpe.com (Postfix) with ESMTP id 4681054; Sun, 27 Sep 2020 15:16:46 +0000 (UTC) Received: from SAC2XFT1JT.asiapacific.hpqcorp.net (sac2xft1jt.asiapacific.hpqcorp.net [10.43.42.132]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id A621A4B; Sun, 27 Sep 2020 15:16:44 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: abner.chang@hpe.com, Jiaxin Wu , Siyuan Fu , Fan Wang , Yao Jiewen , Nickle Wang Subject: [edk2-staging/RedfishHostInterfaceDxe PATCH 3/5] RedfishPkg/PlatformHostInterfaceLib: Platform NULL lib Date: Sun, 27 Sep 2020 23:16:43 +0800 Message-Id: <20200927151643.458716-1-abner.chang@hpe.com> X-Mailer: git-send-email 2.21.0.windows.1 X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-09-27_12:2020-09-24,2020-09-27 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=694 clxscore=1015 mlxscore=0 lowpriorityscore=0 malwarescore=0 bulkscore=0 phishscore=0 adultscore=0 impostorscore=0 spamscore=0 suspectscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009270146 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0b-002e3701.pphosted.com id 08RFGlUu019357 Content-Type: text/plain; charset=unknown-8bit Content-Transfer-Encoding: quoted-printable https://bugzilla.tianocore.org/show_bug.cgi?id=3D2912 NULL instance of PlatformHostInterfaceLib. PlatformHostInterfaceLib is consumed by RedfishHostInterfaceDxe driver, this library provide the platform-specific implementation for building up Redfish Host Inteface information. Signed-off-by: Abner Chang Cc: Jiaxin Wu Cc: Siyuan Fu Cc: Fan Wang Cc: Yao Jiewen Cc: Nickle Wang --- .../BZ2912PlatformHostInterfaceLibNull.c | 53 +++++++++++++++++++ .../BZ2912PlatformHostInterfaceLibNull.inf | 34 ++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 RedfishPkg/Library/PlatformHostInterfaceLibNull/BZ291= 2PlatformHostInterfaceLibNull.c create mode 100644 RedfishPkg/Library/PlatformHostInterfaceLibNull/BZ291= 2PlatformHostInterfaceLibNull.inf diff --git a/RedfishPkg/Library/PlatformHostInterfaceLibNull/BZ2912Platfo= rmHostInterfaceLibNull.c b/RedfishPkg/Library/PlatformHostInterfaceLibNul= l/BZ2912PlatformHostInterfaceLibNull.c new file mode 100644 index 00000000000..8afe24c7389 --- /dev/null +++ b/RedfishPkg/Library/PlatformHostInterfaceLibNull/BZ2912PlatformHostI= nterfaceLibNull.c @@ -0,0 +1,53 @@ +=EF=BB=BF/** @file + NULL instace of RedfishPlatformHostInterfaceLib + + (C) Copyright 2020 Hewlett Packard Enterprise Development LP
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ +#include +#include +#include +#include + +/** + Get platform Redfish host interface device descriptor. + + @param[out] DeviceType Pointer to retrieve device type. + @param[out] DeviceDescriptor Pointer to retrieve REDFISH_INTERFACE_DA= TA, 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, + IN REDFISH_INTERFACE_DATA **DeviceDescriptor +) +{ + return EFI_NOT_FOUND; +} +/** + Get platform Redfish host interface protocol data. + Caller should pass NULL in ProtocolRecord to retrive the first protoco= l record. + Then continuously pass previous ProtocolRecord for retrieving the next= ProtocolRecord. + + @param[in, out] ProtocolRecord Pointer to retrieve the first or the n= ext protocol record. + caller has to free the new protocol re= cord 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 MC_HOST_INTERFACE_PROTOCOL_RECORD **ProtocolRecord, + IN UINT8 IndexOfProtocolData +) +{ + return EFI_NOT_FOUND; +} diff --git a/RedfishPkg/Library/PlatformHostInterfaceLibNull/BZ2912Platfo= rmHostInterfaceLibNull.inf b/RedfishPkg/Library/PlatformHostInterfaceLibN= ull/BZ2912PlatformHostInterfaceLibNull.inf new file mode 100644 index 00000000000..f1537b5aac6 --- /dev/null +++ b/RedfishPkg/Library/PlatformHostInterfaceLibNull/BZ2912PlatformHostI= nterfaceLibNull.inf @@ -0,0 +1,34 @@ +=EF=BB=BF## @file +# NULL instance of RedfishPlatformHostInterfaceLib +# +# (C) Copyright 2020 Hewlett Packard Enterprise Development LP
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001000b + BASE_NAME =3D RedfishPlatformHostInterfaceLibNull + FILE_GUID =3D 851229BF-4D8B-30F3-DD0D-20AFAF99A77= B + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D RedfishPlatformHostInterfaceLib + +# +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 RISCV64 +# + +[Sources] + BZ2912PlatformHostInterfaceLibNull.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + RedfishPkg/RedfishPkg.dec + +[LibraryClasses] + UefiLib + BaseLib + DebugLib + --=20 2.21.0.windows.1