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>
---
.../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..870109e09a
--- /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<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+#ifndef REDFISH_HOST_INTERFACE_LIB_H_
+#define REDFISH_HOST_INTERFACE_LIB_H_
+
+#include <Uefi.h>
+#include <IndustryStandard/RedfishHostInterface.h>
+#include <IndustryStandard/SmBios.h>
+
+#include <Protocol/Smbios.h>
+
+/**
+ 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
+);
+/**
+ 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
+);
+#endif
--
2.17.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66156): https://edk2.groups.io/g/devel/message/66156
Mute This Topic: https://groups.io/mt/77477503/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Hi Abner, I found that the parameter is not defined as it is described in function header. Please check my comment inline below. Thanks, Nickle > -----Original Message----- > From: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com> > Sent: Tuesday, October 13, 2020 12:08 PM > To: devel@edk2.groups.io > Cc: Jiaxin Wu <jiaxin.wu@intel.com>; Siyuan Fu <siyuan.fu@intel.com>; Fan > Wang <fan.wang@intel.com>; Jiewen Yao <jiewen.yao@intel.com>; Wang, > Nickle (HPS SW) <nickle.wang@hpe.com> > Subject: [EFI Redfish Host Interface PATCH 2/5] RedfishPkg/Include: > PlatformHostInterfaceLib header file > > 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> > --- > .../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..870109e09a > --- /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<BR> > + > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > +#ifndef REDFISH_HOST_INTERFACE_LIB_H_ > +#define REDFISH_HOST_INTERFACE_LIB_H_ > + > +#include <Uefi.h> > +#include <IndustryStandard/RedfishHostInterface.h> > +#include <IndustryStandard/SmBios.h> > + > +#include <Protocol/Smbios.h> > + > +/** > + 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 In the function header, they are OUT parameter but they are defined as IN here. > +); > +/** > + 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, This is IN and OUT, right? If not, the function header needs modification. > + IN UINT8 IndexOfProtocolData > +); > +#endif > -- > 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66730): https://edk2.groups.io/g/devel/message/66730 Mute This Topic: https://groups.io/mt/77477503/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2026 Red Hat, Inc.