From nobody Tue Apr 23 19:32:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+66157+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+66157+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=hpe.com ARC-Seal: i=1; a=rsa-sha256; t=1602564774; cv=none; d=zohomail.com; s=zohoarc; b=fui2RqHAFa+1NR8UL0f1Ijq9qJREnydOjFtbhPZpTgR1osrqsNPHrkABxZ0qzSY3Gfe0+5k8HTl18UVeyHXeiLn75w757bmsPKZF1g6y3SkJp+fQPRmyAPBUJmtSOBTzP0lYqvB5UGTRlPFcN5VAWBJe4CBsLh3SDWbtoXIYeR8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602564774; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=kcWJQr6PmDqhiIXAN1Qqsgy8RsiqLLFTr0wRYXpHaFQ=; b=bhuW9pdOvVi1LFqU6eDycjqUiXGXAZN9izEvxFDkA3Yz2H6nDY1DxgpgseDEgj9xB4SyDwyEAoM8T083ODDZNW3S1KQ6YCsnst9ratkKUznuI4SdgCtzdDdhIGkUX3mw2PkEdu6VNYOyfAFiEw88kaIFpPnsdyc6nau2Sd2ZwZI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+66157+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1602564774068153.20077865755025; Mon, 12 Oct 2020 21:52:54 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id ji5aYY1788612xMYo2RlwGVF; Mon, 12 Oct 2020 21:52:53 -0700 X-Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web11.4807.1602564768124363871 for ; Mon, 12 Oct 2020 21:52:48 -0700 X-Received: from pps.filterd (m0150245.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09D4hSnR016329; Tue, 13 Oct 2020 04:52:47 GMT X-Received: from g4t3425.houston.hpe.com (g4t3425.houston.hpe.com [15.241.140.78]) by mx0b-002e3701.pphosted.com with ESMTP id 343fq0a0cv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Oct 2020 04:52:47 +0000 X-Received: from g4t3433.houston.hpecorp.net (g4t3433.houston.hpecorp.net [16.208.49.245]) by g4t3425.houston.hpe.com (Postfix) with ESMTP id 0523C92; Tue, 13 Oct 2020 04:52:46 +0000 (UTC) X-Received: from abner-virtual-machine.asiapacific.hpqcorp.net (abner-virtual-machine.asiapacific.hpqcorp.net [15.119.210.153]) by g4t3433.houston.hpecorp.net (Postfix) with ESMTP id 8F24F46; Tue, 13 Oct 2020 04:52:45 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: Jiaxin Wu , Siyuan Fu , Fan Wang , Jiewen Yao , Nickle Wang Subject: [edk2-devel] [EFI Redfish Host Interface PATCH 3/5] RedfishPkg/PlatformHostInterfaceLib: Platform NULL lib Date: Tue, 13 Oct 2020 12:08:03 +0800 Message-Id: <20201013040805.20523-4-abner.chang@hpe.com> In-Reply-To: <20201013040805.20523-1-abner.chang@hpe.com> References: <20201013040805.20523-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: MPsUsXPhLWTFbTNILRgksjckx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1602564773; bh=y1sIMTvOBsY7xH32lFARGs4Y5tKAyXu1xNyi7bkkgT8=; h=Cc:Date:From:Reply-To:Subject:To; b=wRDHx2NVpnsoq11aeEAmqGknS61B5PghPYlkU93uknXVOh/94jo4rpJpvZERPNDpTgU 0bHhxhuZ7A4AJOt5vgO9KU/Fn8a2OHMMEDounkl3edIwT2V+wB0+gIKJw6RyeIv+KRXqL 80nCja2qEAGpJtoI3S+rtsAp87LH9hJFy4o= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" NULL instance of PlatformHostInterfaceLib. Signed-off-by: Abner Chang Cc: Jiaxin Wu Cc: Siyuan Fu Cc: Fan Wang Cc: Jiewen Yao Cc: Nickle Wang --- .../PlatformHostInterfaceLibNull.c | 53 +++++++++++++++++++ .../PlatformHostInterfaceLibNull.inf | 34 ++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 RedfishPkg/Library/PlatformHostInterfaceLibNull/Platfor= mHostInterfaceLibNull.c create mode 100644 RedfishPkg/Library/PlatformHostInterfaceLibNull/Platfor= mHostInterfaceLibNull.inf diff --git a/RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostIn= terfaceLibNull.c b/RedfishPkg/Library/PlatformHostInterfaceLibNull/Platform= HostInterfaceLibNull.c new file mode 100644 index 0000000000..7653f22d25 --- /dev/null +++ b/RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterface= LibNull.c @@ -0,0 +1,53 @@ +/** @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_DATA= , caller has to free + this memory using FreePool(). + @retval EFI_SUCCESS Device descriptor is returned successfully in De= viceDescriptor. + @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 protocol = record. + Then continuously pass previous ProtocolRecord for retrieving the next P= rotocolRecord. + + @param[in, out] ProtocolRecord Pointer to retrieve the first or the nex= t protocol record. + caller has to free the new protocol reco= rd 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/PlatformHostIn= terfaceLibNull.inf b/RedfishPkg/Library/PlatformHostInterfaceLibNull/Platfo= rmHostInterfaceLibNull.inf new file mode 100644 index 0000000000..bb840ce3cb --- /dev/null +++ b/RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterface= LibNull.inf @@ -0,0 +1,34 @@ +## @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-20AFAF99A77B + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D RedfishPlatformHostInterfaceLib + +# +# VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 +# + +[Sources] + PlatformHostInterfaceLibNull.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + RedfishPkg/RedfishPkg.dec + +[LibraryClasses] + UefiLib + BaseLib + DebugLib + --=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 (#66157): https://edk2.groups.io/g/devel/message/66157 Mute This Topic: https://groups.io/mt/77477504/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-