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