VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Include/Protocol/AdapterInformation.h

最後變更 在這個檔案是 105670,由 vboxsync 提交於 7 月 前

Devices/EFI/FirmwareNew: Merge edk2-stable-202405 and make it build on aarch64, bugref:4643

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette