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.
6 Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
7 This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 @par Revision Reference:
16 This Protocol is introduced in UEFI Specification 2.4
20 #ifndef __EFI_ADAPTER_INFORMATION_PROTOCOL_H__
21 #define __EFI_ADAPTER_INFORMATION_PROTOCOL_H__
24 #define EFI_ADAPTER_INFORMATION_PROTOCOL_GUID \
26 0xE5DD1403, 0xD622, 0xC24E, {0x84, 0x88, 0xC7, 0x1B, 0x17, 0xF5, 0xE8, 0x02 } \
29 #define EFI_ADAPTER_INFO_MEDIA_STATE_GUID \
31 0xD7C74207, 0xA831, 0x4A26, {0xB1, 0xF5, 0xD1, 0x93, 0x06, 0x5C, 0xE8, 0xB6 } \
34 #define EFI_ADAPTER_INFO_NETWORK_BOOT_GUID \
36 0x1FBD2960, 0x4130, 0x41E5, {0x94, 0xAC, 0xD2, 0xCF, 0x03, 0x7F, 0xB3, 0x7C } \
39 #define EFI_ADAPTER_INFO_SAN_MAC_ADDRESS_GUID \
41 0x114da5ef, 0x2cf1, 0x4e12, {0x9b, 0xbb, 0xc4, 0x70, 0xb5, 0x52, 0x5, 0xd9 } \
44 #define EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT_GUID \
46 0x4bd56be3, 0x4975, 0x4d8a, {0xa0, 0xad, 0xc4, 0x91, 0x20, 0x4b, 0x5d, 0x4d} \
49 typedef struct _EFI_ADAPTER_INFORMATION_PROTOCOL EFI_ADAPTER_INFORMATION_PROTOCOL
;
52 /// EFI_ADAPTER_INFO_MEDIA_STATE
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.
61 EFI_STATUS MediaState
;
62 } EFI_ADAPTER_INFO_MEDIA_STATE
;
65 /// EFI_ADAPTER_INFO_NETWORK_BOOT
69 /// TRUE if the adapter supports booting from iSCSI IPv4 targets.
71 BOOLEAN iScsiIpv4BootCapablity
;
73 /// TRUE if the adapter supports booting from iSCSI IPv6 targets.
75 BOOLEAN iScsiIpv6BootCapablity
;
77 /// TRUE if the adapter supports booting from FCoE targets.
79 BOOLEAN FCoeBootCapablity
;
81 /// TRUE if the adapter supports an offload engine (such as TCP
82 /// Offload Engine (TOE)) for its iSCSI or FCoE boot operations.
84 BOOLEAN OffloadCapability
;
86 /// TRUE if the adapter supports multipath I/O (MPIO) for its iSCSI
89 BOOLEAN iScsiMpioCapability
;
91 /// TRUE if the adapter is currently configured to boot from iSCSI
94 BOOLEAN iScsiIpv4Boot
;
96 /// TRUE if the adapter is currently configured to boot from iSCSI
99 BOOLEAN iScsiIpv6Boot
;
101 /// TRUE if the adapter is currently configured to boot from FCoE targets.
104 } EFI_ADAPTER_INFO_NETWORK_BOOT
;
107 /// EFI_ADAPTER_INFO_SAN_MAC_ADDRESS
111 /// Returns the SAN MAC address for the adapter.For adapters that support today's 802.3 ethernet
112 /// networking and Fibre-Channel Over Ethernet (FCOE), this conveys the FCOE SAN MAC address from the adapter.
114 EFI_MAC_ADDRESS SanMacAddress
;
115 } EFI_ADAPTER_INFO_SAN_MAC_ADDRESS
;
118 /// EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT
122 /// Returns capability of UNDI to support IPv6 traffic.
125 } EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT
;
128 Returns the current state information for the adapter.
130 This function returns information of type InformationType from the adapter.
131 If an adapter does not support the requested informational type, then
132 EFI_UNSUPPORTED is returned.
134 @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.
135 @param[in] InformationType A pointer to an EFI_GUID that defines the contents of InformationBlock.
136 @param[out] InforamtionBlock The service returns a pointer to the buffer with the InformationBlock
137 structure which contains details about the data specific to InformationType.
138 @param[out] InforamtionBlockSize The driver returns the size of the InformationBlock in bytes.
140 @retval EFI_SUCCESS The InformationType information was retrieved.
141 @retval EFI_UNSUPPORTED The InformationType is not known.
142 @retval EFI_DEVICE_ERROR The device reported an error.
143 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
144 @retval EFI_INVALID_PARAMETER This is NULL.
145 @retval EFI_INVALID_PARAMETER InformationBlock is NULL.
146 @retval EFI_INVALID_PARAMETER InformationBlockSize is NULL.
151 (EFIAPI
*EFI_ADAPTER_INFO_GET_INFO
)(
152 IN EFI_ADAPTER_INFORMATION_PROTOCOL
*This
,
153 IN EFI_GUID
*InformationType
,
154 OUT VOID
**InformationBlock
,
155 OUT UINTN
*InformationBlockSize
159 Sets state information for an adapter.
161 This function sends information of type InformationType for an adapter.
162 If an adapter does not support the requested information type, then EFI_UNSUPPORTED
165 @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.
166 @param[in] InformationType A pointer to an EFI_GUID that defines the contents of InformationBlock.
167 @param[in] InforamtionBlock A pointer to the InformationBlock structure which contains details
168 about the data specific to InformationType.
169 @param[in] InforamtionBlockSize The size of the InformationBlock in bytes.
171 @retval EFI_SUCCESS The information was received and interpreted successfully.
172 @retval EFI_UNSUPPORTED The InformationType is not known.
173 @retval EFI_DEVICE_ERROR The device reported an error.
174 @retval EFI_INVALID_PARAMETER This is NULL.
175 @retval EFI_INVALID_PARAMETER InformationBlock is NULL.
176 @retval EFI_WRITE_PROTECTED The InformationType cannot be modified using EFI_ADAPTER_INFO_SET_INFO().
181 (EFIAPI
*EFI_ADAPTER_INFO_SET_INFO
)(
182 IN EFI_ADAPTER_INFORMATION_PROTOCOL
*This
,
183 IN EFI_GUID
*InformationType
,
184 IN VOID
*InformationBlock
,
185 IN UINTN InformationBlockSize
189 Get a list of supported information types for this instance of the protocol.
191 This function returns a list of InformationType GUIDs that are supported on an
192 adapter with this instance of EFI_ADAPTER_INFORMATION_PROTOCOL. The list is returned
193 in InfoTypesBuffer, and the number of GUID pointers in InfoTypesBuffer is returned in
194 InfoTypesBufferCount.
196 @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.
197 @param[out] InfoTypesBuffer A pointer to the array of InformationType GUIDs that are supported
199 @param[out] InfoTypesBufferCount A pointer to the number of GUIDs present in InfoTypesBuffer.
201 @retval EFI_SUCCESS The list of information type GUIDs that are supported on this adapter was
202 returned in InfoTypesBuffer. The number of information type GUIDs was
203 returned in InfoTypesBufferCount.
204 @retval EFI_INVALID_PARAMETER This is NULL.
205 @retval EFI_INVALID_PARAMETER InfoTypesBuffer is NULL.
206 @retval EFI_INVALID_PARAMETER InfoTypesBufferCount is NULL.
207 @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the results.
212 (EFIAPI
*EFI_ADAPTER_INFO_GET_SUPPORTED_TYPES
)(
213 IN EFI_ADAPTER_INFORMATION_PROTOCOL
*This
,
214 OUT EFI_GUID
**InfoTypesBuffer
,
215 OUT UINTN
*InfoTypesBufferCount
219 /// EFI_ADAPTER_INFORMATION_PROTOCOL
220 /// The protocol for adapter provides the following services.
221 /// - Gets device state information from adapter.
222 /// - Sets device information for adapter.
223 /// - Gets a list of supported information types for this instance of the protocol.
225 struct _EFI_ADAPTER_INFORMATION_PROTOCOL
{
226 EFI_ADAPTER_INFO_GET_INFO GetInformation
;
227 EFI_ADAPTER_INFO_SET_INFO SetInformation
;
228 EFI_ADAPTER_INFO_GET_SUPPORTED_TYPES GetSupportedTypes
;
231 extern EFI_GUID gEfiAdapterInformationProtocolGuid
;
233 extern EFI_GUID gEfiAdapterInfoMediaStateGuid
;
235 extern EFI_GUID gEfiAdapterInfoNetworkBootGuid
;
237 extern EFI_GUID gEfiAdapterInfoSanMacAddressGuid
;
239 extern EFI_GUID gEfiAdapterInfoUndiIpv6SupportGuid
;