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