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.web11.4807.1602564768124363871 for ; Mon, 12 Oct 2020 21:52:48 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=AG80U/Fm; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=055551424a=abner.chang@hpe.com) 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 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=s8GAsr12GG/bjkQNO0d1lGmUhwaNjypV76IaYbh4ZXY=; b=AG80U/Fm8RNYHBtzwtzv5j90aPCSkKNRDd3oL5ubEQZa16TV5o9APhpZySsRvuHZv1Nd qPPN5Hvxey3qat3ZWc6XYk4wV8VlXFED9Y4b3CigcvlbF4JALjpuTolRRA8ibvbdcUor ax9vnuWUPfu+DTCf6+9izfFVTQ8dOAQZUjMHGnF5rr70gKRgS8MMt+1KRvTbJQIWlPQW z6uLFcVmD+sC/JPECnCTM4cS5EFYf1pmIaeQKNvir0wdsBesTz1cjbMDghbmct96/pO3 fl07VE2IlHp7VHBFchSkDVnk9MDwPJHG3+kmg4MDN8dD93GcKkXXyX74WfvhRo+6ZR9v YQ== 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 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) 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: [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> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201013040805.20523-1-abner.chang@hpe.com> References: <20201013040805.20523-1-abner.chang@hpe.com> X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-10-13_01:2020-10-12,2020-10-13 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 impostorscore=0 mlxscore=0 phishscore=0 adultscore=0 spamscore=0 suspectscore=3 malwarescore=0 mlxlogscore=786 clxscore=1015 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010130040 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/PlatformHostInterfaceLibNull.c create mode 100644 RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.inf diff --git a/RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.c b/RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.c new file mode 100644 index 0000000000..7653f22d25 --- /dev/null +++ b/RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.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 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 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 MC_HOST_INTERFACE_PROTOCOL_RECORD **ProtocolRecord, + IN UINT8 IndexOfProtocolData +) +{ + return EFI_NOT_FOUND; +} diff --git a/RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.inf b/RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.inf new file mode 100644 index 0000000000..bb840ce3cb --- /dev/null +++ b/RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.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 = 0x0001000b + BASE_NAME = RedfishPlatformHostInterfaceLibNull + FILE_GUID = 851229BF-4D8B-30F3-DD0D-20AFAF99A77B + MODULE_TYPE = DXE_DRIVER + VERSION_STRING = 1.0 + LIBRARY_CLASS = RedfishPlatformHostInterfaceLib + +# +# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64 +# + +[Sources] + PlatformHostInterfaceLibNull.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + RedfishPkg/RedfishPkg.dec + +[LibraryClasses] + UefiLib + BaseLib + DebugLib + -- 2.17.1