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 - 2018, 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 #define EFI_ADAPTER_INFO_MEDIA_TYPE_GUID \
51 0x8484472f, 0x71ec, 0x411a, { 0xb3, 0x9c, 0x62, 0xcd, 0x94, 0xd9, 0x91, 0x6e } \
55 typedef struct _EFI_ADAPTER_INFORMATION_PROTOCOL EFI_ADAPTER_INFORMATION_PROTOCOL
;
58 /// EFI_ADAPTER_INFO_MEDIA_STATE
62 /// Returns the current media state status. MediaState can have any of the following values:
63 /// EFI_SUCCESS: There is media attached to the network adapter. EFI_NOT_READY: This detects a bounced state.
64 /// There was media attached to the network adapter, but it was removed and reattached. EFI_NO_MEDIA: There is
65 /// not any media attached to the network.
67 EFI_STATUS MediaState
;
68 } EFI_ADAPTER_INFO_MEDIA_STATE
;
71 /// EFI_ADAPTER_INFO_MEDIA_TYPE
75 /// Indicates the current media type. MediaType can have any of the following values:
76 /// 1: Ethernet Network Adapter
77 /// 2: Ethernet Wireless Network Adapter
81 } EFI_ADAPTER_INFO_MEDIA_TYPE
;
84 /// EFI_ADAPTER_INFO_NETWORK_BOOT
88 /// TRUE if the adapter supports booting from iSCSI IPv4 targets.
90 BOOLEAN iScsiIpv4BootCapablity
;
92 /// TRUE if the adapter supports booting from iSCSI IPv6 targets.
94 BOOLEAN iScsiIpv6BootCapablity
;
96 /// TRUE if the adapter supports booting from FCoE targets.
98 BOOLEAN FCoeBootCapablity
;
100 /// TRUE if the adapter supports an offload engine (such as TCP
101 /// Offload Engine (TOE)) for its iSCSI or FCoE boot operations.
103 BOOLEAN OffloadCapability
;
105 /// TRUE if the adapter supports multipath I/O (MPIO) for its iSCSI
108 BOOLEAN iScsiMpioCapability
;
110 /// TRUE if the adapter is currently configured to boot from iSCSI
113 BOOLEAN iScsiIpv4Boot
;
115 /// TRUE if the adapter is currently configured to boot from iSCSI
118 BOOLEAN iScsiIpv6Boot
;
120 /// TRUE if the adapter is currently configured to boot from FCoE targets.
123 } EFI_ADAPTER_INFO_NETWORK_BOOT
;
126 /// EFI_ADAPTER_INFO_SAN_MAC_ADDRESS
130 /// Returns the SAN MAC address for the adapter.For adapters that support today's 802.3 ethernet
131 /// networking and Fibre-Channel Over Ethernet (FCOE), this conveys the FCOE SAN MAC address from the adapter.
133 EFI_MAC_ADDRESS SanMacAddress
;
134 } EFI_ADAPTER_INFO_SAN_MAC_ADDRESS
;
137 /// EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT
141 /// Returns capability of UNDI to support IPv6 traffic.
144 } EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT
;
147 Returns the current state information for the adapter.
149 This function returns information of type InformationType from the adapter.
150 If an adapter does not support the requested informational type, then
151 EFI_UNSUPPORTED is returned.
153 @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.
154 @param[in] InformationType A pointer to an EFI_GUID that defines the contents of InformationBlock.
155 @param[out] InforamtionBlock The service returns a pointer to the buffer with the InformationBlock
156 structure which contains details about the data specific to InformationType.
157 @param[out] InforamtionBlockSize The driver returns the size of the InformationBlock in bytes.
159 @retval EFI_SUCCESS The InformationType information was retrieved.
160 @retval EFI_UNSUPPORTED The InformationType is not known.
161 @retval EFI_DEVICE_ERROR The device reported an error.
162 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
163 @retval EFI_INVALID_PARAMETER This is NULL.
164 @retval EFI_INVALID_PARAMETER InformationBlock is NULL.
165 @retval EFI_INVALID_PARAMETER InformationBlockSize is NULL.
170 (EFIAPI
*EFI_ADAPTER_INFO_GET_INFO
)(
171 IN EFI_ADAPTER_INFORMATION_PROTOCOL
*This
,
172 IN EFI_GUID
*InformationType
,
173 OUT VOID
**InformationBlock
,
174 OUT UINTN
*InformationBlockSize
178 Sets state information for an adapter.
180 This function sends information of type InformationType for an adapter.
181 If an adapter does not support the requested information type, then EFI_UNSUPPORTED
184 @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.
185 @param[in] InformationType A pointer to an EFI_GUID that defines the contents of InformationBlock.
186 @param[in] InforamtionBlock A pointer to the InformationBlock structure which contains details
187 about the data specific to InformationType.
188 @param[in] InforamtionBlockSize The size of the InformationBlock in bytes.
190 @retval EFI_SUCCESS The information was received and interpreted successfully.
191 @retval EFI_UNSUPPORTED The InformationType is not known.
192 @retval EFI_DEVICE_ERROR The device reported an error.
193 @retval EFI_INVALID_PARAMETER This is NULL.
194 @retval EFI_INVALID_PARAMETER InformationBlock is NULL.
195 @retval EFI_WRITE_PROTECTED The InformationType cannot be modified using EFI_ADAPTER_INFO_SET_INFO().
200 (EFIAPI
*EFI_ADAPTER_INFO_SET_INFO
)(
201 IN EFI_ADAPTER_INFORMATION_PROTOCOL
*This
,
202 IN EFI_GUID
*InformationType
,
203 IN VOID
*InformationBlock
,
204 IN UINTN InformationBlockSize
208 Get a list of supported information types for this instance of the protocol.
210 This function returns a list of InformationType GUIDs that are supported on an
211 adapter with this instance of EFI_ADAPTER_INFORMATION_PROTOCOL. The list is returned
212 in InfoTypesBuffer, and the number of GUID pointers in InfoTypesBuffer is returned in
213 InfoTypesBufferCount.
215 @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.
216 @param[out] InfoTypesBuffer A pointer to the array of InformationType GUIDs that are supported
218 @param[out] InfoTypesBufferCount A pointer to the number of GUIDs present in InfoTypesBuffer.
220 @retval EFI_SUCCESS The list of information type GUIDs that are supported on this adapter was
221 returned in InfoTypesBuffer. The number of information type GUIDs was
222 returned in InfoTypesBufferCount.
223 @retval EFI_INVALID_PARAMETER This is NULL.
224 @retval EFI_INVALID_PARAMETER InfoTypesBuffer is NULL.
225 @retval EFI_INVALID_PARAMETER InfoTypesBufferCount is NULL.
226 @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the results.
231 (EFIAPI
*EFI_ADAPTER_INFO_GET_SUPPORTED_TYPES
)(
232 IN EFI_ADAPTER_INFORMATION_PROTOCOL
*This
,
233 OUT EFI_GUID
**InfoTypesBuffer
,
234 OUT UINTN
*InfoTypesBufferCount
238 /// EFI_ADAPTER_INFORMATION_PROTOCOL
239 /// The protocol for adapter provides the following services.
240 /// - Gets device state information from adapter.
241 /// - Sets device information for adapter.
242 /// - Gets a list of supported information types for this instance of the protocol.
244 struct _EFI_ADAPTER_INFORMATION_PROTOCOL
{
245 EFI_ADAPTER_INFO_GET_INFO GetInformation
;
246 EFI_ADAPTER_INFO_SET_INFO SetInformation
;
247 EFI_ADAPTER_INFO_GET_SUPPORTED_TYPES GetSupportedTypes
;
250 extern EFI_GUID gEfiAdapterInformationProtocolGuid
;
252 extern EFI_GUID gEfiAdapterInfoMediaStateGuid
;
254 extern EFI_GUID gEfiAdapterInfoNetworkBootGuid
;
256 extern EFI_GUID gEfiAdapterInfoSanMacAddressGuid
;
258 extern EFI_GUID gEfiAdapterInfoUndiIpv6SupportGuid
;