TianoCore EDK2 master
|
#include "PlatformHostInterfaceBmcUsbNicLib.h"
Go to the source code of this file.
Source file to provide the platform Redfish Host Interface information of USB NIC Device exposed by BMC.
Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file PlatformHostInterfaceBmcUsbNicLib.c.
EFI_STATUS CacheIpmiLanMac | ( | IN UINT8 | ChannelNum, |
IN EFI_MAC_ADDRESS * | IpmiLanChannelMacAddress, | ||
IN UINT8 | IpmiLanMacAddressSize | ||
) |
This function caches the found IPMI LAN channel. So we don't have to sedn IPMI commands again if the USB NIC is connected later.
[in] | ChannelNum | The IPMI channel number. |
[in] | IpmiLanChannelMacAddress | Pointer to EFI_MAC_ADDRESS. |
[in] | IpmiLanMacAddressSize | The MAC address size. |
EFI_SUCCESS | IPMI LAN channel is cached. |
EFI_OUT_OF_RESOURCE | Memory allocated failed. |
Others | Other errors. |
Definition at line 523 of file PlatformHostInterfaceBmcUsbNicLib.c.
EFI_STATUS CheckBmcUsbNic | ( | VOID * | Registration | ) |
This function checks if the USB NIC exposed by BMC is already connected.
[in] | Registration | Locate SNP protocol from the notification registeration key. NULL means locate SNP protocol from the existing handles. |
EFI_SUCCESS | Yes, USB NIC exposed by BMC is found. |
EFI_NOT_FOUND | No, USB NIC exposed by BMC is not found on the existing SNP handle. |
Others | Other errors. |
Definition at line 1199 of file PlatformHostInterfaceBmcUsbNicLib.c.
EFI_STATUS CheckBmcUsbNicOnHandles | ( | IN UINTN | HandleNumer, |
IN EFI_HANDLE * | HandleBuffer | ||
) |
This function checks if the USB NIC exposed by BMC on each handle has SNP protocol installed on it.
[in] | HandleNumer | Number of handles to check. |
[in] | HandleBuffer | Handles buffer. |
EFI_SUCCESS | Yes, USB NIC exposed by BMC is found. |
EFI_NOT_FOUND | No, USB NIC exposed by BMC is not found on the existing SNP handle. |
Others | Other errors. |
Definition at line 1118 of file PlatformHostInterfaceBmcUsbNicLib.c.
EFI_STATUS CheckCachedIpmiLanMac | ( | IN UINT8 | ChannelNum, |
OUT BMC_IPMI_LAN_CHANNEL_INFO ** | CachedIpmiLanChannel | ||
) |
This function checks if the IPMI channel already identified previously.
[in] | ChannelNum | The IPMI channel number. |
[out] | CachedIpmiLanChannel | Pointer to retrieve the cached BMC_IPMI_LAN_CHANNEL_INFO. |
EFI_SUCCESS | IPMI LAN channel is found. |
Others | Other errors. |
Definition at line 557 of file PlatformHostInterfaceBmcUsbNicLib.c.
EFI_STATUS HostInterfaceIpmiCheckMacAddress | ( | IN HOST_INTERFACE_BMC_USB_NIC_INFO * | UsbNicInfo | ) |
This function goes through IPMI channels to find the mactched MAC addrss of BMC USB NIC endpoint.
[in] | UsbNicInfo | The instance of HOST_INTERFACE_BMC_USB_NIC_INFO. |
EFI_SUCCESS | Yes, USB NIC exposed by BMC is found. |
EFI_NOT_FOUND | No, USB NIC exposed by BMC is not found on the existing SNP handle. |
Others | Other errors. |
Definition at line 599 of file PlatformHostInterfaceBmcUsbNicLib.c.
EFI_STATUS IdentifyNetworkMessageDevicePath | ( | IN EFI_DEVICE_PATH_PROTOCOL * | UsbDevicePath | ) |
This function identifies if the USB NIC has MAC address and internet protocol device path installed. (Only support IPv4)
[in] | UsbDevicePath | USB device path. |
EFI_SUCCESS | Yes, this is IPv4 SNP handle |
EFI_NOT_FOUND | No, this is not IPv4 SNP handle |
Definition at line 988 of file PlatformHostInterfaceBmcUsbNicLib.c.
EFI_STATUS IdentifyUsbNicBmcChannel | ( | IN EFI_HANDLE | Handle, |
IN EFI_DEVICE_PATH_PROTOCOL * | UsbDevicePath | ||
) |
This function identifies if the USB NIC is exposed by BMC as the host-BMC channel.
[in] | Handle | This is the EFI handle with SNP installed. |
[in] | UsbDevicePath | USB device path. |
EFI_SUCCESS | Yes, USB NIC exposed by BMC is found. |
EFI_NOT_FOUND | No, USB NIC exposed by BMC is not found on the existing SNP handle. |
Others | Other errors. |
Definition at line 1034 of file PlatformHostInterfaceBmcUsbNicLib.c.
Notification event of SNP readiness.
[in] | Event | Event whose notification function is being invoked. |
[in] | Context | The pointer to the notification function's context, which is implementation-dependent. |
Definition at line 1288 of file PlatformHostInterfaceBmcUsbNicLib.c.
BOOLEAN ProbeRedfishCredentialBootstrap | ( | VOID | ) |
Probe if the system supports Redfish Host Interface Credentail Bootstrapping.
TRUE | Yes, it is supported. FALSE No, it is not supported. |
Definition at line 30 of file PlatformHostInterfaceBmcUsbNicLib.c.
EFI_STATUS RedfishPlatformHostInterfaceDeviceDescriptor | ( | IN UINT8 * | DeviceType, |
OUT REDFISH_INTERFACE_DATA ** | DeviceDescriptor | ||
) |
Get platform Redfish host interface device descriptor.
[in] | DeviceType | Pointer to retrieve device type. |
[out] | DeviceDescriptor | Pointer to retrieve REDFISH_INTERFACE_DATA, caller has to free this memory using FreePool(). |
EFI_NOT_FOUND | No Redfish host interface descriptor provided on this platform. |
Definition at line 95 of file PlatformHostInterfaceBmcUsbNicLib.c.
EFI_STATUS RedfishPlatformHostInterfaceNotification | ( | OUT EFI_GUID ** | InformationReadinessGuid | ) |
Get the EFI protocol GUID installed by platform library which indicates the necessary information is ready for building SMBIOS 42h record.
[out] | InformationReadinessGuid | Pointer to retrive the protocol GUID. |
EFI_SUCCESS | Notification is required for building up SMBIOS type 42h record. |
EFI_UNSUPPORTED | Notification is not required for building up SMBIOS type 42h record. |
EFI_ALREADY_STARTED | Platform host information is already ready. |
Others | Other errors. |
Definition at line 1315 of file PlatformHostInterfaceBmcUsbNicLib.c.
EFI_STATUS RedfishPlatformHostInterfaceProtocolData | ( | IN OUT MC_HOST_INTERFACE_PROTOCOL_RECORD ** | ProtocolRecord, |
IN UINT8 | IndexOfProtocolData | ||
) |
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.
[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(). |
[in] | IndexOfProtocolData | The index of protocol data. |
EFI_NOT_FOUND | No more protocol records. |
Definition at line 164 of file PlatformHostInterfaceBmcUsbNicLib.c.
EFI_STATUS RetrievedBmcUsbNicInfo | ( | VOID | ) |
This function retrieve the information of BMC USB NIC.
EFI_SUCCESS | All necessary information is retrieved. |
EFI_NOT_FOUND | There is no BMC exposed USB NIC. |
Others | Other errors. |
Definition at line 293 of file PlatformHostInterfaceBmcUsbNicLib.c.
EFI_DEVICE_PATH_PROTOCOL * UsbNicGetNextMsgUsbDp | ( | IN EFI_DEVICE_PATH_PROTOCOL * | ThisDevicePath | ) |
This function searches the next MSG_USB_DP device path node.
[in] | ThisDevicePath | Device path to search. |
NULL | MSG_USB_DP is not found. Otherwise MSG_USB_DP is found. |
Definition at line 787 of file PlatformHostInterfaceBmcUsbNicLib.c.
EFI_STATUS UsbNicSearchUsbIo | ( | IN EFI_DEVICE_PATH_PROTOCOL * | UsbDevicePath, |
OUT EFI_USB_IO_PROTOCOL ** | UsbIo | ||
) |
This function search the UsbIo handle that matches the UsbDevicePath.
[in] | UsbDevicePath | Device path of this SNP handle. |
[out] | UsbIo | Return the UsbIo protocol. |
EFI_SUCCESS | Yes, UsbIo protocl is found. |
EFI_NOT_FOUND | No, UsbIo protocl is not found |
Others | Other errors. |
Definition at line 821 of file PlatformHostInterfaceBmcUsbNicLib.c.