TianoCore EDK2 master
Loading...
Searching...
No Matches
RedfishPlatformHostInterfaceLib.c File Reference

Go to the source code of this file.

Macros

#define VERBOSE_COLUME_SIZE   (16)
 

Functions

EFI_STATUS GetMacAddressInformation (OUT EFI_MAC_ADDRESS *MacAddress)
 
EFI_STATUS RedfishPlatformHostInterfaceDeviceDescriptor (OUT UINT8 *DeviceType, OUT REDFISH_INTERFACE_DATA **DeviceDescriptor)
 
EFI_STATUS RedfishPlatformHostInterfaceProtocolData (OUT MC_HOST_INTERFACE_PROTOCOL_RECORD **ProtocolRecord, IN UINT8 IndexOfProtocolData)
 
VOID InternalDumpIp4Addr (IN EFI_IPv4_ADDRESS *Ip)
 
VOID InternalDumpIp6Addr (IN EFI_IPv6_ADDRESS *Ip)
 
VOID InternalDumpData (IN UINT8 *Data, IN UINTN Size)
 
VOID InternalDumpHex (IN UINT8 *Data, IN UINTN Size)
 
VOID DumpRedfishIpProtocolData (IN REDFISH_OVER_IP_PROTOCOL_DATA *RedfishProtocolData, IN UINT8 RedfishProtocolDataSize)
 
EFI_STATUS GetRedfishRecordFromVariable (OUT REDFISH_OVER_IP_PROTOCOL_DATA **RedfishProtocolData, OUT UINT8 *RedfishProtocolDataSize)
 
EFI_STATUS EFIAPI RedfishPlatformHostInterfaceConstructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS RedfishPlatformHostInterfaceNotification (OUT EFI_GUID **InformationReadinessGuid)
 

Variables

REDFISH_OVER_IP_PROTOCOL_DATAmRedfishOverIpProtocolData
 
UINT8 mRedfishProtocolDataSize
 

Detailed Description

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.

Macro Definition Documentation

◆ VERBOSE_COLUME_SIZE

#define VERBOSE_COLUME_SIZE   (16)

Definition at line 27 of file RedfishPlatformHostInterfaceLib.c.

Function Documentation

◆ DumpRedfishIpProtocolData()

VOID DumpRedfishIpProtocolData ( IN REDFISH_OVER_IP_PROTOCOL_DATA RedfishProtocolData,
IN UINT8  RedfishProtocolDataSize 
)

Dump Redfish over IP protocol data

Parameters
[in]RedfishProtocolDataPointer to REDFISH_OVER_IP_PROTOCOL_DATA
[in]RedfishProtocolDataSizesize of data to dump.

Definition at line 286 of file RedfishPlatformHostInterfaceLib.c.

◆ GetMacAddressInformation()

EFI_STATUS GetMacAddressInformation ( OUT EFI_MAC_ADDRESS MacAddress)

Get the MAC address of NIC.

Parameters
[out]MacAddressPointer to retrieve MAC address
Return values
EFI_SUCCESSMAC address is returned in MacAddress

Definition at line 41 of file RedfishPlatformHostInterfaceLib.c.

◆ GetRedfishRecordFromVariable()

EFI_STATUS GetRedfishRecordFromVariable ( OUT REDFISH_OVER_IP_PROTOCOL_DATA **  RedfishProtocolData,
OUT UINT8 *  RedfishProtocolDataSize 
)

Get Redfish host interface protocol data from variale.

Parameters
[out]RedfishProtocolDataPointer to retrieve REDFISH_OVER_IP_PROTOCOL_DATA.
[out]RedfishProtocolDataSizeSize of REDFISH_OVER_IP_PROTOCOL_DATA.
Return values
EFI_SUCESSREDFISH_OVER_IP_PROTOCOL_DATA is returned successfully.

Definition at line 355 of file RedfishPlatformHostInterfaceLib.c.

◆ InternalDumpData()

VOID InternalDumpData ( IN UINT8 *  Data,
IN UINTN  Size 
)

Dump data

Parameters
[in]DataPointer to data.
[in]Sizesize of data to dump.

Definition at line 236 of file RedfishPlatformHostInterfaceLib.c.

◆ InternalDumpHex()

VOID InternalDumpHex ( IN UINT8 *  Data,
IN UINTN  Size 
)

Dump hex data

Parameters
[in]DataPointer to hex data.
[in]Sizesize of hex data to dump.

Definition at line 255 of file RedfishPlatformHostInterfaceLib.c.

◆ InternalDumpIp4Addr()

VOID InternalDumpIp4Addr ( IN EFI_IPv4_ADDRESS Ip)

Dump IPv4 address.

Parameters
[in]IpIPv4 address

Definition at line 176 of file RedfishPlatformHostInterfaceLib.c.

◆ InternalDumpIp6Addr()

VOID InternalDumpIp6Addr ( IN EFI_IPv6_ADDRESS Ip)

Dump IPv6 address.

Parameters
[in]IpIPv6 address

Definition at line 198 of file RedfishPlatformHostInterfaceLib.c.

◆ RedfishPlatformHostInterfaceConstructor()

EFI_STATUS EFIAPI RedfishPlatformHostInterfaceConstructor ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Construct Redfish host interface protocol data.

Parameters
ImageHandleThe image handle.
SystemTableThe system table.
Return values
EFI_SUCEESSInstall Boot manager menu success.
OtherReturn error status.

Definition at line 531 of file RedfishPlatformHostInterfaceLib.c.

◆ RedfishPlatformHostInterfaceDeviceDescriptor()

EFI_STATUS RedfishPlatformHostInterfaceDeviceDescriptor ( OUT UINT8 *  DeviceType,
OUT REDFISH_INTERFACE_DATA **  DeviceDescriptor 
)

Get platform Redfish host interface device descriptor.

Parameters
[out]DeviceTypePointer to retrieve device type.
[out]DeviceDescriptorPointer to retrieve REDFISH_INTERFACE_DATA, caller has to free this memory using FreePool().
Return values
EFI_SUCCESSDevice descriptor is returned successfully in DeviceDescriptor.
EFI_NOT_FOUNDNo Redfish host interface descriptor provided on this platform.
OthersFail to get device descriptor.

Definition at line 95 of file RedfishPlatformHostInterfaceLib.c.

◆ RedfishPlatformHostInterfaceNotification()

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.

Parameters
[out]InformationReadinessGuidPointer to retrive the protocol GUID.
Return values
EFI_SUCCESSNotification is required for building up SMBIOS type 42h record.
EFI_UNSUPPORTEDNotification is not required for building up SMBIOS type 42h record.
EFI_ALREADY_STARTEDPlatform host information is already ready.
OthersOther errors.

Definition at line 563 of file RedfishPlatformHostInterfaceLib.c.

◆ RedfishPlatformHostInterfaceProtocolData()

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.

Parameters
[out]ProtocolRecordPointer to retrieve the protocol record. caller has to free the new protocol record returned from this function using FreePool().
[in]IndexOfProtocolDataThe index of protocol data.
Return values
EFI_SUCCESSProtocol records are all returned.
EFI_NOT_FOUNDNo more protocol records.
OthersFail to get protocol records.

Definition at line 143 of file RedfishPlatformHostInterfaceLib.c.

Variable Documentation

◆ mRedfishOverIpProtocolData

REDFISH_OVER_IP_PROTOCOL_DATA* mRedfishOverIpProtocolData

Definition at line 29 of file RedfishPlatformHostInterfaceLib.c.

◆ mRedfishProtocolDataSize

UINT8 mRedfishProtocolDataSize

Definition at line 30 of file RedfishPlatformHostInterfaceLib.c.