diff options
author | Abner Chang <abner.chang@hpe.com> | 2020-10-13 09:24:04 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-11-02 05:50:17 +0000 |
commit | adad542ba1003229e75fbf97149a09f8d967e05c (patch) | |
tree | 7910e6f6b2fd1b40e213dafaea1bffec20fc8b68 /RedfishPkg/Library | |
parent | c527aecd480c6fb266496ba67654511dd55ccc70 (diff) | |
download | edk2-adad542ba1003229e75fbf97149a09f8d967e05c.zip edk2-adad542ba1003229e75fbf97149a09f8d967e05c.tar.gz edk2-adad542ba1003229e75fbf97149a09f8d967e05c.tar.bz2 |
RedfishPkg/PlatformHostInterfaceLib: Platform NULL lib
NULL instance of PlatformHostInterfaceLib.
Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Fan Wang <fan.wang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
Diffstat (limited to 'RedfishPkg/Library')
-rw-r--r-- | RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.c | 52 | ||||
-rw-r--r-- | RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.inf | 33 |
2 files changed, 85 insertions, 0 deletions
diff --git a/RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.c b/RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.c new file mode 100644 index 0000000..5c93a00 --- /dev/null +++ b/RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.c @@ -0,0 +1,52 @@ +/** @file
+ NULL instace of RedfishPlatformHostInterfaceLib
+
+ (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+#include <Uefi.h>
+#include <Library/BaseLib.h>
+#include <Library/RedfishHostInterfaceLib.h>
+#include <Library/UefiLib.h>
+
+/**
+ 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_NOT_FOUND No Redfish host interface descriptor provided on this platform.
+
+**/
+EFI_STATUS
+RedfishPlatformHostInterfaceDeviceDescriptor (
+ IN UINT8 *DeviceType,
+ OUT 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_NOT_FOUND No more protocol records.
+
+**/
+EFI_STATUS
+RedfishPlatformHostInterfaceProtocolData (
+ IN OUT 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 0000000..b42e533 --- /dev/null +++ b/RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.inf @@ -0,0 +1,33 @@ +## @file
+# NULL instance of RedfishPlatformHostInterfaceLib
+#
+# (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
+#
+# 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 RISCV64
+#
+
+[Sources]
+ PlatformHostInterfaceLibNull.c
+
+[Packages]
+ MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+ RedfishPkg/RedfishPkg.dec
+
+[LibraryClasses]
+ UefiLib
+ BaseLib
+
|