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, 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 typedef struct _EFI_ADAPTER_INFORMATION_PROTOCOL EFI_ADAPTER_INFORMATION_PROTOCOL
;
47 /// EFI_ADAPTER_INFO_MEDIA_STATE
51 /// Returns the current media state status. MediaState can have any of the following values:
52 /// EFI_SUCCESS: There is media attached to the network adapter. EFI_NOT_READY: This detects a bounced state.
53 /// There was media attached to the network adapter, but it was removed and reattached. EFI_NO_MEDIA: There is
54 /// not any media attached to the network.
56 EFI_STATUS MediaState
;
57 }EFI_ADAPTER_INFO_MEDIA_STATE
;
60 /// EFI_ADAPTER_INFO_NETWORK_BOOT
64 /// TRUE if the adapter supports booting from iSCSI IPv4 targets.
66 BOOLEAN iScsiIpv4BootCapablity
;
68 /// TRUE if the adapter supports booting from iSCSI IPv6 targets.
70 BOOLEAN iScsiIpv6BootCapablity
;
72 /// TRUE if the adapter supports booting from FCoE targets.
74 BOOLEAN FCoeBootCapablity
;
76 /// TRUE if the adapter supports an offload engine (such as TCP
77 /// Offload Engine (TOE)) for its iSCSI or FCoE boot operations.
79 BOOLEAN OffloadCapability
;
81 /// TRUE if the adapter supports multipath I/O (MPIO) for its iSCSI
84 BOOLEAN iScsiMpioCapability
;
86 /// TRUE if the adapter is currently configured to boot from iSCSI
89 BOOLEAN iScsiIpv4Boot
;
91 /// TRUE if the adapter is currently configured to boot from iSCSI
94 BOOLEAN iScsiIpv6Boot
;
96 /// TRUE if the adapter is currently configured to boot from FCoE targets.
99 }EFI_ADAPTER_INFO_NETWORK_BOOT
;
102 /// EFI_ADAPTER_INFO_SAN_MAC_ADDRESS
106 /// Returns the SAN MAC address for the adapter.For adapters that support today's 802.3 ethernet
107 /// networking and Fibre-Channel Over Ethernet (FCOE), this conveys the FCOE SAN MAC address from the adapter.
109 EFI_MAC_ADDRESS SanMacAddress
;
110 }EFI_ADAPTER_INFO_SAN_MAC_ADDRESS
;
113 Returns the current state information for the adapter.
115 This function returns information of type InformationType from the adapter.
116 If an adapter does not support the requested informational type, then
117 EFI_UNSUPPORTED is returned.
119 @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.
120 @param[in] InformationType A pointer to an EFI_GUID that defines the contents of InformationBlock.
121 @param[out] InforamtionBlock The service returns a pointer to the buffer with the InformationBlock
122 structure which contains details about the data specific to InformationType.
123 @param[out] InforamtionBlockSize The driver returns the size of the InformationBlock in bytes.
125 @retval EFI_SUCCESS The InformationType information was retrieved.
126 @retval EFI_UNSUPPORTED The InformationType is not known.
127 @retval EFI_DEVICE_ERROR The device reported an error.
128 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
129 @retval EFI_INVALID_PARAMETER This is NULL.
130 @retval EFI_INVALID_PARAMETER InformationBlock is NULL.
131 @retval EFI_INVALID_PARAMETER InformationBlockSize is NULL.
136 (EFIAPI
*EFI_ADAPTER_INFO_GET_INFO
)(
137 IN EFI_ADAPTER_INFORMATION_PROTOCOL
*This
,
138 IN EFI_GUID
*InformationType
,
139 OUT VOID
**InformationBlock
,
140 OUT UINTN
*InformationBlockSize
144 Sets state information for an adapter.
146 This function sends information of type InformationType for an adapter.
147 If an adapter does not support the requested information type, then EFI_UNSUPPORTED
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[in] InforamtionBlock A pointer to the InformationBlock structure which contains details
153 about the data specific to InformationType.
154 @param[in] InforamtionBlockSize The size of the InformationBlock in bytes.
156 @retval EFI_SUCCESS The information was received and interpreted successfully.
157 @retval EFI_UNSUPPORTED The InformationType is not known.
158 @retval EFI_DEVICE_ERROR The device reported an error.
159 @retval EFI_INVALID_PARAMETER This is NULL.
160 @retval EFI_INVALID_PARAMETER InformationBlock is NULL.
161 @retval EFI_WRITE_PROTECTED The InformationType cannot be modified using EFI_ADAPTER_INFO_SET_INFO().
166 (EFIAPI
*EFI_ADAPTER_INFO_SET_INFO
)(
167 IN EFI_ADAPTER_INFORMATION_PROTOCOL
*This
,
168 IN EFI_GUID
*InformationType
,
169 IN VOID
*InformationBlock
,
170 IN UINTN InformationBlockSize
174 Get a list of supported information types for this instance of the protocol.
176 This function returns a list of InformationType GUIDs that are supported on an
177 adapter with this instance of EFI_ADAPTER_INFORMATION_PROTOCOL. The list is returned
178 in InfoTypesBuffer, and the number of GUID pointers in InfoTypesBuffer is returned in
179 InfoTypesBufferCount.
181 @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.
182 @param[out] InfoTypesBuffer A pointer to the array of InformationType GUIDs that are supported
184 @param[out] InfoTypesBufferCount A pointer to the number of GUIDs present in InfoTypesBuffer.
186 @retval EFI_SUCCESS The list of information type GUIDs that are supported on this adapter was
187 returned in InfoTypesBuffer. The number of information type GUIDs was
188 returned in InfoTypesBufferCount.
189 @retval EFI_INVALID_PARAMETER This is NULL.
190 @retval EFI_INVALID_PARAMETER InfoTypesBuffer is NULL.
191 @retval EFI_INVALID_PARAMETER InfoTypesBufferCount is NULL.
192 @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the results.
197 (EFIAPI
*EFI_ADAPTER_INFO_GET_SUPPORTED_TYPES
)(
198 IN EFI_ADAPTER_INFORMATION_PROTOCOL
*This
,
199 OUT EFI_GUID
**InfoTypesBuffer
,
200 OUT UINTN
*InfoTypesBufferCount
204 /// EFI_ADAPTER_INFORMATION_PROTOCOL
205 /// The protocol for adapter provides the following services.
206 /// - Gets device state information from adapter.
207 /// - Sets device information for adapter.
208 /// - Gets a list of supported information types for this instance of the protocol.
210 struct _EFI_ADAPTER_INFORMATION_PROTOCOL
{
211 EFI_ADAPTER_INFO_GET_INFO GetInformation
;
212 EFI_ADAPTER_INFO_SET_INFO SetInformation
;
213 EFI_ADAPTER_INFO_GET_SUPPORTED_TYPES GetSupportedTypes
;
216 extern EFI_GUID gEfiAdapterInformationProtocolGuid
;
218 extern EFI_GUID gEfiAdapterInfoMediaStateGuid
;
220 extern EFI_GUID gEfiAdapterInfoNetworkBootGuid
;
222 extern EFI_GUID gEfiAdapterInfoSanMacAddressGuid
;