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 FILE_SECBOOT ( PERMITTED );
19 
20 #define EFI_ADAPTER_INFORMATION_PROTOCOL_GUID \
21  { \
22  0xE5DD1403, 0xD622, 0xC24E, {0x84, 0x88, 0xC7, 0x1B, 0x17, 0xF5, 0xE8, 0x02 } \
23  }
24 
25 #define EFI_ADAPTER_INFO_MEDIA_STATE_GUID \
26  { \
27  0xD7C74207, 0xA831, 0x4A26, {0xB1, 0xF5, 0xD1, 0x93, 0x06, 0x5C, 0xE8, 0xB6 } \
28  }
29 
30 #define EFI_ADAPTER_INFO_NETWORK_BOOT_GUID \
31  { \
32  0x1FBD2960, 0x4130, 0x41E5, {0x94, 0xAC, 0xD2, 0xCF, 0x03, 0x7F, 0xB3, 0x7C } \
33  }
34 
35 #define EFI_ADAPTER_INFO_SAN_MAC_ADDRESS_GUID \
36  { \
37  0x114da5ef, 0x2cf1, 0x4e12, {0x9b, 0xbb, 0xc4, 0x70, 0xb5, 0x52, 0x5, 0xd9 } \
38  }
39 
40 #define EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT_GUID \
41  { \
42  0x4bd56be3, 0x4975, 0x4d8a, {0xa0, 0xad, 0xc4, 0x91, 0x20, 0x4b, 0x5d, 0x4d} \
43  }
44 
45 #define EFI_ADAPTER_INFO_MEDIA_TYPE_GUID \
46  { \
47  0x8484472f, 0x71ec, 0x411a, { 0xb3, 0x9c, 0x62, 0xcd, 0x94, 0xd9, 0x91, 0x6e } \
48  }
49 
51 
52 ///
53 /// EFI_ADAPTER_INFO_MEDIA_STATE
54 ///
55 typedef struct {
56  ///
57  /// Returns the current media state status. MediaState can have any of the following values:
58  /// EFI_SUCCESS: There is media attached to the network adapter. EFI_NOT_READY: This detects a bounced state.
59  /// There was media attached to the network adapter, but it was removed and reattached. EFI_NO_MEDIA: There is
60  /// not any media attached to the network.
61  ///
64 
65 ///
66 /// EFI_ADAPTER_INFO_MEDIA_TYPE
67 ///
68 typedef struct {
69  ///
70  /// Indicates the current media type. MediaType can have any of the following values:
71  /// 1: Ethernet Network Adapter
72  /// 2: Ethernet Wireless Network Adapter
73  /// 3~255: Reserved
74  ///
77 
78 ///
79 /// EFI_ADAPTER_INFO_NETWORK_BOOT
80 ///
81 typedef struct {
82  ///
83  /// TRUE if the adapter supports booting from iSCSI IPv4 targets.
84  ///
86  ///
87  /// TRUE if the adapter supports booting from iSCSI IPv6 targets.
88  ///
90  ///
91  /// TRUE if the adapter supports booting from FCoE targets.
92  ///
94  ///
95  /// TRUE if the adapter supports an offload engine (such as TCP
96  /// Offload Engine (TOE)) for its iSCSI or FCoE boot operations.
97  ///
99  ///
100  /// TRUE if the adapter supports multipath I/O (MPIO) for its iSCSI
101  /// boot operations.
102  ///
104  ///
105  /// TRUE if the adapter is currently configured to boot from iSCSI
106  /// IPv4 targets.
107  ///
109  ///
110  /// TRUE if the adapter is currently configured to boot from iSCSI
111  /// IPv6 targets.
112  ///
114  ///
115  /// TRUE if the adapter is currently configured to boot from FCoE targets.
116  ///
119 
120 ///
121 /// EFI_ADAPTER_INFO_SAN_MAC_ADDRESS
122 ///
123 typedef struct {
124  ///
125  /// Returns the SAN MAC address for the adapter.For adapters that support today's 802.3 ethernet
126  /// networking and Fibre-Channel Over Ethernet (FCOE), this conveys the FCOE SAN MAC address from the adapter.
127  ///
130 
131 ///
132 /// EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT
133 ///
134 typedef struct {
135  ///
136  /// Returns capability of UNDI to support IPv6 traffic.
137  ///
140 
141 /**
142  Returns the current state information for the adapter.
143 
144  This function returns information of type InformationType from the adapter.
145  If an adapter does not support the requested informational type, then
146  EFI_UNSUPPORTED is returned. If an adapter does not contain Information for
147  the requested InformationType, it fills InformationBlockSize with 0 and
148  returns EFI_NOT_FOUND.
149 
150  @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.
151  @param[in] InformationType A pointer to an EFI_GUID that defines the contents of InformationBlock.
152  @param[out] InforamtionBlock The service returns a pointer to the buffer with the InformationBlock
153  structure which contains details about the data specific to InformationType.
154  @param[out] InforamtionBlockSize The driver returns the size of the InformationBlock in bytes.
155 
156  @retval EFI_SUCCESS The InformationType information was retrieved.
157  @retval EFI_UNSUPPORTED The InformationType is not known.
158  @retval EFI_NOT_FOUND Information is not available for the requested information type.
159  @retval EFI_DEVICE_ERROR The device reported an error.
160  @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
161  @retval EFI_INVALID_PARAMETER This is NULL.
162  @retval EFI_INVALID_PARAMETER InformationBlock is NULL.
163  @retval EFI_INVALID_PARAMETER InformationBlockSize is NULL.
164 
165 **/
166 typedef
170  IN EFI_GUID *InformationType,
171  OUT VOID **InformationBlock,
172  OUT UINTN *InformationBlockSize
173  );
174 
175 /**
176  Sets state information for an adapter.
177 
178  This function sends information of type InformationType for an adapter.
179  If an adapter does not support the requested information type, then EFI_UNSUPPORTED
180  is returned.
181 
182  @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.
183  @param[in] InformationType A pointer to an EFI_GUID that defines the contents of InformationBlock.
184  @param[in] InforamtionBlock A pointer to the InformationBlock structure which contains details
185  about the data specific to InformationType.
186  @param[in] InforamtionBlockSize The size of the InformationBlock in bytes.
187 
188  @retval EFI_SUCCESS The information was received and interpreted successfully.
189  @retval EFI_UNSUPPORTED The InformationType is not known.
190  @retval EFI_DEVICE_ERROR The device reported an error.
191  @retval EFI_INVALID_PARAMETER This is NULL.
192  @retval EFI_INVALID_PARAMETER InformationBlock is NULL.
193  @retval EFI_WRITE_PROTECTED The InformationType cannot be modified using EFI_ADAPTER_INFO_SET_INFO().
194 
195 **/
196 typedef
200  IN EFI_GUID *InformationType,
201  IN VOID *InformationBlock,
202  IN UINTN InformationBlockSize
203  );
204 
205 /**
206  Get a list of supported information types for this instance of the protocol.
207 
208  This function returns a list of InformationType GUIDs that are supported on an
209  adapter with this instance of EFI_ADAPTER_INFORMATION_PROTOCOL. The list is returned
210  in InfoTypesBuffer, and the number of GUID pointers in InfoTypesBuffer is returned in
211  InfoTypesBufferCount.
212 
213  @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.
214  @param[out] InfoTypesBuffer A pointer to the array of InformationType GUIDs that are supported
215  by This.
216  @param[out] InfoTypesBufferCount A pointer to the number of GUIDs present in InfoTypesBuffer.
217 
218  @retval EFI_SUCCESS The list of information type GUIDs that are supported on this adapter was
219  returned in InfoTypesBuffer. The number of information type GUIDs was
220  returned in InfoTypesBufferCount.
221  @retval EFI_INVALID_PARAMETER This is NULL.
222  @retval EFI_INVALID_PARAMETER InfoTypesBuffer is NULL.
223  @retval EFI_INVALID_PARAMETER InfoTypesBufferCount is NULL.
224  @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the results.
225 
226 **/
227 typedef
231  OUT EFI_GUID **InfoTypesBuffer,
232  OUT UINTN *InfoTypesBufferCount
233  );
234 
235 ///
236 /// EFI_ADAPTER_INFORMATION_PROTOCOL
237 /// The protocol for adapter provides the following services.
238 /// - Gets device state information from adapter.
239 /// - Sets device information for adapter.
240 /// - Gets a list of supported information types for this instance of the protocol.
241 ///
246 };
247 
249 
251 
253 
255 
257 
258 #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:216
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:98
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:272
#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:32
EFI_ADAPTER_INFORMATION_PROTOCOL The protocol for adapter provides the following services.
EFI_GUID gEfiAdapterInfoSanMacAddressGuid
FILE_SECBOOT(PERMITTED)
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