TianoCore EDK2 master
|
#include <Uefi.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/DevicePathLib.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>
#include <Pcd/RestExServiceDevicePath.h>
#include <Guid/GlobalVariable.h>
Go to the source code of this file.
Macros | |
#define | VERBOSE_COLUME_SIZE (16) |
Variables | |
REDFISH_OVER_IP_PROTOCOL_DATA * | mRedfishOverIpProtocolData |
UINT8 | mRedfishProtocolDataSize |
PCI/PCIe network interface instace of RedfishPlatformHostInterfaceLib
Copyright (c) 2019, Intel Corporation. All rights reserved.
(C) Copyright 2020 Hewlett Packard Enterprise Development LP
Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file RedfishPlatformHostInterfaceLib.c.
#define VERBOSE_COLUME_SIZE (16) |
Definition at line 27 of file RedfishPlatformHostInterfaceLib.c.
VOID DumpRedfishIpProtocolData | ( | IN REDFISH_OVER_IP_PROTOCOL_DATA * | RedfishProtocolData, |
IN UINT8 | RedfishProtocolDataSize | ||
) |
Dump Redfish over IP protocol data
[in] | RedfishProtocolData | Pointer to REDFISH_OVER_IP_PROTOCOL_DATA |
[in] | RedfishProtocolDataSize | size of data to dump. |
Definition at line 286 of file RedfishPlatformHostInterfaceLib.c.
EFI_STATUS GetMacAddressInformation | ( | OUT EFI_MAC_ADDRESS * | MacAddress | ) |
Get the MAC address of NIC.
[out] | MacAddress | Pointer to retrieve MAC address |
EFI_SUCCESS | MAC address is returned in MacAddress |
Definition at line 41 of file RedfishPlatformHostInterfaceLib.c.
EFI_STATUS GetRedfishRecordFromVariable | ( | OUT REDFISH_OVER_IP_PROTOCOL_DATA ** | RedfishProtocolData, |
OUT UINT8 * | RedfishProtocolDataSize | ||
) |
Get Redfish host interface protocol data from variale.
[out] | RedfishProtocolData | Pointer to retrieve REDFISH_OVER_IP_PROTOCOL_DATA. |
[out] | RedfishProtocolDataSize | Size of REDFISH_OVER_IP_PROTOCOL_DATA. |
EFI_SUCESS | REDFISH_OVER_IP_PROTOCOL_DATA is returned successfully. |
Definition at line 355 of file RedfishPlatformHostInterfaceLib.c.
Dump data
[in] | Data | Pointer to data. |
[in] | Size | size of data to dump. |
Definition at line 236 of file RedfishPlatformHostInterfaceLib.c.
Dump hex data
[in] | Data | Pointer to hex data. |
[in] | Size | size of hex data to dump. |
Definition at line 255 of file RedfishPlatformHostInterfaceLib.c.
VOID InternalDumpIp4Addr | ( | IN EFI_IPv4_ADDRESS * | Ip | ) |
Dump IPv4 address.
[in] | Ip | IPv4 address |
Definition at line 176 of file RedfishPlatformHostInterfaceLib.c.
VOID InternalDumpIp6Addr | ( | IN EFI_IPv6_ADDRESS * | Ip | ) |
Dump IPv6 address.
[in] | Ip | IPv6 address |
Definition at line 198 of file RedfishPlatformHostInterfaceLib.c.
EFI_STATUS EFIAPI RedfishPlatformHostInterfaceConstructor | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Construct Redfish host interface protocol data.
ImageHandle | The image handle. |
SystemTable | The system table. |
EFI_SUCEESS | Install Boot manager menu success. |
Other | Return error status. |
Definition at line 531 of file RedfishPlatformHostInterfaceLib.c.
EFI_STATUS RedfishPlatformHostInterfaceDeviceDescriptor | ( | OUT UINT8 * | DeviceType, |
OUT REDFISH_INTERFACE_DATA ** | DeviceDescriptor | ||
) |
Get platform Redfish host interface device descriptor.
[out] | DeviceType | Pointer to retrieve device type. |
[out] | DeviceDescriptor | Pointer to retrieve REDFISH_INTERFACE_DATA, caller has to free this memory using FreePool(). |
EFI_SUCCESS | Device descriptor is returned successfully in DeviceDescriptor. |
EFI_NOT_FOUND | No Redfish host interface descriptor provided on this platform. |
Others | Fail to get device descriptor. |
Definition at line 95 of file RedfishPlatformHostInterfaceLib.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 563 of file RedfishPlatformHostInterfaceLib.c.
EFI_STATUS RedfishPlatformHostInterfaceProtocolData | ( | 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.
[out] | ProtocolRecord | Pointer to retrieve the protocol record. caller has to free the new protocol record returned from this function using FreePool(). |
[in] | IndexOfProtocolData | The index of protocol data. |
EFI_SUCCESS | Protocol records are all returned. |
EFI_NOT_FOUND | No more protocol records. |
Others | Fail to get protocol records. |
Definition at line 143 of file RedfishPlatformHostInterfaceLib.c.
REDFISH_OVER_IP_PROTOCOL_DATA* mRedfishOverIpProtocolData |
Definition at line 29 of file RedfishPlatformHostInterfaceLib.c.
UINT8 mRedfishProtocolDataSize |
Definition at line 30 of file RedfishPlatformHostInterfaceLib.c.