]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/AdapterInformation.h
Add IPV6 support from UNDI
[mirror_edk2.git] / MdePkg / Include / Protocol / AdapterInformation.h
CommitLineData
66bd412a
SQ
1/** @file\r
2 EFI Adapter Information Protocol definition.\r
3 The EFI Adapter Information Protocol is used to dynamically and quickly discover\r
4 or set device information for an adapter.\r
5\r
2bbe9553 6 Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>\r
66bd412a
SQ
7 This program and the accompanying materials\r
8 are licensed and made available under the terms and conditions of the BSD License\r
9 which accompanies this distribution. The full text of the license may be found at\r
10 http://opensource.org/licenses/bsd-license.php\r
11\r
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14\r
15 @par Revision Reference:\r
16 This Protocol is introduced in UEFI Specification 2.4\r
17\r
18**/\r
19\r
20#ifndef __EFI_ADAPTER_INFORMATION_PROTOCOL_H__\r
21#define __EFI_ADAPTER_INFORMATION_PROTOCOL_H__\r
22\r
23\r
24#define EFI_ADAPTER_INFORMATION_PROTOCOL_GUID \\r
25 { \\r
26 0xE5DD1403, 0xD622, 0xC24E, {0x84, 0x88, 0xC7, 0x1B, 0x17, 0xF5, 0xE8, 0x02 } \\r
27 }\r
28\r
29#define EFI_ADAPTER_INFO_MEDIA_STATE_GUID \\r
30 { \\r
31 0xD7C74207, 0xA831, 0x4A26, {0xB1, 0xF5, 0xD1, 0x93, 0x06, 0x5C, 0xE8, 0xB6 } \\r
32 }\r
33\r
34#define EFI_ADAPTER_INFO_NETWORK_BOOT_GUID \\r
35 { \\r
36 0x1FBD2960, 0x4130, 0x41E5, {0x94, 0xAC, 0xD2, 0xCF, 0x03, 0x7F, 0xB3, 0x7C } \\r
37 }\r
38\r
39#define EFI_ADAPTER_INFO_SAN_MAC_ADDRESS_GUID \\r
40 { \\r
41 0x114da5ef, 0x2cf1, 0x4e12, {0x9b, 0xbb, 0xc4, 0x70, 0xb5, 0x52, 0x5, 0xd9 } \\r
42 }\r
43\r
2bbe9553
YT
44#define EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT_GUID \\r
45 { \\r
46 0x4bd56be3, 0x4975, 0x4d8a, {0xa0, 0xad, 0xc4, 0x91, 0x20, 0x4b, 0x5d, 0x4d} \\r
47 }\r
48\r
66bd412a
SQ
49typedef struct _EFI_ADAPTER_INFORMATION_PROTOCOL EFI_ADAPTER_INFORMATION_PROTOCOL;\r
50\r
51///\r
52/// EFI_ADAPTER_INFO_MEDIA_STATE\r
53///\r
54typedef struct {\r
55 ///\r
56 /// Returns the current media state status. MediaState can have any of the following values: \r
57 /// EFI_SUCCESS: There is media attached to the network adapter. EFI_NOT_READY: This detects a bounced state. \r
58 /// There was media attached to the network adapter, but it was removed and reattached. EFI_NO_MEDIA: There is \r
59 /// not any media attached to the network.\r
60 ///\r
61 EFI_STATUS MediaState;\r
2bbe9553 62} EFI_ADAPTER_INFO_MEDIA_STATE;\r
66bd412a
SQ
63\r
64///\r
65/// EFI_ADAPTER_INFO_NETWORK_BOOT\r
66///\r
67typedef struct {\r
68 ///\r
69 /// TRUE if the adapter supports booting from iSCSI IPv4 targets.\r
70 ///\r
7771be9f 71 BOOLEAN iScsiIpv4BootCapablity;\r
66bd412a
SQ
72 ///\r
73 /// TRUE if the adapter supports booting from iSCSI IPv6 targets.\r
74 ///\r
75 BOOLEAN iScsiIpv6BootCapablity;\r
76 ///\r
77 /// TRUE if the adapter supports booting from FCoE targets.\r
78 ///\r
79 BOOLEAN FCoeBootCapablity;\r
80 ///\r
81 /// TRUE if the adapter supports an offload engine (such as TCP\r
82 /// Offload Engine (TOE)) for its iSCSI or FCoE boot operations.\r
83 ///\r
84 BOOLEAN OffloadCapability;\r
85 ///\r
86 /// TRUE if the adapter supports multipath I/O (MPIO) for its iSCSI\r
87 /// boot operations.\r
88 ///\r
89 BOOLEAN iScsiMpioCapability;\r
90 ///\r
91 /// TRUE if the adapter is currently configured to boot from iSCSI\r
92 /// IPv4 targets.\r
93 ///\r
94 BOOLEAN iScsiIpv4Boot;\r
95 ///\r
96 /// TRUE if the adapter is currently configured to boot from iSCSI\r
97 /// IPv6 targets.\r
98 ///\r
99 BOOLEAN iScsiIpv6Boot;\r
100 ///\r
101 /// TRUE if the adapter is currently configured to boot from FCoE targets.\r
102 ///\r
103 BOOLEAN FCoeBoot;\r
2bbe9553 104} EFI_ADAPTER_INFO_NETWORK_BOOT;\r
66bd412a
SQ
105\r
106///\r
107/// EFI_ADAPTER_INFO_SAN_MAC_ADDRESS\r
108///\r
109typedef struct {\r
110 ///\r
111 /// Returns the SAN MAC address for the adapter.For adapters that support today's 802.3 ethernet\r
112 /// networking and Fibre-Channel Over Ethernet (FCOE), this conveys the FCOE SAN MAC address from the adapter.\r
113 ///\r
114 EFI_MAC_ADDRESS SanMacAddress;\r
2bbe9553
YT
115} EFI_ADAPTER_INFO_SAN_MAC_ADDRESS;\r
116\r
117///\r
118/// EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT\r
119///\r
120typedef struct {\r
121 ///\r
122 /// Returns capability of UNDI to support IPv6 traffic.\r
123 ///\r
124 BOOLEAN Ipv6Support; \r
125} EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT;\r
66bd412a
SQ
126\r
127/**\r
128 Returns the current state information for the adapter.\r
129\r
130 This function returns information of type InformationType from the adapter.\r
131 If an adapter does not support the requested informational type, then\r
132 EFI_UNSUPPORTED is returned. \r
133\r
134 @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.\r
135 @param[in] InformationType A pointer to an EFI_GUID that defines the contents of InformationBlock.\r
136 @param[out] InforamtionBlock The service returns a pointer to the buffer with the InformationBlock\r
137 structure which contains details about the data specific to InformationType.\r
138 @param[out] InforamtionBlockSize The driver returns the size of the InformationBlock in bytes.\r
139\r
140 @retval EFI_SUCCESS The InformationType information was retrieved.\r
141 @retval EFI_UNSUPPORTED The InformationType is not known.\r
142 @retval EFI_DEVICE_ERROR The device reported an error.\r
143 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
144 @retval EFI_INVALID_PARAMETER This is NULL. \r
145 @retval EFI_INVALID_PARAMETER InformationBlock is NULL. \r
146 @retval EFI_INVALID_PARAMETER InformationBlockSize is NULL.\r
147\r
148**/\r
149typedef\r
150EFI_STATUS\r
151(EFIAPI *EFI_ADAPTER_INFO_GET_INFO)(\r
152 IN EFI_ADAPTER_INFORMATION_PROTOCOL *This,\r
153 IN EFI_GUID *InformationType,\r
154 OUT VOID **InformationBlock,\r
155 OUT UINTN *InformationBlockSize\r
156 );\r
157\r
158/**\r
159 Sets state information for an adapter.\r
160\r
161 This function sends information of type InformationType for an adapter.\r
162 If an adapter does not support the requested information type, then EFI_UNSUPPORTED\r
163 is returned.\r
164\r
165 @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.\r
166 @param[in] InformationType A pointer to an EFI_GUID that defines the contents of InformationBlock.\r
167 @param[in] InforamtionBlock A pointer to the InformationBlock structure which contains details\r
168 about the data specific to InformationType.\r
169 @param[in] InforamtionBlockSize The size of the InformationBlock in bytes.\r
170\r
171 @retval EFI_SUCCESS The information was received and interpreted successfully.\r
172 @retval EFI_UNSUPPORTED The InformationType is not known.\r
173 @retval EFI_DEVICE_ERROR The device reported an error.\r
174 @retval EFI_INVALID_PARAMETER This is NULL.\r
175 @retval EFI_INVALID_PARAMETER InformationBlock is NULL.\r
176 @retval EFI_WRITE_PROTECTED The InformationType cannot be modified using EFI_ADAPTER_INFO_SET_INFO().\r
177\r
178**/\r
179typedef\r
180EFI_STATUS\r
181(EFIAPI *EFI_ADAPTER_INFO_SET_INFO)(\r
182 IN EFI_ADAPTER_INFORMATION_PROTOCOL *This,\r
183 IN EFI_GUID *InformationType,\r
184 IN VOID *InformationBlock,\r
185 IN UINTN InformationBlockSize\r
186 );\r
187\r
188/**\r
189 Get a list of supported information types for this instance of the protocol.\r
190\r
191 This function returns a list of InformationType GUIDs that are supported on an\r
192 adapter with this instance of EFI_ADAPTER_INFORMATION_PROTOCOL. The list is returned\r
193 in InfoTypesBuffer, and the number of GUID pointers in InfoTypesBuffer is returned in\r
194 InfoTypesBufferCount.\r
195\r
196 @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.\r
46d491d2 197 @param[out] InfoTypesBuffer A pointer to the array of InformationType GUIDs that are supported\r
66bd412a 198 by This.\r
46d491d2 199 @param[out] InfoTypesBufferCount A pointer to the number of GUIDs present in InfoTypesBuffer.\r
66bd412a
SQ
200\r
201 @retval EFI_SUCCESS The list of information type GUIDs that are supported on this adapter was\r
202 returned in InfoTypesBuffer. The number of information type GUIDs was\r
203 returned in InfoTypesBufferCount.\r
204 @retval EFI_INVALID_PARAMETER This is NULL.\r
205 @retval EFI_INVALID_PARAMETER InfoTypesBuffer is NULL.\r
206 @retval EFI_INVALID_PARAMETER InfoTypesBufferCount is NULL.\r
207 @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the results.\r
208\r
209**/\r
210typedef\r
211EFI_STATUS\r
212(EFIAPI *EFI_ADAPTER_INFO_GET_SUPPORTED_TYPES)(\r
213 IN EFI_ADAPTER_INFORMATION_PROTOCOL *This,\r
214 OUT EFI_GUID **InfoTypesBuffer,\r
215 OUT UINTN *InfoTypesBufferCount\r
216 );\r
217\r
218///\r
219/// EFI_ADAPTER_INFORMATION_PROTOCOL\r
220/// The protocol for adapter provides the following services.\r
221/// - Gets device state information from adapter.\r
222/// - Sets device information for adapter.\r
223/// - Gets a list of supported information types for this instance of the protocol.\r
224///\r
e27ecde7 225struct _EFI_ADAPTER_INFORMATION_PROTOCOL {\r
66bd412a
SQ
226 EFI_ADAPTER_INFO_GET_INFO GetInformation;\r
227 EFI_ADAPTER_INFO_SET_INFO SetInformation;\r
228 EFI_ADAPTER_INFO_GET_SUPPORTED_TYPES GetSupportedTypes;\r
229};\r
230\r
231extern EFI_GUID gEfiAdapterInformationProtocolGuid;\r
232\r
233extern EFI_GUID gEfiAdapterInfoMediaStateGuid;\r
234\r
235extern EFI_GUID gEfiAdapterInfoNetworkBootGuid;\r
236\r
237extern EFI_GUID gEfiAdapterInfoSanMacAddressGuid;\r
238\r
2bbe9553
YT
239extern EFI_GUID gEfiAdapterInfoUndiIpv6SupportGuid;\r
240\r
66bd412a 241#endif\r