iPXE
AdapterInformation.h
Go to the documentation of this file.
1 /** @file
2  EFI Adapter Information Protocol definition.
3  The EFI Adapter Information Protocol is used to dynamically and quickly discover
4  or set device information for an adapter.
5 
6  Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>
7  SPDX-License-Identifier: BSD-2-Clause-Patent
8 
9  @par Revision Reference:
10  This Protocol is introduced in UEFI Specification 2.4
11 
12 **/
13 
14 #ifndef __EFI_ADAPTER_INFORMATION_PROTOCOL_H__
15 #define __EFI_ADAPTER_INFORMATION_PROTOCOL_H__
16 
17 FILE_LICENCE ( BSD2_PATENT );
18 
19 #define EFI_ADAPTER_INFORMATION_PROTOCOL_GUID \
20  { \
21  0xE5DD1403, 0xD622, 0xC24E, {0x84, 0x88, 0xC7, 0x1B, 0x17, 0xF5, 0xE8, 0x02 } \
22  }
23 
24 #define EFI_ADAPTER_INFO_MEDIA_STATE_GUID \
25  { \
26  0xD7C74207, 0xA831, 0x4A26, {0xB1, 0xF5, 0xD1, 0x93, 0x06, 0x5C, 0xE8, 0xB6 } \
27  }
28 
29 #define EFI_ADAPTER_INFO_NETWORK_BOOT_GUID \
30  { \
31  0x1FBD2960, 0x4130, 0x41E5, {0x94, 0xAC, 0xD2, 0xCF, 0x03, 0x7F, 0xB3, 0x7C } \
32  }
33 
34 #define EFI_ADAPTER_INFO_SAN_MAC_ADDRESS_GUID \
35  { \
36  0x114da5ef, 0x2cf1, 0x4e12, {0x9b, 0xbb, 0xc4, 0x70, 0xb5, 0x52, 0x5, 0xd9 } \
37  }
38 
39 #define EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT_GUID \
40  { \
41  0x4bd56be3, 0x4975, 0x4d8a, {0xa0, 0xad, 0xc4, 0x91, 0x20, 0x4b, 0x5d, 0x4d} \
42  }
43 
44 #define EFI_ADAPTER_INFO_MEDIA_TYPE_GUID \
45  { \
46  0x8484472f, 0x71ec, 0x411a, { 0xb3, 0x9c, 0x62, 0xcd, 0x94, 0xd9, 0x91, 0x6e } \
47  }
48 
50 
51 ///
52 /// EFI_ADAPTER_INFO_MEDIA_STATE
53 ///
54 typedef struct {
55  ///
56  /// Returns the current media state status. MediaState can have any of the following values:
57  /// EFI_SUCCESS: There is media attached to the network adapter. EFI_NOT_READY: This detects a bounced state.
58  /// There was media attached to the network adapter, but it was removed and reattached. EFI_NO_MEDIA: There is
59  /// not any media attached to the network.
60  ///
63 
64 ///
65 /// EFI_ADAPTER_INFO_MEDIA_TYPE
66 ///
67 typedef struct {
68  ///
69  /// Indicates the current media type. MediaType can have any of the following values:
70  /// 1: Ethernet Network Adapter
71  /// 2: Ethernet Wireless Network Adapter
72  /// 3~255: Reserved
73  ///
76 
77 ///
78 /// EFI_ADAPTER_INFO_NETWORK_BOOT
79 ///
80 typedef struct {
81  ///
82  /// TRUE if the adapter supports booting from iSCSI IPv4 targets.
83  ///
85  ///
86  /// TRUE if the adapter supports booting from iSCSI IPv6 targets.
87  ///
89  ///
90  /// TRUE if the adapter supports booting from FCoE targets.
91  ///
93  ///
94  /// TRUE if the adapter supports an offload engine (such as TCP
95  /// Offload Engine (TOE)) for its iSCSI or FCoE boot operations.
96  ///
98  ///
99  /// TRUE if the adapter supports multipath I/O (MPIO) for its iSCSI
100  /// boot operations.
101  ///
103  ///
104  /// TRUE if the adapter is currently configured to boot from iSCSI
105  /// IPv4 targets.
106  ///
108  ///
109  /// TRUE if the adapter is currently configured to boot from iSCSI
110  /// IPv6 targets.
111  ///
113  ///
114  /// TRUE if the adapter is currently configured to boot from FCoE targets.
115  ///
118 
119 ///
120 /// EFI_ADAPTER_INFO_SAN_MAC_ADDRESS
121 ///
122 typedef struct {
123  ///
124  /// Returns the SAN MAC address for the adapter.For adapters that support today's 802.3 ethernet
125  /// networking and Fibre-Channel Over Ethernet (FCOE), this conveys the FCOE SAN MAC address from the adapter.
126  ///
129 
130 ///
131 /// EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT
132 ///
133 typedef struct {
134  ///
135  /// Returns capability of UNDI to support IPv6 traffic.
136  ///
139 
140 /**
141  Returns the current state information for the adapter.
142 
143  This function returns information of type InformationType from the adapter.
144  If an adapter does not support the requested informational type, then
145  EFI_UNSUPPORTED is returned. If an adapter does not contain Information for
146  the requested InformationType, it fills InformationBlockSize with 0 and
147  returns EFI_NOT_FOUND.
148 
149  @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.
150  @param[in] InformationType A pointer to an EFI_GUID that defines the contents of InformationBlock.
151  @param[out] InforamtionBlock The service returns a pointer to the buffer with the InformationBlock
152  structure which contains details about the data specific to InformationType.
153  @param[out] InforamtionBlockSize The driver returns the size of the InformationBlock in bytes.
154 
155  @retval EFI_SUCCESS The InformationType information was retrieved.
156  @retval EFI_UNSUPPORTED The InformationType is not known.
157  @retval EFI_NOT_FOUND Information is not available for the requested information type.
158  @retval EFI_DEVICE_ERROR The device reported an error.
159  @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
160  @retval EFI_INVALID_PARAMETER This is NULL.
161  @retval EFI_INVALID_PARAMETER InformationBlock is NULL.
162  @retval EFI_INVALID_PARAMETER InformationBlockSize is NULL.
163 
164 **/
165 typedef
169  IN EFI_GUID *InformationType,
170  OUT VOID **InformationBlock,
171  OUT UINTN *InformationBlockSize
172  );
173 
174 /**
175  Sets state information for an adapter.
176 
177  This function sends information of type InformationType for an adapter.
178  If an adapter does not support the requested information type, then EFI_UNSUPPORTED
179  is returned.
180 
181  @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.
182  @param[in] InformationType A pointer to an EFI_GUID that defines the contents of InformationBlock.
183  @param[in] InforamtionBlock A pointer to the InformationBlock structure which contains details
184  about the data specific to InformationType.
185  @param[in] InforamtionBlockSize The size of the InformationBlock in bytes.
186 
187  @retval EFI_SUCCESS The information was received and interpreted successfully.
188  @retval EFI_UNSUPPORTED The InformationType is not known.
189  @retval EFI_DEVICE_ERROR The device reported an error.
190  @retval EFI_INVALID_PARAMETER This is NULL.
191  @retval EFI_INVALID_PARAMETER InformationBlock is NULL.
192  @retval EFI_WRITE_PROTECTED The InformationType cannot be modified using EFI_ADAPTER_INFO_SET_INFO().
193 
194 **/
195 typedef
199  IN EFI_GUID *InformationType,
200  IN VOID *InformationBlock,
201  IN UINTN InformationBlockSize
202  );
203 
204 /**
205  Get a list of supported information types for this instance of the protocol.
206 
207  This function returns a list of InformationType GUIDs that are supported on an
208  adapter with this instance of EFI_ADAPTER_INFORMATION_PROTOCOL. The list is returned
209  in InfoTypesBuffer, and the number of GUID pointers in InfoTypesBuffer is returned in
210  InfoTypesBufferCount.
211 
212  @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.
213  @param[out] InfoTypesBuffer A pointer to the array of InformationType GUIDs that are supported
214  by This.
215  @param[out] InfoTypesBufferCount A pointer to the number of GUIDs present in InfoTypesBuffer.
216 
217  @retval EFI_SUCCESS The list of information type GUIDs that are supported on this adapter was
218  returned in InfoTypesBuffer. The number of information type GUIDs was
219  returned in InfoTypesBufferCount.
220  @retval EFI_INVALID_PARAMETER This is NULL.
221  @retval EFI_INVALID_PARAMETER InfoTypesBuffer is NULL.
222  @retval EFI_INVALID_PARAMETER InfoTypesBufferCount is NULL.
223  @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the results.
224 
225 **/
226 typedef
230  OUT EFI_GUID **InfoTypesBuffer,
231  OUT UINTN *InfoTypesBufferCount
232  );
233 
234 ///
235 /// EFI_ADAPTER_INFORMATION_PROTOCOL
236 /// The protocol for adapter provides the following services.
237 /// - Gets device state information from adapter.
238 /// - Sets device information for adapter.
239 /// - Gets a list of supported information types for this instance of the protocol.
240 ///
245 };
246 
248 
250 
252 
254 
256 
257 #endif
EFI_STATUS(EFIAPI * EFI_ADAPTER_INFO_GET_INFO)(IN EFI_ADAPTER_INFORMATION_PROTOCOL *This, IN EFI_GUID *InformationType, OUT VOID **InformationBlock, OUT UINTN *InformationBlockSize)
Returns the current state information for the adapter.
EFI_GUID gEfiAdapterInformationProtocolGuid
BOOLEAN iScsiIpv6BootCapablity
TRUE if the adapter supports booting from iSCSI IPv6 targets.
EFI_ADAPTER_INFO_GET_SUPPORTED_TYPES GetSupportedTypes
EFI_GUID gEfiAdapterInfoNetworkBootGuid
128 bit buffer containing a unique identifier value.
Definition: Base.h:215
BOOLEAN iScsiMpioCapability
TRUE if the adapter supports multipath I/O (MPIO) for its iSCSI boot operations.
EFI_STATUS(EFIAPI * EFI_ADAPTER_INFO_SET_INFO)(IN EFI_ADAPTER_INFORMATION_PROTOCOL *This, IN EFI_GUID *InformationType, IN VOID *InformationBlock, IN UINTN InformationBlockSize)
Sets state information for an adapter.
BOOLEAN OffloadCapability
TRUE if the adapter supports an offload engine (such as TCP Offload Engine (TOE)) for its iSCSI or FC...
32-byte buffer containing a network Media Access Control address.
Definition: UefiBaseType.h:97
unsigned char BOOLEAN
EFI_ADAPTER_INFO_MEDIA_TYPE.
BOOLEAN iScsiIpv6Boot
TRUE if the adapter is currently configured to boot from iSCSI IPv6 targets.
FILE_LICENCE(BSD2_PATENT)
unsigned char UINT8
EFI_ADAPTER_INFO_NETWORK_BOOT.
#define OUT
Definition: mlx_utils.h:29
BOOLEAN FCoeBoot
TRUE if the adapter is currently configured to boot from FCoE targets.
BOOLEAN iScsiIpv4BootCapablity
TRUE if the adapter supports booting from iSCSI IPv4 targets.
EFI_GUID gEfiAdapterInfoMediaStateGuid
EFI_ADAPTER_INFO_SAN_MAC_ADDRESS.
#define EFIAPI
EFI_MAC_ADDRESS SanMacAddress
Returns the SAN MAC address for the adapter.For adapters that support today's 802....
UINT64 UINTN
Unsigned value of native width.
UINT8 MediaType
Indicates the current media type.
EFI_ADAPTER_INFO_MEDIA_STATE.
#define VOID
Undeclared type.
Definition: Base.h:271
#define IN
Definition: mlx_utils.h:28
BOOLEAN FCoeBootCapablity
TRUE if the adapter supports booting from FCoE targets.
BOOLEAN Ipv6Support
Returns capability of UNDI to support IPv6 traffic.
EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT.
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:31
EFI_ADAPTER_INFORMATION_PROTOCOL The protocol for adapter provides the following services.
EFI_GUID gEfiAdapterInfoSanMacAddressGuid
EFI_GUID gEfiAdapterInfoUndiIpv6SupportGuid
BOOLEAN iScsiIpv4Boot
TRUE if the adapter is currently configured to boot from iSCSI IPv4 targets.
EFI_ADAPTER_INFO_GET_INFO GetInformation
EFI_STATUS(EFIAPI * EFI_ADAPTER_INFO_GET_SUPPORTED_TYPES)(IN EFI_ADAPTER_INFORMATION_PROTOCOL *This, OUT EFI_GUID **InfoTypesBuffer, OUT UINTN *InfoTypesBufferCount)
Get a list of supported information types for this instance of the protocol.
EFI_STATUS MediaState
Returns the current media state status.
EFI_ADAPTER_INFO_SET_INFO SetInformation