Toggle navigation
:p
atchew
Login
This is the abstract driver to consume the contents of SMBIOS type 42h provided by PlatformHostInterfaceLib and create SMBIOS type 42 record through EFI SMBIOS protocol. Due to the way firmware to obtain Redfish service host interface information is platform implementation specific and the information could be obtained through the platform proprietary transport to BMC or the out-of-band service, platform integrator has to implement PlatformHostInterfaceLib to provide the Redfish host interface information to EFI Redfish Host Interface DXE driver. EFI Redfish Host Interface DXE Driver doesn't require any UEFI spec changes. This driver is the EDK2 implementation to collaborate with EFI Redfish Discover Driver (UEFI spec 31.1). BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2912 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> Abner Chang (5): RedfishPkg/Include: Definitions of SMBIOS Redfish Host Interface RedfishPkg/Include: PlatformHostInterfaceLib header file RedfishPkg/PlatformHostInterfaceLib: Platform NULL lib RedfishPkg/RedfishHostInterfaceDxe: Create SMBIOS type 42 record RedfishPkg: Add RedfishHostInterfaceDxe to RedfishPkg .../IndustryStandard/RedfishHostInterface.h | 165 ++++++++++++ .../Include/Library/RedfishHostInterfaceLib.h | 52 ++++ .../PlatformHostInterfaceLibNull.c | 53 ++++ .../PlatformHostInterfaceLibNull.inf | 34 +++ .../RedfishHostInterfaceDxe.c | 243 ++++++++++++++++++ .../RedfishHostInterfaceDxe.inf | 50 ++++ RedfishPkg/RedfishPkg.dec | 3 + RedfishPkg/RedfishPkg.dsc | 6 + 8 files changed, 606 insertions(+) create mode 100644 RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h create mode 100644 RedfishPkg/Include/Library/RedfishHostInterfaceLib.h create mode 100644 RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.c create mode 100644 RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.inf create mode 100644 RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c create mode 100644 RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66154): https://edk2.groups.io/g/devel/message/66154 Mute This Topic: https://groups.io/mt/77477500/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Add definitions of SMBIOS Type 42 Host Interface. Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Fan Wang <fan.wang@intel.com> 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> --- .../IndustryStandard/RedfishHostInterface.h | 165 ++++++++++++++++++ RedfishPkg/RedfishPkg.dec | 3 + 2 files changed, 168 insertions(+) create mode 100644 RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h diff --git a/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h b/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h new file mode 100644 index XXXXXXX..XXXXXXX --- /dev/null +++ b/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h @@ -XXX,XX +XXX,XX @@ +/** @file + This file defines the Redfish Interface Specific Data. + + Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> + (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR> + + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef REDFISH_HOST_INTERFACE_ +#define REDFISH_HOST_INTERFACE_ + +#include <Industrystandard/SmBios.h> + +#define REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB 0x02 // We don't support this type of interface. + // Use REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2 instead. +#define REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE 0x03 // We don't support this type of interface. + // Use REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2 instead. +#define REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2 0x04 +#define REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2 0x05 + +#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_UNKNOWN 0x00 +#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_STATIC 0x01 +#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_DHCP 0x02 +#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_AUTO_CONFIGURE 0x03 +#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_HOST_SELECTED 0x04 + +#define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_UNKNOWN 0x00 +#define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP4 0x01 +#define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP6 0x02 + +#pragma pack(1) +/// +/// Structure definitions of Host Interface device type 04h (USB Network Interface V2) +/// +typedef struct { + UINT8 Length; ///< Length of the structure, including Device Type + ///< and Length fields. + UINT16 IdVendor; ///< The Vendor ID of the device, as read from the + ///< idVendor field of the USB descriptor. + UINT16 IdProduct; ///< The Product ID of the device, as read from the + ///< idProduct field of the USB descriptor. + UINT8 SecialNumberStr; ///< The string number for the Serial Number of the + ///< device. The string data is read from the + ///< iSerialNumber.bDescriptorType field of the USB + ///< descriptor, and is converted from Unicode to ASCII + ///< and is NULL terminated. + UINT8 MacAddress [6]; ///< The MAC address of the PCI/PCIe network device. +} USB_INTERFACE_DEVICE_DESCRIPTOR_V2; + +// +// Structure definitions of Host Interface device type 05h (PCI/PCIE V2) +// +typedef struct { + UINT8 Length; ///< Length of the structure, including Device Type and Length fields. + UINT16 VendorId; ///< The Vendor ID of the PCI/PCIe device. + UINT16 DeviceId; ///< The Device ID of the PCI/PCIe device. + UINT16 SubsystemVendorId; ///< The Subsystem Vendor ID of the PCI/PCIe device. + UINT16 SubsystemId; ///< The Subsystem ID of the PCI/PCIe device. + UINT8 MacAddress [6]; ///< The MAC address of the PCI/PCIe network device. + UINT16 SegmemtGroupNumber; ///< The Segment Group Number of the PCI/PCIe. + UINT8 BusNumber; ///< The Bus Number of the PCI/PCIe device. + UINT8 DeviceFunctionNumber; ///< The Device/Function Number of the PCI/PCIe. +} PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2; + +/// +/// Structure definitions of Host Interface device type 80-FFh (OEM) +/// +typedef struct { + UINT32 VendorIana; ///< The IANA code for the vendor (MSB first). + UINT8 OemDefinedData[1]; ///< OEM defined data. +} OEM_DEVICE_DESCRIPTOR; + +/// +/// Interface Specific Data starts at offset 06h of the SMBIOS Type 42 struct. +/// This table defines the Interface Specific data for Interface Type 40h. There +/// are 3 types of Device Descriptor3 defined , however only 1 may be used in +/// specific Tape 42 table. +/// +typedef struct { + UINT8 DeviceType; ///< The Device Type of the interface. + union { + USB_INTERFACE_DEVICE_DESCRIPTOR_V2 UsbDeviceV2; ///< Device type USB V2 device discriptor. + PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2 PciPcieDeviceV2; ///< Device type PCI/PCIe V2 device discriptor. + OEM_DEVICE_DESCRIPTOR OemDevice; ///< OEM type device discriptor. + } DeviceDescriptor; /// Device descriptor data formated based on Device Type. + +} REDFISH_INTERFACE_DATA; + +// +// the protocol-specific data for the "Redfish Over IP" protocol +// +typedef struct { + EFI_GUID ServiceUuid; //same as Redfish Service UUID in Redfish Service Root resource + + // + // Unknown=00h, + // Static=01h, + // DHCP=02h, + // AutoConfigure=03h, + // HostSelected=04h, + // other values reserved + // + UINT8 HostIpAssignmentType; + + // + // Unknown=00h, + // Ipv4=01h, + // Ipv6=02h, + // other values reserved + // + UINT8 HostIpAddressFormat; + + // + // Used for Static and AutoConfigure. + // For IPV4, use the first 4 Bytes and zero fill the remaining bytes. + // + UINT8 HostIpAddress[16]; + + // + // Used for Static and AutoConfigure. + // For IPV4, use the first 4 Bytes and zero fill the remaining bytes. + // + UINT8 HostIpMask[16]; + + // + // Unknown=00h, + // Static=01h, + // DHCP=02h, + // AutoConfigure=03h, + // HostSelected=04h, + // other values reserved + // + UINT8 RedfishServiceIpDiscoveryType; + + // + // Unknown=00h, + // Ipv4=01h, + // Ipv6=02h, + // other values reserved + // + UINT8 RedfishServiceIpAddressFormat; + + // + // Used for Static and AutoConfigure. + // For IPV4, use the first 4 Bytes and zero fill the remaining bytes. + // + UINT8 RedfishServiceIpAddress[16]; + + // + // Used for Static and AutoConfigure. + // For IPV4, use the first 4 Bytes and zero fill the remaining bytes. + // + UINT8 RedfishServiceIpMask[16]; + + UINT16 RedfishServiceIpPort; // Used for Static and AutoConfigure. + UINT32 RedfishServiceVlanId; // Used for Static and AutoConfigure. + UINT8 RedfishServiceHostnameLength; // length of the following hostname string + UINT8 RedfishServiceHostname[1]; // hostname of Redfish Service +} REDFISH_OVER_IP_PROTOCOL_DATA; + +#pragma pack() + +#endif + diff --git a/RedfishPkg/RedfishPkg.dec b/RedfishPkg/RedfishPkg.dec index XXXXXXX..XXXXXXX 100644 --- a/RedfishPkg/RedfishPkg.dec +++ b/RedfishPkg/RedfishPkg.dec @@ -XXX,XX +XXX,XX @@ PACKAGE_GUID = c432b76e-5232-11e7-9010-005056c00008 PACKAGE_VERSION = 1.0 +[Includes] + Include + [Guids] gEfiRedfishPkgTokenSpaceGuid = { 0x4fdbccb7, 0xe829, 0x4b4c, { 0x88, 0x87, 0xb2, 0x3f, 0xd7, 0x25, 0x4b, 0x85 }} -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66155): https://edk2.groups.io/g/devel/message/66155 Mute This Topic: https://groups.io/mt/77477501/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
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 XXXXXXX..XXXXXXX --- /dev/null +++ b/RedfishPkg/Include/Library/RedfishHostInterfaceLib.h @@ -XXX,XX +XXX,XX @@ +/** @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] -=-=-=-=-=-=-=-=-=-=-=-
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> --- .../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 XXXXXXX..XXXXXXX --- /dev/null +++ b/RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.c @@ -XXX,XX +XXX,XX @@ +/** @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[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 XXXXXXX..XXXXXXX --- /dev/null +++ b/RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.inf @@ -XXX,XX +XXX,XX @@ +## @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 +# + +[Sources] + PlatformHostInterfaceLibNull.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + RedfishPkg/RedfishPkg.dec + +[LibraryClasses] + UefiLib + BaseLib + DebugLib + -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- 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] -=-=-=-=-=-=-=-=-=-=-=-
This is the abstract driver to consume the contents of SMBIOS type 42h device descriptor and protocol type data which provided by PlatformHostInterfaceLib, and create SMBIOS type 42 record through EFI SMBIOS protocol. 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> --- .../RedfishHostInterfaceDxe.c | 243 ++++++++++++++++++ .../RedfishHostInterfaceDxe.inf | 50 ++++ 2 files changed, 293 insertions(+) create mode 100644 RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c create mode 100644 RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf diff --git a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c new file mode 100644 index XXXXXXX..XXXXXXX --- /dev/null +++ b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c @@ -XXX,XX +XXX,XX @@ +/** @file + RedfishHostInterfaceDxe builds up SMBIOS Type 42h host interface + record for Redfish service host interface using EFI MBIOS Protocol. + RedfishHostInterfacePlatformLib is the platform-level library which + provides the content of Redfish host interface type 42h record. + + Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> + (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/BaseMemoryLib.h> +#include <Library/DebugLib.h> +#include <Library/MemoryAllocationLib.h> +#include <Library/PrintLib.h> +#include <Library/RedfishHostInterfaceLib.h> +#include <Library/UefiLib.h> +#include <Library/UefiBootServicesTableLib.h> +#include <Library/UefiRuntimeServicesTableLib.h> + +/** + Create SMBIOS type 42 record for Redfish host interface. + + @retval EFI_SUCESS SMBIOS type 42 record is created. + @retval Others Fail to create SMBIOS 42 record. + +**/ +EFI_STATUS +RedfishCreateSmbiosTable42 ( + VOID + ) +{ + REDFISH_INTERFACE_DATA *DeviceDescriptor; + UINT8 DeviceDataLength; + UINT8 DeviceType; + EFI_STATUS Status; + MC_HOST_INTERFACE_PROTOCOL_RECORD *ProtocolRecord; + VOID *ProtocolRecords; + VOID *NewProtocolRecords; + UINT8 ProtocolCount; + UINT8 CurrentProtocolsDataLength; + UINT8 NewProtocolsDataLength; + UINT8 ProtocolDataSize; + SMBIOS_TABLE_TYPE42 *Type42Record; + EFI_SMBIOS_PROTOCOL *Smbios; + EFI_SMBIOS_HANDLE MemArrayMappedAddrSmbiosHandle; + + // + // Get platform Redfish host interface device type descriptor data. + // + Status = RedfishPlatformHostInterfaceDeviceDescriptor (&DeviceType, &DeviceDescriptor); + if (EFI_ERROR (Status)) { + if (Status == EFI_NOT_FOUND) { + DEBUG ((DEBUG_ERROR, "%a: No Redfish host interface descriptor is provided on this platform.", __FUNCTION__)); + return EFI_NOT_FOUND; + } + DEBUG((DEBUG_ERROR, "%a: Fail to get device descriptor, %r.", __FUNCTION__, Status)); + return Status; + } + if (DeviceType != REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2 && + DeviceType != REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2 + ) { + DEBUG ((DEBUG_ERROR, "%a: Only support either protocol type 04h or 05h as Redfish host interface.", __FUNCTION__)); + return EFI_UNSUPPORTED; + } + if (DeviceType == REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) { + DeviceDataLength = DeviceDescriptor->DeviceDescriptor.PciPcieDeviceV2.Length; + } else { + DeviceDataLength = DeviceDescriptor->DeviceDescriptor.UsbDeviceV2.Length; + } + // + // Loop to get platform Redfish host interface protocol type data. + // + ProtocolRecord = NULL; + ProtocolRecords = NULL; + NewProtocolRecords = NULL; + Type42Record = NULL; + ProtocolCount = 0; + CurrentProtocolsDataLength = 0; + NewProtocolsDataLength = 0; + while (TRUE) { + Status = RedfishPlatformHostInterfaceProtocolData (&ProtocolRecord, ProtocolCount); + if (Status == EFI_NOT_FOUND) { + break; + } + if (EFI_ERROR(Status)) { + DEBUG ((DEBUG_ERROR, "%a: Fail to get Redfish host interafce protocol type data.", __FUNCTION__)); + if (ProtocolRecords != NULL) { + FreePool (ProtocolRecords); + } + if (ProtocolRecord != NULL) { + FreePool (ProtocolRecord); + } + return Status; + } + ProtocolDataSize = sizeof (MC_HOST_INTERFACE_PROTOCOL_RECORD) - sizeof(ProtocolRecord->ProtocolTypeData) + ProtocolRecord->ProtocolTypeDataLen; + NewProtocolsDataLength += ProtocolDataSize; + if (ProtocolRecords == NULL) { + ProtocolRecords = AllocateZeroPool (NewProtocolsDataLength); + if (ProtocolRecords == NULL) { + FreePool (ProtocolRecord); + return EFI_OUT_OF_RESOURCES; + } + CopyMem ((VOID *)ProtocolRecords, (VOID *)ProtocolRecord, ProtocolDataSize); + NewProtocolRecords = ProtocolRecords; + } else { + NewProtocolRecords = ReallocatePool(CurrentProtocolsDataLength, NewProtocolsDataLength, (VOID *)ProtocolRecords); + if (NewProtocolRecords == NULL) { + DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for Redfish host interface protocol data.")); + FreePool (ProtocolRecords); + FreePool (ProtocolRecord); + return EFI_OUT_OF_RESOURCES; + } + CopyMem ( + (VOID *)((UINT8 *)NewProtocolRecords + CurrentProtocolsDataLength), + (VOID *)ProtocolRecord, + ProtocolDataSize + ); + } + FreePool (ProtocolRecord); + CurrentProtocolsDataLength = NewProtocolsDataLength; + ProtocolCount ++; + }; + if (ProtocolCount == 0) { + goto ON_EXIT; + } + // + // Construct SMBIOS Type 42h for Redfish host inteface. + // + // SMBIOS type 42 Record for Redfish Interface + // 00h Type BYTE 42 Management Controller Host Interface structure indicator + // 01h Length BYTE Varies Length of the structure, a minimum of 09h + // 02h Handle WORD Varies + // 04h Interface Type BYTE Varies Management Controller Interface Type. + // 05h Interface Specific Data Length (n) + // 06h Interface Specific data + // 06h+n number of protocols defined for the host interface (typically 1) + // 07h+n Include a Protocol Record for each protocol supported. + // + Type42Record = (SMBIOS_TABLE_TYPE42 *) AllocateZeroPool ( + sizeof (SMBIOS_TABLE_TYPE42) - 4 + + DeviceDataLength + + 1 /// For Protocol Record Count + + CurrentProtocolsDataLength + + 2 /// Double NULL terminator/ + ); + if (Type42Record == NULL) { + Status = EFI_OUT_OF_RESOURCES; + goto ON_EXIT; + } + + Type42Record->Hdr.Type = EFI_SMBIOS_TYPE_MANAGEMENT_CONTROLLER_HOST_INTERFACE; + Type42Record->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE42) - 4 + + DeviceDataLength + + 1 + + CurrentProtocolsDataLength; + Type42Record->Hdr.Handle = 0; + Type42Record->InterfaceType = MCHostInterfaceTypeNetworkHostInterface; // Network Host Interface + + // + // Fill in InterfaceTypeSpecificDataLength field + // + Type42Record->InterfaceTypeSpecificDataLength = DeviceDataLength; + + // + // Fill in InterfaceTypeSpecificData field + // + CopyMem (Type42Record->InterfaceTypeSpecificData, DeviceDescriptor, DeviceDataLength); + FreePool (DeviceDescriptor); + DeviceDescriptor = NULL; + + // + // Fill in InterfaceTypeSpecificData Protocol Count field + // + *(Type42Record->InterfaceTypeSpecificData + DeviceDataLength) = ProtocolCount; + + // + // Fill in Redfish Protocol Data + // + CopyMem ( + Type42Record->InterfaceTypeSpecificData + DeviceDataLength + 1, + NewProtocolRecords, + CurrentProtocolsDataLength + ); + + // + // 5. Add Redfish interface data record to SMBIOS table 42 + // + Status = gBS->LocateProtocol (&gEfiSmbiosProtocolGuid, NULL, (VOID**)&Smbios); + if (EFI_ERROR (Status)) { + goto ON_EXIT; + } + + MemArrayMappedAddrSmbiosHandle = SMBIOS_HANDLE_PI_RESERVED; + Status = Smbios->Add ( + Smbios, + NULL, + &MemArrayMappedAddrSmbiosHandle, + (EFI_SMBIOS_TABLE_HEADER*) Type42Record + ); + DEBUG ((DEBUG_INFO, "RedfishPlatformDxe: Smbios->Add() - %r\n", Status)); + if (EFI_ERROR (Status)) { + goto ON_EXIT; + } + Status = EFI_SUCCESS; + +ON_EXIT: + if (DeviceDescriptor != NULL) { + FreePool (DeviceDescriptor); + } + if (NewProtocolRecords != NULL) { + FreePool (NewProtocolRecords); + } + if (Type42Record != NULL) { + FreePool (Type42Record); + } + return Status; +} + +/** + Main entry for this driver. + + @param ImageHandle Image handle this driver. + @param SystemTable Pointer to SystemTable. + + @retval EFI_SUCESS This function always complete successfully. + +**/ +EFI_STATUS +EFIAPI +RedfishHostInterfaceDxeEntryPoint ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + // + // Create SMBIOS type 42 record. + // + return RedfishCreateSmbiosTable42 (); +} diff --git a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf new file mode 100644 index XXXXXXX..XXXXXXX --- /dev/null +++ b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf @@ -XXX,XX +XXX,XX @@ +## @file +# RedfishHostInterfaceDxe builds up SMBIOS Type 42h host interface +# record for Redfish service host interface using SMBIOS Protocol. +# RedfishHostInterfacePlatformLib is the platform-level library which +# provides the content of Redfish host interface type 42h record. +# +# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> +# (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR> + +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION = 0x0001000b + BASE_NAME = RedfishHostInterfaceDxe + FILE_GUID = 592626DA-4A1E-8B39-28BA-FEAD92C4A0A4 + MODULE_TYPE = DXE_DRIVER + VERSION_STRING = 1.0 + ENTRY_POINT = RedfishHostInterfaceDxeEntryPoint + +# +# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64 RISCV64 +# + +[Sources] + RedfishHostInterfaceDxe.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + RedfishPkg/RedfishPkg.dec + +[LibraryClasses] + BaseLib + BaseMemoryLib + DebugLib + MemoryAllocationLib + PrintLib + RedfishPlatformHostInterfaceLib + UefiBootServicesTableLib + UefiDriverEntryPoint + UefiLib + +[Protocols] + gEfiSmbiosProtocolGuid ## TO_START + +[Depex] + gEfiSmbiosProtocolGuid + -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66159): https://edk2.groups.io/g/devel/message/66159 Mute This Topic: https://groups.io/mt/77477512/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Add RedfishHostInterfaceDxe and PlatformHostInterfaceLibNull to Redfish package. 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> --- RedfishPkg/RedfishPkg.dsc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/RedfishPkg/RedfishPkg.dsc b/RedfishPkg/RedfishPkg.dsc index XXXXXXX..XXXXXXX 100644 --- a/RedfishPkg/RedfishPkg.dsc +++ b/RedfishPkg/RedfishPkg.dsc @@ -XXX,XX +XXX,XX @@ DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf + RedfishPlatformHostInterfaceLib|RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.inf + +[Components] + RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.inf + + RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66158): https://edk2.groups.io/g/devel/message/66158 Mute This Topic: https://groups.io/mt/77477505/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
In v2: - Address comments given by Nickle v1 - Add accepted dependency of RedfishPkg in RedfishPkg CI yaml file for CI test. - Fix some CI test errors. This is the abstract driver to consume the contents of SMBIOS type 42h provided by PlatformHostInterfaceLib and create SMBIOS type 42 record through EFI SMBIOS protocol. Due to the way firmware to obtain Redfish service host interface information is platform implementation specific and the information could be obtained through the platform proprietary transport to BMC or the out-of-band service, platform integrator has to implement PlatformHostInterfaceLib to provide the Redfish host interface information to EFI Redfish Host Interface DXE driver. EFI Redfish Host Interface DXE Driver doesn't require any UEFI spec changes. This driver is the EDK2 implementation to collaborate with EFI Redfish Discover Driver (UEFI spec 31.1). BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2912 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> Abner Chang (6): RedfishPkg/Include: Definitions of SMBIOS Redfish Host Interface RedfishPkg/Include: PlatformHostInterfaceLib header file RedfishPkg/PlatformHostInterfaceLib: Platform NULL lib RedfishPkg/RedfishHostInterfaceDxe: Create SMBIOS type 42 record RedfishPkg: Add RedfishHostInterfaceDxe to RedfishPkg RedfishPkg: Changes on RedfishPkg for CI test .../IndustryStandard/RedfishHostInterface.h | 169 ++++++++++++ .../Include/Library/RedfishHostInterfaceLib.h | 52 ++++ .../PlatformHostInterfaceLibNull.c | 52 ++++ .../PlatformHostInterfaceLibNull.inf | 33 +++ .../RedfishHostInterfaceDxe.c | 243 ++++++++++++++++++ .../RedfishHostInterfaceDxe.inf | 50 ++++ RedfishPkg/RedfishPkg.ci.yaml | 3 +- RedfishPkg/RedfishPkg.dec | 5 + RedfishPkg/RedfishPkg.dsc | 14 + 9 files changed, 620 insertions(+), 1 deletion(-) create mode 100644 RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h create mode 100644 RedfishPkg/Include/Library/RedfishHostInterfaceLib.h create mode 100644 RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.c create mode 100644 RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.inf create mode 100644 RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c create mode 100644 RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66812): https://edk2.groups.io/g/devel/message/66812 Mute This Topic: https://groups.io/mt/77909061/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Add definitions of SMBIOS Type 42 Host Interface. Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Signed-off-by: Siyuan Fu <siyuan.fu@intel.com> Signed-off-by: Fan Wang <fan.wang@intel.com> 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> --- .../IndustryStandard/RedfishHostInterface.h | 169 ++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h diff --git a/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h b/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h new file mode 100644 index XXXXXXX..XXXXXXX --- /dev/null +++ b/RedfishPkg/Include/IndustryStandard/RedfishHostInterface.h @@ -XXX,XX +XXX,XX @@ +/** @file + This file defines the Redfish Interface Specific Data. + + Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> + (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR> + + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef REDFISH_HOST_INTERFACE_ +#define REDFISH_HOST_INTERFACE_ + +#include <IndustryStandard/SmBios.h> + +#define REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB 0x02 // We don't support this type of interface. + // Use REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2 instead. +#define REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE 0x03 // We don't support this type of interface. + // Use REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2 instead. +#define REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2 0x04 +#define REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2 0x05 + +#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_UNKNOWN 0x00 +#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_STATIC 0x01 +#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_DHCP 0x02 +#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_AUTO_CONFIGURE 0x03 +#define REDFISH_HOST_INTERFACE_HOST_IP_ASSIGNMENT_TYPE_HOST_SELECTED 0x04 + +#define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_UNKNOWN 0x00 +#define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP4 0x01 +#define REDFISH_HOST_INTERFACE_HOST_IP_ADDRESS_FORMAT_IP6 0x02 + +#pragma pack(1) +/// +/// Structure definitions of Host Interface device type 04h (USB Network Interface V2) +/// +typedef struct { + UINT8 Length; ///< Length of the structure, including Device Type + ///< and Length fields. + UINT16 IdVendor; ///< The Vendor ID of the device, as read from the + ///< idVendor field of the USB descriptor. + UINT16 IdProduct; ///< The Product ID of the device, as read from the + ///< idProduct field of the USB descriptor. + UINT8 SecialNumberStr; ///< The string number for the Serial Number of the + ///< device. The string data is read from the + ///< iSerialNumber.bDescriptorType field of the USB + ///< descriptor, and is converted from Unicode to ASCII + ///< and is NULL terminated. + UINT8 MacAddress [6]; ///< The MAC address of the PCI/PCIe network device. +} USB_INTERFACE_DEVICE_DESCRIPTOR_V2; + +// +// Structure definitions of Host Interface device type 05h (PCI/PCIE V2) +// +typedef struct { + UINT8 Length; ///< Length of the structure, including Device Type and Length fields. + UINT16 VendorId; ///< The Vendor ID of the PCI/PCIe device. + UINT16 DeviceId; ///< The Device ID of the PCI/PCIe device. + UINT16 SubsystemVendorId; ///< The Subsystem Vendor ID of the PCI/PCIe device. + UINT16 SubsystemId; ///< The Subsystem ID of the PCI/PCIe device. + UINT8 MacAddress [6]; ///< The MAC address of the PCI/PCIe network device. + UINT16 SegmemtGroupNumber; ///< The Segment Group Number of the PCI/PCIe. + UINT8 BusNumber; ///< The Bus Number of the PCI/PCIe device. + UINT8 DeviceFunctionNumber; ///< The Device/Function Number of the PCI/PCIe. +} PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2; + +/// +/// Structure definitions of Host Interface device type 80-FFh (OEM) +/// +typedef struct { + UINT32 VendorIana; ///< The IANA code for the vendor (MSB first). + UINT8 OemDefinedData[1]; ///< OEM defined data. +} OEM_DEVICE_DESCRIPTOR; + +/// +/// Define union for the Host Interface Device Descriptor +/// +typedef union { + USB_INTERFACE_DEVICE_DESCRIPTOR_V2 UsbDeviceV2; ///< Device type USB V2 device discriptor. + PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2 PciPcieDeviceV2; ///< Device type PCI/PCIe V2 device discriptor. + OEM_DEVICE_DESCRIPTOR OemDevice; ///< OEM type device discriptor. +} DEVICE_DESCRITOR; /// Device descriptor data formated based on Device Type. + +/// +/// Interface Specific Data starts at offset 06h of the SMBIOS Type 42 struct. +/// This table defines the Interface Specific data for Interface Type 40h. There +/// are 3 types of Device Descriptor3 defined , however only 1 may be used in +/// specific Tape 42 table. +/// +typedef struct { + UINT8 DeviceType; ///< The Device Type of the interface. + DEVICE_DESCRITOR DeviceDescriptor; ///< The Device descriptor. +} REDFISH_INTERFACE_DATA; + +// +// the protocol-specific data for the "Redfish Over IP" protocol +// +typedef struct { + EFI_GUID ServiceUuid; //same as Redfish Service UUID in Redfish Service Root resource + + // + // Unknown=00h, + // Static=01h, + // DHCP=02h, + // AutoConfigure=03h, + // HostSelected=04h, + // other values reserved + // + UINT8 HostIpAssignmentType; + + // + // Unknown=00h, + // Ipv4=01h, + // Ipv6=02h, + // other values reserved + // + UINT8 HostIpAddressFormat; + + // + // Used for Static and AutoConfigure. + // For IPV4, use the first 4 Bytes and zero fill the remaining bytes. + // + UINT8 HostIpAddress[16]; + + // + // Used for Static and AutoConfigure. + // For IPV4, use the first 4 Bytes and zero fill the remaining bytes. + // + UINT8 HostIpMask[16]; + + // + // Unknown=00h, + // Static=01h, + // DHCP=02h, + // AutoConfigure=03h, + // HostSelected=04h, + // other values reserved + // + UINT8 RedfishServiceIpDiscoveryType; + + // + // Unknown=00h, + // Ipv4=01h, + // Ipv6=02h, + // other values reserved + // + UINT8 RedfishServiceIpAddressFormat; + + // + // Used for Static and AutoConfigure. + // For IPV4, use the first 4 Bytes and zero fill the remaining bytes. + // + UINT8 RedfishServiceIpAddress[16]; + + // + // Used for Static and AutoConfigure. + // For IPV4, use the first 4 Bytes and zero fill the remaining bytes. + // + UINT8 RedfishServiceIpMask[16]; + + UINT16 RedfishServiceIpPort; // Used for Static and AutoConfigure. + UINT32 RedfishServiceVlanId; // Used for Static and AutoConfigure. + UINT8 RedfishServiceHostnameLength; // length of the following hostname string + UINT8 RedfishServiceHostname[1]; // hostname of Redfish Service +} REDFISH_OVER_IP_PROTOCOL_DATA; + +#pragma pack() + +#endif + -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66813): https://edk2.groups.io/g/devel/message/66813 Mute This Topic: https://groups.io/mt/77909062/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
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 XXXXXXX..XXXXXXX --- /dev/null +++ b/RedfishPkg/Include/Library/RedfishHostInterfaceLib.h @@ -XXX,XX +XXX,XX @@ +/** @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[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_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, + OUT 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 OUT 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 (#66814): https://edk2.groups.io/g/devel/message/66814 Mute This Topic: https://groups.io/mt/77909063/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
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> --- .../PlatformHostInterfaceLibNull.c | 52 +++++++++++++++++++ .../PlatformHostInterfaceLibNull.inf | 33 ++++++++++++ 2 files changed, 85 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 XXXXXXX..XXXXXXX --- /dev/null +++ b/RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.c @@ -XXX,XX +XXX,XX @@ +/** @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 XXXXXXX..XXXXXXX --- /dev/null +++ b/RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.inf @@ -XXX,XX +XXX,XX @@ +## @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 + -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66815): https://edk2.groups.io/g/devel/message/66815 Mute This Topic: https://groups.io/mt/77909064/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
This is the abstract driver to consume the contents of SMBIOS type 42h device descriptor and protocol type data which provided by PlatformHostInterfaceLib, and create SMBIOS type 42 record through EFI SMBIOS protocol. 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> --- .../RedfishHostInterfaceDxe.c | 243 ++++++++++++++++++ .../RedfishHostInterfaceDxe.inf | 50 ++++ 2 files changed, 293 insertions(+) create mode 100644 RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c create mode 100644 RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf diff --git a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c new file mode 100644 index XXXXXXX..XXXXXXX --- /dev/null +++ b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c @@ -XXX,XX +XXX,XX @@ +/** @file + RedfishHostInterfaceDxe builds up SMBIOS Type 42h host interface + record for Redfish service host interface using EFI MBIOS Protocol. + RedfishHostInterfacePlatformLib is the platform-level library which + provides the content of Redfish host interface type 42h record. + + Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> + (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/BaseMemoryLib.h> +#include <Library/DebugLib.h> +#include <Library/MemoryAllocationLib.h> +#include <Library/PrintLib.h> +#include <Library/RedfishHostInterfaceLib.h> +#include <Library/UefiLib.h> +#include <Library/UefiBootServicesTableLib.h> +#include <Library/UefiRuntimeServicesTableLib.h> + +/** + Create SMBIOS type 42 record for Redfish host interface. + + @retval EFI_SUCESS SMBIOS type 42 record is created. + @retval Others Fail to create SMBIOS 42 record. + +**/ +EFI_STATUS +RedfishCreateSmbiosTable42 ( + VOID + ) +{ + REDFISH_INTERFACE_DATA *DeviceDescriptor; + UINT8 DeviceDataLength; + UINT8 DeviceType; + EFI_STATUS Status; + MC_HOST_INTERFACE_PROTOCOL_RECORD *ProtocolRecord; + VOID *ProtocolRecords; + VOID *NewProtocolRecords; + UINT8 ProtocolCount; + UINT8 CurrentProtocolsDataLength; + UINT8 NewProtocolsDataLength; + UINT8 ProtocolDataSize; + SMBIOS_TABLE_TYPE42 *Type42Record; + EFI_SMBIOS_PROTOCOL *Smbios; + EFI_SMBIOS_HANDLE MemArrayMappedAddrSmbiosHandle; + + // + // Get platform Redfish host interface device type descriptor data. + // + Status = RedfishPlatformHostInterfaceDeviceDescriptor (&DeviceType, &DeviceDescriptor); + if (EFI_ERROR (Status)) { + if (Status == EFI_NOT_FOUND) { + DEBUG ((DEBUG_ERROR, "%a: No Redfish host interface descriptor is provided on this platform.", __FUNCTION__)); + return EFI_NOT_FOUND; + } + DEBUG((DEBUG_ERROR, "%a: Fail to get device descriptor, %r.", __FUNCTION__, Status)); + return Status; + } + if (DeviceType != REDFISH_HOST_INTERFACE_DEVICE_TYPE_USB_V2 && + DeviceType != REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2 + ) { + DEBUG ((DEBUG_ERROR, "%a: Only support either protocol type 04h or 05h as Redfish host interface.", __FUNCTION__)); + return EFI_UNSUPPORTED; + } + if (DeviceType == REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) { + DeviceDataLength = DeviceDescriptor->DeviceDescriptor.PciPcieDeviceV2.Length; + } else { + DeviceDataLength = DeviceDescriptor->DeviceDescriptor.UsbDeviceV2.Length; + } + // + // Loop to get platform Redfish host interface protocol type data. + // + ProtocolRecord = NULL; + ProtocolRecords = NULL; + NewProtocolRecords = NULL; + Type42Record = NULL; + ProtocolCount = 0; + CurrentProtocolsDataLength = 0; + NewProtocolsDataLength = 0; + while (TRUE) { + Status = RedfishPlatformHostInterfaceProtocolData (&ProtocolRecord, ProtocolCount); + if (Status == EFI_NOT_FOUND) { + break; + } + if (EFI_ERROR(Status)) { + DEBUG ((DEBUG_ERROR, "%a: Fail to get Redfish host interafce protocol type data.", __FUNCTION__)); + if (ProtocolRecords != NULL) { + FreePool (ProtocolRecords); + } + if (ProtocolRecord != NULL) { + FreePool (ProtocolRecord); + } + return Status; + } + ProtocolDataSize = sizeof (MC_HOST_INTERFACE_PROTOCOL_RECORD) - sizeof(ProtocolRecord->ProtocolTypeData) + ProtocolRecord->ProtocolTypeDataLen; + NewProtocolsDataLength += ProtocolDataSize; + if (ProtocolRecords == NULL) { + ProtocolRecords = AllocateZeroPool (NewProtocolsDataLength); + if (ProtocolRecords == NULL) { + FreePool (ProtocolRecord); + return EFI_OUT_OF_RESOURCES; + } + CopyMem ((VOID *)ProtocolRecords, (VOID *)ProtocolRecord, ProtocolDataSize); + NewProtocolRecords = ProtocolRecords; + } else { + NewProtocolRecords = ReallocatePool(CurrentProtocolsDataLength, NewProtocolsDataLength, (VOID *)ProtocolRecords); + if (NewProtocolRecords == NULL) { + DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for Redfish host interface protocol data.")); + FreePool (ProtocolRecords); + FreePool (ProtocolRecord); + return EFI_OUT_OF_RESOURCES; + } + CopyMem ( + (VOID *)((UINT8 *)NewProtocolRecords + CurrentProtocolsDataLength), + (VOID *)ProtocolRecord, + ProtocolDataSize + ); + } + FreePool (ProtocolRecord); + CurrentProtocolsDataLength = NewProtocolsDataLength; + ProtocolCount ++; + }; + if (ProtocolCount == 0) { + goto ON_EXIT; + } + // + // Construct SMBIOS Type 42h for Redfish host inteface. + // + // SMBIOS type 42 Record for Redfish Interface + // 00h Type BYTE 42 Management Controller Host Interface structure indicator + // 01h Length BYTE Varies Length of the structure, a minimum of 09h + // 02h Handle WORD Varies + // 04h Interface Type BYTE Varies Management Controller Interface Type. + // 05h Interface Specific Data Length (n) + // 06h Interface Specific data + // 06h+n number of protocols defined for the host interface (typically 1) + // 07h+n Include a Protocol Record for each protocol supported. + // + Type42Record = (SMBIOS_TABLE_TYPE42 *) AllocateZeroPool ( + sizeof (SMBIOS_TABLE_TYPE42) - 4 + + DeviceDataLength + + 1 /// For Protocol Record Count + + CurrentProtocolsDataLength + + 2 /// Double NULL terminator/ + ); + if (Type42Record == NULL) { + Status = EFI_OUT_OF_RESOURCES; + goto ON_EXIT; + } + + Type42Record->Hdr.Type = EFI_SMBIOS_TYPE_MANAGEMENT_CONTROLLER_HOST_INTERFACE; + Type42Record->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE42) - 4 + + DeviceDataLength + + 1 + + CurrentProtocolsDataLength; + Type42Record->Hdr.Handle = 0; + Type42Record->InterfaceType = MCHostInterfaceTypeNetworkHostInterface; // Network Host Interface + + // + // Fill in InterfaceTypeSpecificDataLength field + // + Type42Record->InterfaceTypeSpecificDataLength = DeviceDataLength; + + // + // Fill in InterfaceTypeSpecificData field + // + CopyMem (Type42Record->InterfaceTypeSpecificData, DeviceDescriptor, DeviceDataLength); + FreePool (DeviceDescriptor); + DeviceDescriptor = NULL; + + // + // Fill in InterfaceTypeSpecificData Protocol Count field + // + *(Type42Record->InterfaceTypeSpecificData + DeviceDataLength) = ProtocolCount; + + // + // Fill in Redfish Protocol Data + // + CopyMem ( + Type42Record->InterfaceTypeSpecificData + DeviceDataLength + 1, + NewProtocolRecords, + CurrentProtocolsDataLength + ); + + // + // 5. Add Redfish interface data record to SMBIOS table 42 + // + Status = gBS->LocateProtocol (&gEfiSmbiosProtocolGuid, NULL, (VOID**)&Smbios); + if (EFI_ERROR (Status)) { + goto ON_EXIT; + } + + MemArrayMappedAddrSmbiosHandle = SMBIOS_HANDLE_PI_RESERVED; + Status = Smbios->Add ( + Smbios, + NULL, + &MemArrayMappedAddrSmbiosHandle, + (EFI_SMBIOS_TABLE_HEADER*) Type42Record + ); + DEBUG ((DEBUG_INFO, "RedfishPlatformDxe: Smbios->Add() - %r\n", Status)); + if (EFI_ERROR (Status)) { + goto ON_EXIT; + } + Status = EFI_SUCCESS; + +ON_EXIT: + if (DeviceDescriptor != NULL) { + FreePool (DeviceDescriptor); + } + if (NewProtocolRecords != NULL) { + FreePool (NewProtocolRecords); + } + if (Type42Record != NULL) { + FreePool (Type42Record); + } + return Status; +} + +/** + Main entry for this driver. + + @param ImageHandle Image handle this driver. + @param SystemTable Pointer to SystemTable. + + @retval EFI_SUCESS This function always complete successfully. + +**/ +EFI_STATUS +EFIAPI +RedfishHostInterfaceDxeEntryPoint ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + // + // Create SMBIOS type 42 record. + // + return RedfishCreateSmbiosTable42 (); +} diff --git a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf new file mode 100644 index XXXXXXX..XXXXXXX --- /dev/null +++ b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf @@ -XXX,XX +XXX,XX @@ +## @file +# RedfishHostInterfaceDxe builds up SMBIOS Type 42h host interface +# record for Redfish service host interface using SMBIOS Protocol. +# RedfishHostInterfacePlatformLib is the platform-level library which +# provides the content of Redfish host interface type 42h record. +# +# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> +# (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR> +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION = 0x0001000b + BASE_NAME = RedfishHostInterfaceDxe + FILE_GUID = 592626DA-4A1E-8B39-28BA-FEAD92C4A0A4 + MODULE_TYPE = DXE_DRIVER + VERSION_STRING = 1.0 + ENTRY_POINT = RedfishHostInterfaceDxeEntryPoint + +# +# VALID_ARCHITECTURES = IA32 X64 ARM AARCH64 RISCV64 +# + +[Sources] + RedfishHostInterfaceDxe.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + RedfishPkg/RedfishPkg.dec + +[LibraryClasses] + BaseLib + BaseMemoryLib + DebugLib + MemoryAllocationLib + PrintLib + RedfishPlatformHostInterfaceLib + UefiBootServicesTableLib + UefiDriverEntryPoint + UefiLib + +[Protocols] + gEfiSmbiosProtocolGuid ## TO_START + +[Depex] + gEfiSmbiosProtocolGuid + -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66816): https://edk2.groups.io/g/devel/message/66816 Mute This Topic: https://groups.io/mt/77909065/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Add RedfishHostInterfaceDxe and PlatformHostInterfaceLibNull to Redfish package. 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> --- RedfishPkg/RedfishPkg.dec | 5 +++++ RedfishPkg/RedfishPkg.dsc | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/RedfishPkg/RedfishPkg.dec b/RedfishPkg/RedfishPkg.dec index XXXXXXX..XXXXXXX 100644 --- a/RedfishPkg/RedfishPkg.dec +++ b/RedfishPkg/RedfishPkg.dec @@ -XXX,XX +XXX,XX @@ [Includes] Include +[LibraryClasses] + ## @libraryclass Platform Redfish Host Interface Library + # Platform implementation-specific Redfish Host Interface. + RedfishPlatformHostInterfaceLib|Include/Library/RedfishHostInterfaceLib.h + [Guids] gEfiRedfishPkgTokenSpaceGuid = { 0x4fdbccb7, 0xe829, 0x4b4c, { 0x88, 0x87, 0xb2, 0x3f, 0xd7, 0x25, 0x4b, 0x85 }} diff --git a/RedfishPkg/RedfishPkg.dsc b/RedfishPkg/RedfishPkg.dsc index XXXXXXX..XXXXXXX 100644 --- a/RedfishPkg/RedfishPkg.dsc +++ b/RedfishPkg/RedfishPkg.dsc @@ -XXX,XX +XXX,XX @@ DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf + RedfishPlatformHostInterfaceLib|RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.inf + +[LibraryClasses.ARM, LibraryClasses.AARCH64] + # + # This library provides the instrinsic functions generated by a given compiler. + # + NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf + ArmSoftFloatLib|ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf + +[Components] + RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibNull.inf + + RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66817): https://edk2.groups.io/g/devel/message/66817 Mute This Topic: https://groups.io/mt/77909066/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Add accepted dependency of RedfishPkg in RedfishPkg CI yaml 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> Reviewed-by: Nickle Wang <nickle.wang@hpe.com> --- RedfishPkg/RedfishPkg.ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RedfishPkg/RedfishPkg.ci.yaml b/RedfishPkg/RedfishPkg.ci.yaml index XXXXXXX..XXXXXXX 100644 --- a/RedfishPkg/RedfishPkg.ci.yaml +++ b/RedfishPkg/RedfishPkg.ci.yaml @@ -XXX,XX +XXX,XX @@ "AcceptableDependencies": [ "MdePkg/MdePkg.dec", "MdeModulePkg/MdeModulePkg.dec", - "NetworkPkg/NetworkPkg.dec" + "NetworkPkg/NetworkPkg.dec", + "RedfishPkg/RedfishPkg.dec" ], # For host based unit tests "AcceptableDependencies-HOST_APPLICATION":[], -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#66818): https://edk2.groups.io/g/devel/message/66818 Mute This Topic: https://groups.io/mt/77909067/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-