]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/AdapterInformation.h
MdePkg FirmwareManagement.h: Fix typo EFI_SECURITY_VIOLATIO
[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
d51b0122 6 Copyright (c) 2014 - 2017, 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
d51b0122
WF
49#define EFI_ADAPTER_INFO_MEDIA_TYPE_GUID \\r
50 { \\r
51 0x8484472f, 0x71ec, 0x411a, { 0xb3, 0x9c, 0x62, 0xcd, 0x94, 0xd9, 0x91, 0x6e } \\r
52 }\r
53\r
54\r
66bd412a
SQ
55typedef struct _EFI_ADAPTER_INFORMATION_PROTOCOL EFI_ADAPTER_INFORMATION_PROTOCOL;\r
56\r
57///\r
58/// EFI_ADAPTER_INFO_MEDIA_STATE\r
59///\r
60typedef struct {\r
61 ///\r
62 /// Returns the current media state status. MediaState can have any of the following values: \r
63 /// EFI_SUCCESS: There is media attached to the network adapter. EFI_NOT_READY: This detects a bounced state. \r
64 /// There was media attached to the network adapter, but it was removed and reattached. EFI_NO_MEDIA: There is \r
65 /// not any media attached to the network.\r
66 ///\r
67 EFI_STATUS MediaState;\r
2bbe9553 68} EFI_ADAPTER_INFO_MEDIA_STATE;\r
66bd412a 69\r
d51b0122
WF
70///\r
71/// EFI_ADAPTER_INFO_MEDIA_TYPE\r
72///\r
73typedef struct {\r
74 ///\r
75 /// Indicates the current media type. MediaType can have any of the following values:\r
76 /// 1: Ethernet Network Adapter\r
77 /// 2: Ethernet Wireless Network Adapter\r
78 /// 3~255: Reserved\r
79 ///\r
80 UINT8 MediaType;\r
81} EFI_ADAPTER_INFO_MEDIA_TYPE;\r
82\r
66bd412a
SQ
83///\r
84/// EFI_ADAPTER_INFO_NETWORK_BOOT\r
85///\r
86typedef struct {\r
87 ///\r
88 /// TRUE if the adapter supports booting from iSCSI IPv4 targets.\r
89 ///\r
7771be9f 90 BOOLEAN iScsiIpv4BootCapablity;\r
66bd412a
SQ
91 ///\r
92 /// TRUE if the adapter supports booting from iSCSI IPv6 targets.\r
93 ///\r
94 BOOLEAN iScsiIpv6BootCapablity;\r
95 ///\r
96 /// TRUE if the adapter supports booting from FCoE targets.\r
97 ///\r
98 BOOLEAN FCoeBootCapablity;\r
99 ///\r
100 /// TRUE if the adapter supports an offload engine (such as TCP\r
101 /// Offload Engine (TOE)) for its iSCSI or FCoE boot operations.\r
102 ///\r
103 BOOLEAN OffloadCapability;\r
104 ///\r
105 /// TRUE if the adapter supports multipath I/O (MPIO) for its iSCSI\r
106 /// boot operations.\r
107 ///\r
108 BOOLEAN iScsiMpioCapability;\r
109 ///\r
110 /// TRUE if the adapter is currently configured to boot from iSCSI\r
111 /// IPv4 targets.\r
112 ///\r
113 BOOLEAN iScsiIpv4Boot;\r
114 ///\r
115 /// TRUE if the adapter is currently configured to boot from iSCSI\r
116 /// IPv6 targets.\r
117 ///\r
118 BOOLEAN iScsiIpv6Boot;\r
119 ///\r
120 /// TRUE if the adapter is currently configured to boot from FCoE targets.\r
121 ///\r
122 BOOLEAN FCoeBoot;\r
2bbe9553 123} EFI_ADAPTER_INFO_NETWORK_BOOT;\r
66bd412a
SQ
124\r
125///\r
126/// EFI_ADAPTER_INFO_SAN_MAC_ADDRESS\r
127///\r
128typedef struct {\r
129 ///\r
130 /// Returns the SAN MAC address for the adapter.For adapters that support today's 802.3 ethernet\r
131 /// networking and Fibre-Channel Over Ethernet (FCOE), this conveys the FCOE SAN MAC address from the adapter.\r
132 ///\r
133 EFI_MAC_ADDRESS SanMacAddress;\r
2bbe9553
YT
134} EFI_ADAPTER_INFO_SAN_MAC_ADDRESS;\r
135\r
136///\r
137/// EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT\r
138///\r
139typedef struct {\r
140 ///\r
141 /// Returns capability of UNDI to support IPv6 traffic.\r
142 ///\r
143 BOOLEAN Ipv6Support; \r
144} EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT;\r
66bd412a
SQ
145\r
146/**\r
147 Returns the current state information for the adapter.\r
148\r
149 This function returns information of type InformationType from the adapter.\r
150 If an adapter does not support the requested informational type, then\r
151 EFI_UNSUPPORTED is returned. \r
152\r
153 @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.\r
154 @param[in] InformationType A pointer to an EFI_GUID that defines the contents of InformationBlock.\r
155 @param[out] InforamtionBlock The service returns a pointer to the buffer with the InformationBlock\r
156 structure which contains details about the data specific to InformationType.\r
157 @param[out] InforamtionBlockSize The driver returns the size of the InformationBlock in bytes.\r
158\r
159 @retval EFI_SUCCESS The InformationType information was retrieved.\r
160 @retval EFI_UNSUPPORTED The InformationType is not known.\r
161 @retval EFI_DEVICE_ERROR The device reported an error.\r
162 @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r
163 @retval EFI_INVALID_PARAMETER This is NULL. \r
164 @retval EFI_INVALID_PARAMETER InformationBlock is NULL. \r
165 @retval EFI_INVALID_PARAMETER InformationBlockSize is NULL.\r
166\r
167**/\r
168typedef\r
169EFI_STATUS\r
170(EFIAPI *EFI_ADAPTER_INFO_GET_INFO)(\r
171 IN EFI_ADAPTER_INFORMATION_PROTOCOL *This,\r
172 IN EFI_GUID *InformationType,\r
173 OUT VOID **InformationBlock,\r
174 OUT UINTN *InformationBlockSize\r
175 );\r
176\r
177/**\r
178 Sets state information for an adapter.\r
179\r
180 This function sends information of type InformationType for an adapter.\r
181 If an adapter does not support the requested information type, then EFI_UNSUPPORTED\r
182 is returned.\r
183\r
184 @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.\r
185 @param[in] InformationType A pointer to an EFI_GUID that defines the contents of InformationBlock.\r
186 @param[in] InforamtionBlock A pointer to the InformationBlock structure which contains details\r
187 about the data specific to InformationType.\r
188 @param[in] InforamtionBlockSize The size of the InformationBlock in bytes.\r
189\r
190 @retval EFI_SUCCESS The information was received and interpreted successfully.\r
191 @retval EFI_UNSUPPORTED The InformationType is not known.\r
192 @retval EFI_DEVICE_ERROR The device reported an error.\r
193 @retval EFI_INVALID_PARAMETER This is NULL.\r
194 @retval EFI_INVALID_PARAMETER InformationBlock is NULL.\r
195 @retval EFI_WRITE_PROTECTED The InformationType cannot be modified using EFI_ADAPTER_INFO_SET_INFO().\r
196\r
197**/\r
198typedef\r
199EFI_STATUS\r
200(EFIAPI *EFI_ADAPTER_INFO_SET_INFO)(\r
201 IN EFI_ADAPTER_INFORMATION_PROTOCOL *This,\r
202 IN EFI_GUID *InformationType,\r
203 IN VOID *InformationBlock,\r
204 IN UINTN InformationBlockSize\r
205 );\r
206\r
207/**\r
208 Get a list of supported information types for this instance of the protocol.\r
209\r
210 This function returns a list of InformationType GUIDs that are supported on an\r
211 adapter with this instance of EFI_ADAPTER_INFORMATION_PROTOCOL. The list is returned\r
212 in InfoTypesBuffer, and the number of GUID pointers in InfoTypesBuffer is returned in\r
213 InfoTypesBufferCount.\r
214\r
215 @param[in] This A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.\r
46d491d2 216 @param[out] InfoTypesBuffer A pointer to the array of InformationType GUIDs that are supported\r
66bd412a 217 by This.\r
46d491d2 218 @param[out] InfoTypesBufferCount A pointer to the number of GUIDs present in InfoTypesBuffer.\r
66bd412a
SQ
219\r
220 @retval EFI_SUCCESS The list of information type GUIDs that are supported on this adapter was\r
221 returned in InfoTypesBuffer. The number of information type GUIDs was\r
222 returned in InfoTypesBufferCount.\r
223 @retval EFI_INVALID_PARAMETER This is NULL.\r
224 @retval EFI_INVALID_PARAMETER InfoTypesBuffer is NULL.\r
225 @retval EFI_INVALID_PARAMETER InfoTypesBufferCount is NULL.\r
226 @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the results.\r
227\r
228**/\r
229typedef\r
230EFI_STATUS\r
231(EFIAPI *EFI_ADAPTER_INFO_GET_SUPPORTED_TYPES)(\r
232 IN EFI_ADAPTER_INFORMATION_PROTOCOL *This,\r
233 OUT EFI_GUID **InfoTypesBuffer,\r
234 OUT UINTN *InfoTypesBufferCount\r
235 );\r
236\r
237///\r
238/// EFI_ADAPTER_INFORMATION_PROTOCOL\r
239/// The protocol for adapter provides the following services.\r
240/// - Gets device state information from adapter.\r
241/// - Sets device information for adapter.\r
242/// - Gets a list of supported information types for this instance of the protocol.\r
243///\r
e27ecde7 244struct _EFI_ADAPTER_INFORMATION_PROTOCOL {\r
66bd412a
SQ
245 EFI_ADAPTER_INFO_GET_INFO GetInformation;\r
246 EFI_ADAPTER_INFO_SET_INFO SetInformation;\r
247 EFI_ADAPTER_INFO_GET_SUPPORTED_TYPES GetSupportedTypes;\r
248};\r
249\r
250extern EFI_GUID gEfiAdapterInformationProtocolGuid;\r
251\r
252extern EFI_GUID gEfiAdapterInfoMediaStateGuid;\r
253\r
254extern EFI_GUID gEfiAdapterInfoNetworkBootGuid;\r
255\r
256extern EFI_GUID gEfiAdapterInfoSanMacAddressGuid;\r
257\r
2bbe9553
YT
258extern EFI_GUID gEfiAdapterInfoUndiIpv6SupportGuid;\r
259\r
66bd412a 260#endif\r