]>
Commit | Line | Data |
---|---|---|
7dbc50bd YZ |
1 | /** @file\r |
2 | The device path protocol as defined in UEFI 2.0.\r | |
3 | \r | |
4 | The device path represents a programmatic path to a device,\r | |
5 | from a software point of view. The path must persist from boot to boot, so\r | |
6 | it can not contain things like PCI bus numbers that change from boot to boot.\r | |
7 | \r | |
20203d3f | 8 | Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>\r |
2e351cbe | 9 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
7dbc50bd YZ |
10 | \r |
11 | **/\r | |
12 | \r | |
13 | #ifndef __EFI_DEVICE_PATH_H__\r | |
14 | #define __EFI_DEVICE_PATH_H__\r | |
15 | \r | |
16 | #include <Guid/PcAnsi.h>\r | |
17 | #include <IndustryStandard/Acpi3_0.h>\r | |
18 | #include <IndustryStandard/Bluetooth.h>\r | |
19 | \r | |
20 | ///\r | |
21 | /// Device Path protocol.\r | |
22 | ///\r | |
23 | #define EFI_DEVICE_PATH_PROTOCOL_GUID \\r | |
24 | { \\r | |
25 | 0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \\r | |
26 | }\r | |
27 | \r | |
28 | ///\r | |
29 | /// Device Path guid definition for backward-compatible with EFI1.1.\r | |
30 | ///\r | |
31 | #define DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH_PROTOCOL_GUID\r | |
32 | \r | |
33 | #pragma pack(1)\r | |
34 | \r | |
20203d3f YZ |
35 | #if defined(_MSC_EXTENSIONS)\r |
36 | //\r | |
37 | // Disable warning when last field of data structure is a zero sized array.\r | |
38 | //\r | |
39 | #pragma warning ( disable : 4200 )\r | |
40 | #endif\r | |
41 | \r | |
7dbc50bd YZ |
42 | /**\r |
43 | This protocol can be used on any device handle to obtain generic path/location\r | |
44 | information concerning the physical device or logical device. If the handle does\r | |
45 | not logically map to a physical device, the handle may not necessarily support\r | |
46 | the device path protocol. The device path describes the location of the device\r | |
47 | the handle is for. The size of the Device Path can be determined from the structures\r | |
48 | that make up the Device Path.\r | |
49 | **/\r | |
50 | typedef struct {\r | |
51 | UINT8 Type; ///< 0x01 Hardware Device Path.\r | |
52 | ///< 0x02 ACPI Device Path.\r | |
53 | ///< 0x03 Messaging Device Path.\r | |
54 | ///< 0x04 Media Device Path.\r | |
55 | ///< 0x05 BIOS Boot Specification Device Path.\r | |
56 | ///< 0x7F End of Hardware Device Path.\r | |
57 | \r | |
58 | UINT8 SubType; ///< Varies by Type\r | |
59 | ///< 0xFF End Entire Device Path, or\r | |
60 | ///< 0x01 End This Instance of a Device Path and start a new\r | |
61 | ///< Device Path.\r | |
62 | \r | |
63 | UINT8 Length[2]; ///< Specific Device Path data. Type and Sub-Type define\r | |
64 | ///< type of data. Size of data is included in Length.\r | |
65 | \r | |
66 | } EFI_DEVICE_PATH_PROTOCOL;\r | |
67 | \r | |
68 | ///\r | |
69 | /// Device Path protocol definition for backward-compatible with EFI1.1.\r | |
70 | ///\r | |
71 | typedef EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH;\r | |
72 | \r | |
73 | ///\r | |
74 | /// Hardware Device Paths.\r | |
75 | ///\r | |
76 | #define HARDWARE_DEVICE_PATH 0x01\r | |
77 | \r | |
78 | ///\r | |
79 | /// PCI Device Path SubType.\r | |
80 | ///\r | |
81 | #define HW_PCI_DP 0x01\r | |
82 | \r | |
83 | ///\r | |
84 | /// PCI Device Path.\r | |
85 | ///\r | |
86 | typedef struct {\r | |
87 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
88 | ///\r | |
89 | /// PCI Function Number.\r | |
90 | ///\r | |
91 | UINT8 Function;\r | |
92 | ///\r | |
93 | /// PCI Device Number.\r | |
94 | ///\r | |
95 | UINT8 Device;\r | |
96 | } PCI_DEVICE_PATH;\r | |
97 | \r | |
98 | ///\r | |
99 | /// PCCARD Device Path SubType.\r | |
100 | ///\r | |
101 | #define HW_PCCARD_DP 0x02\r | |
102 | \r | |
103 | ///\r | |
104 | /// PCCARD Device Path.\r | |
105 | ///\r | |
106 | typedef struct {\r | |
107 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
108 | ///\r | |
109 | /// Function Number (0 = First Function).\r | |
110 | ///\r | |
111 | UINT8 FunctionNumber;\r | |
112 | } PCCARD_DEVICE_PATH;\r | |
113 | \r | |
114 | ///\r | |
115 | /// Memory Mapped Device Path SubType.\r | |
116 | ///\r | |
117 | #define HW_MEMMAP_DP 0x03\r | |
118 | \r | |
119 | ///\r | |
120 | /// Memory Mapped Device Path.\r | |
121 | ///\r | |
122 | typedef struct {\r | |
123 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
124 | ///\r | |
125 | /// EFI_MEMORY_TYPE\r | |
126 | ///\r | |
127 | UINT32 MemoryType;\r | |
128 | ///\r | |
129 | /// Starting Memory Address.\r | |
130 | ///\r | |
131 | EFI_PHYSICAL_ADDRESS StartingAddress;\r | |
132 | ///\r | |
133 | /// Ending Memory Address.\r | |
134 | ///\r | |
135 | EFI_PHYSICAL_ADDRESS EndingAddress;\r | |
136 | } MEMMAP_DEVICE_PATH;\r | |
137 | \r | |
138 | ///\r | |
139 | /// Hardware Vendor Device Path SubType.\r | |
140 | ///\r | |
141 | #define HW_VENDOR_DP 0x04\r | |
142 | \r | |
143 | ///\r | |
144 | /// The Vendor Device Path allows the creation of vendor-defined Device Paths. A vendor must\r | |
145 | /// allocate a Vendor GUID for a Device Path. The Vendor GUID can then be used to define the\r | |
146 | /// contents on the n bytes that follow in the Vendor Device Path node.\r | |
147 | ///\r | |
148 | typedef struct {\r | |
149 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
150 | ///\r | |
151 | /// Vendor-assigned GUID that defines the data that follows.\r | |
152 | ///\r | |
153 | EFI_GUID Guid;\r | |
154 | ///\r | |
155 | /// Vendor-defined variable size data.\r | |
156 | ///\r | |
157 | } VENDOR_DEVICE_PATH;\r | |
158 | \r | |
159 | ///\r | |
160 | /// Controller Device Path SubType.\r | |
161 | ///\r | |
162 | #define HW_CONTROLLER_DP 0x05\r | |
163 | \r | |
164 | ///\r | |
165 | /// Controller Device Path.\r | |
166 | ///\r | |
167 | typedef struct {\r | |
168 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
169 | ///\r | |
170 | /// Controller number.\r | |
171 | ///\r | |
172 | UINT32 ControllerNumber;\r | |
173 | } CONTROLLER_DEVICE_PATH;\r | |
174 | \r | |
175 | ///\r | |
176 | /// BMC Device Path SubType.\r | |
177 | ///\r | |
178 | #define HW_BMC_DP 0x06\r | |
179 | \r | |
180 | ///\r | |
181 | /// BMC Device Path.\r | |
182 | ///\r | |
183 | typedef struct {\r | |
184 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
185 | ///\r | |
186 | /// Interface Type.\r | |
187 | ///\r | |
188 | UINT8 InterfaceType;\r | |
189 | ///\r | |
190 | /// Base Address.\r | |
191 | ///\r | |
192 | UINT8 BaseAddress[8];\r | |
193 | } BMC_DEVICE_PATH;\r | |
194 | \r | |
195 | ///\r | |
196 | /// ACPI Device Paths.\r | |
197 | ///\r | |
198 | #define ACPI_DEVICE_PATH 0x02\r | |
199 | \r | |
200 | ///\r | |
201 | /// ACPI Device Path SubType.\r | |
202 | ///\r | |
203 | #define ACPI_DP 0x01\r | |
204 | typedef struct {\r | |
205 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
206 | ///\r | |
207 | /// Device's PnP hardware ID stored in a numeric 32-bit\r | |
208 | /// compressed EISA-type ID. This value must match the\r | |
209 | /// corresponding _HID in the ACPI name space.\r | |
210 | ///\r | |
211 | UINT32 HID;\r | |
212 | ///\r | |
213 | /// Unique ID that is required by ACPI if two devices have the\r | |
214 | /// same _HID. This value must also match the corresponding\r | |
215 | /// _UID/_HID pair in the ACPI name space. Only the 32-bit\r | |
216 | /// numeric value type of _UID is supported. Thus, strings must\r | |
217 | /// not be used for the _UID in the ACPI name space.\r | |
218 | ///\r | |
219 | UINT32 UID;\r | |
220 | } ACPI_HID_DEVICE_PATH;\r | |
221 | \r | |
222 | ///\r | |
223 | /// Expanded ACPI Device Path SubType.\r | |
224 | ///\r | |
225 | #define ACPI_EXTENDED_DP 0x02\r | |
226 | typedef struct {\r | |
227 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
228 | ///\r | |
229 | /// Device's PnP hardware ID stored in a numeric 32-bit\r | |
230 | /// compressed EISA-type ID. This value must match the\r | |
231 | /// corresponding _HID in the ACPI name space.\r | |
232 | ///\r | |
233 | UINT32 HID;\r | |
234 | ///\r | |
235 | /// Unique ID that is required by ACPI if two devices have the\r | |
236 | /// same _HID. This value must also match the corresponding\r | |
237 | /// _UID/_HID pair in the ACPI name space.\r | |
238 | ///\r | |
239 | UINT32 UID;\r | |
240 | ///\r | |
241 | /// Device's compatible PnP hardware ID stored in a numeric\r | |
242 | /// 32-bit compressed EISA-type ID. This value must match at\r | |
243 | /// least one of the compatible device IDs returned by the\r | |
244 | /// corresponding _CID in the ACPI name space.\r | |
245 | ///\r | |
246 | UINT32 CID;\r | |
247 | ///\r | |
248 | /// Optional variable length _HIDSTR.\r | |
249 | /// Optional variable length _UIDSTR.\r | |
250 | /// Optional variable length _CIDSTR.\r | |
251 | ///\r | |
252 | } ACPI_EXTENDED_HID_DEVICE_PATH;\r | |
253 | \r | |
254 | //\r | |
255 | // EISA ID Macro\r | |
256 | // EISA ID Definition 32-bits\r | |
257 | // bits[15:0] - three character compressed ASCII EISA ID.\r | |
258 | // bits[31:16] - binary number\r | |
259 | // Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'\r | |
260 | //\r | |
261 | #define PNP_EISA_ID_CONST 0x41d0\r | |
262 | #define EISA_ID(_Name, _Num) ((UINT32)((_Name) | (_Num) << 16))\r | |
263 | #define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))\r | |
264 | #define EFI_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))\r | |
265 | \r | |
266 | #define PNP_EISA_ID_MASK 0xffff\r | |
267 | #define EISA_ID_TO_NUM(_Id) ((_Id) >> 16)\r | |
268 | \r | |
269 | ///\r | |
270 | /// ACPI _ADR Device Path SubType.\r | |
271 | ///\r | |
272 | #define ACPI_ADR_DP 0x03\r | |
273 | \r | |
274 | ///\r | |
275 | /// The _ADR device path is used to contain video output device attributes to support the Graphics\r | |
276 | /// Output Protocol. The device path can contain multiple _ADR entries if multiple video output\r | |
277 | /// devices are displaying the same output.\r | |
278 | ///\r | |
279 | typedef struct {\r | |
280 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
281 | ///\r | |
282 | /// _ADR value. For video output devices the value of this\r | |
283 | /// field comes from Table B-2 of the ACPI 3.0 specification. At\r | |
284 | /// least one _ADR value is required.\r | |
285 | ///\r | |
286 | UINT32 ADR;\r | |
287 | //\r | |
288 | // This device path may optionally contain more than one _ADR entry.\r | |
289 | //\r | |
290 | } ACPI_ADR_DEVICE_PATH;\r | |
291 | \r | |
292 | #define ACPI_ADR_DISPLAY_TYPE_OTHER 0\r | |
293 | #define ACPI_ADR_DISPLAY_TYPE_VGA 1\r | |
294 | #define ACPI_ADR_DISPLAY_TYPE_TV 2\r | |
295 | #define ACPI_ADR_DISPLAY_TYPE_EXTERNAL_DIGITAL 3\r | |
296 | #define ACPI_ADR_DISPLAY_TYPE_INTERNAL_DIGITAL 4\r | |
297 | \r | |
298 | #define ACPI_DISPLAY_ADR(_DeviceIdScheme, _HeadId, _NonVgaOutput, _BiosCanDetect, _VendorInfo, _Type, _Port, _Index) \\r | |
299 | ((UINT32)( ((UINT32)((_DeviceIdScheme) & 0x1) << 31) | \\r | |
300 | (((_HeadId) & 0x7) << 18) | \\r | |
301 | (((_NonVgaOutput) & 0x1) << 17) | \\r | |
302 | (((_BiosCanDetect) & 0x1) << 16) | \\r | |
303 | (((_VendorInfo) & 0xf) << 12) | \\r | |
304 | (((_Type) & 0xf) << 8) | \\r | |
305 | (((_Port) & 0xf) << 4) | \\r | |
306 | ((_Index) & 0xf) ))\r | |
307 | \r | |
308 | ///\r | |
309 | /// Messaging Device Paths.\r | |
310 | /// This Device Path is used to describe the connection of devices outside the resource domain of the\r | |
311 | /// system. This Device Path can describe physical messaging information like SCSI ID, or abstract\r | |
312 | /// information like networking protocol IP addresses.\r | |
313 | ///\r | |
314 | #define MESSAGING_DEVICE_PATH 0x03\r | |
315 | \r | |
316 | ///\r | |
317 | /// ATAPI Device Path SubType\r | |
318 | ///\r | |
319 | #define MSG_ATAPI_DP 0x01\r | |
320 | typedef struct {\r | |
321 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
322 | ///\r | |
323 | /// Set to zero for primary, or one for secondary.\r | |
324 | ///\r | |
325 | UINT8 PrimarySecondary;\r | |
326 | ///\r | |
327 | /// Set to zero for master, or one for slave mode.\r | |
328 | ///\r | |
329 | UINT8 SlaveMaster;\r | |
330 | ///\r | |
331 | /// Logical Unit Number.\r | |
332 | ///\r | |
333 | UINT16 Lun;\r | |
334 | } ATAPI_DEVICE_PATH;\r | |
335 | \r | |
336 | ///\r | |
337 | /// SCSI Device Path SubType.\r | |
338 | ///\r | |
339 | #define MSG_SCSI_DP 0x02\r | |
340 | typedef struct {\r | |
341 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
342 | ///\r | |
343 | /// Target ID on the SCSI bus (PUN).\r | |
344 | ///\r | |
345 | UINT16 Pun;\r | |
346 | ///\r | |
347 | /// Logical Unit Number (LUN).\r | |
348 | ///\r | |
349 | UINT16 Lun;\r | |
350 | } SCSI_DEVICE_PATH;\r | |
351 | \r | |
352 | ///\r | |
353 | /// Fibre Channel SubType.\r | |
354 | ///\r | |
355 | #define MSG_FIBRECHANNEL_DP 0x03\r | |
356 | typedef struct {\r | |
357 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
358 | ///\r | |
359 | /// Reserved for the future.\r | |
360 | ///\r | |
361 | UINT32 Reserved;\r | |
362 | ///\r | |
363 | /// Fibre Channel World Wide Number.\r | |
364 | ///\r | |
365 | UINT64 WWN;\r | |
366 | ///\r | |
367 | /// Fibre Channel Logical Unit Number.\r | |
368 | ///\r | |
369 | UINT64 Lun;\r | |
370 | } FIBRECHANNEL_DEVICE_PATH;\r | |
371 | \r | |
372 | ///\r | |
373 | /// Fibre Channel Ex SubType.\r | |
374 | ///\r | |
375 | #define MSG_FIBRECHANNELEX_DP 0x15\r | |
376 | typedef struct {\r | |
377 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
378 | ///\r | |
379 | /// Reserved for the future.\r | |
380 | ///\r | |
381 | UINT32 Reserved;\r | |
382 | ///\r | |
383 | /// 8 byte array containing Fibre Channel End Device Port Name.\r | |
384 | ///\r | |
385 | UINT8 WWN[8];\r | |
386 | ///\r | |
387 | /// 8 byte array containing Fibre Channel Logical Unit Number.\r | |
388 | ///\r | |
389 | UINT8 Lun[8];\r | |
390 | } FIBRECHANNELEX_DEVICE_PATH;\r | |
391 | \r | |
392 | ///\r | |
393 | /// 1394 Device Path SubType\r | |
394 | ///\r | |
395 | #define MSG_1394_DP 0x04\r | |
396 | typedef struct {\r | |
397 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
398 | ///\r | |
399 | /// Reserved for the future.\r | |
400 | ///\r | |
401 | UINT32 Reserved;\r | |
402 | ///\r | |
403 | /// 1394 Global Unique ID (GUID).\r | |
404 | ///\r | |
405 | UINT64 Guid;\r | |
406 | } F1394_DEVICE_PATH;\r | |
407 | \r | |
408 | ///\r | |
409 | /// USB Device Path SubType.\r | |
410 | ///\r | |
411 | #define MSG_USB_DP 0x05\r | |
412 | typedef struct {\r | |
413 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
414 | ///\r | |
415 | /// USB Parent Port Number.\r | |
416 | ///\r | |
417 | UINT8 ParentPortNumber;\r | |
418 | ///\r | |
419 | /// USB Interface Number.\r | |
420 | ///\r | |
421 | UINT8 InterfaceNumber;\r | |
422 | } USB_DEVICE_PATH;\r | |
423 | \r | |
424 | ///\r | |
425 | /// USB Class Device Path SubType.\r | |
426 | ///\r | |
427 | #define MSG_USB_CLASS_DP 0x0f\r | |
428 | typedef struct {\r | |
429 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
430 | ///\r | |
431 | /// Vendor ID assigned by USB-IF. A value of 0xFFFF will\r | |
432 | /// match any Vendor ID.\r | |
433 | ///\r | |
434 | UINT16 VendorId;\r | |
435 | ///\r | |
436 | /// Product ID assigned by USB-IF. A value of 0xFFFF will\r | |
437 | /// match any Product ID.\r | |
438 | ///\r | |
439 | UINT16 ProductId;\r | |
440 | ///\r | |
441 | /// The class code assigned by the USB-IF. A value of 0xFF\r | |
442 | /// will match any class code.\r | |
443 | ///\r | |
444 | UINT8 DeviceClass;\r | |
445 | ///\r | |
446 | /// The subclass code assigned by the USB-IF. A value of\r | |
447 | /// 0xFF will match any subclass code.\r | |
448 | ///\r | |
449 | UINT8 DeviceSubClass;\r | |
450 | ///\r | |
451 | /// The protocol code assigned by the USB-IF. A value of\r | |
452 | /// 0xFF will match any protocol code.\r | |
453 | ///\r | |
454 | UINT8 DeviceProtocol;\r | |
455 | } USB_CLASS_DEVICE_PATH;\r | |
456 | \r | |
457 | ///\r | |
458 | /// USB WWID Device Path SubType.\r | |
459 | ///\r | |
460 | #define MSG_USB_WWID_DP 0x10\r | |
461 | \r | |
462 | ///\r | |
463 | /// This device path describes a USB device using its serial number.\r | |
464 | ///\r | |
465 | typedef struct {\r | |
466 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
467 | ///\r | |
468 | /// USB interface number.\r | |
469 | ///\r | |
470 | UINT16 InterfaceNumber;\r | |
471 | ///\r | |
472 | /// USB vendor id of the device.\r | |
473 | ///\r | |
474 | UINT16 VendorId;\r | |
475 | ///\r | |
476 | /// USB product id of the device.\r | |
477 | ///\r | |
478 | UINT16 ProductId;\r | |
479 | ///\r | |
480 | /// Last 64-or-fewer UTF-16 characters of the USB\r | |
481 | /// serial number. The length of the string is\r | |
482 | /// determined by the Length field less the offset of the\r | |
483 | /// Serial Number field (10)\r | |
484 | ///\r | |
485 | /// CHAR16 SerialNumber[...];\r | |
486 | } USB_WWID_DEVICE_PATH;\r | |
487 | \r | |
488 | ///\r | |
489 | /// Device Logical Unit SubType.\r | |
490 | ///\r | |
491 | #define MSG_DEVICE_LOGICAL_UNIT_DP 0x11\r | |
492 | typedef struct {\r | |
493 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
494 | ///\r | |
495 | /// Logical Unit Number for the interface.\r | |
496 | ///\r | |
497 | UINT8 Lun;\r | |
498 | } DEVICE_LOGICAL_UNIT_DEVICE_PATH;\r | |
499 | \r | |
500 | ///\r | |
501 | /// SATA Device Path SubType.\r | |
502 | ///\r | |
503 | #define MSG_SATA_DP 0x12\r | |
504 | typedef struct {\r | |
505 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
506 | ///\r | |
507 | /// The HBA port number that facilitates the connection to the\r | |
508 | /// device or a port multiplier. The value 0xFFFF is reserved.\r | |
509 | ///\r | |
510 | UINT16 HBAPortNumber;\r | |
511 | ///\r | |
512 | /// The Port multiplier port number that facilitates the connection\r | |
513 | /// to the device. Must be set to 0xFFFF if the device is directly\r | |
514 | /// connected to the HBA.\r | |
515 | ///\r | |
516 | UINT16 PortMultiplierPortNumber;\r | |
517 | ///\r | |
518 | /// Logical Unit Number.\r | |
519 | ///\r | |
520 | UINT16 Lun;\r | |
521 | } SATA_DEVICE_PATH;\r | |
522 | \r | |
523 | ///\r | |
524 | /// Flag for if the device is directly connected to the HBA.\r | |
525 | ///\r | |
526 | #define SATA_HBA_DIRECT_CONNECT_FLAG 0x8000\r | |
527 | \r | |
528 | ///\r | |
529 | /// I2O Device Path SubType.\r | |
530 | ///\r | |
531 | #define MSG_I2O_DP 0x06\r | |
532 | typedef struct {\r | |
533 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
534 | ///\r | |
535 | /// Target ID (TID) for a device.\r | |
536 | ///\r | |
537 | UINT32 Tid;\r | |
538 | } I2O_DEVICE_PATH;\r | |
539 | \r | |
540 | ///\r | |
541 | /// MAC Address Device Path SubType.\r | |
542 | ///\r | |
543 | #define MSG_MAC_ADDR_DP 0x0b\r | |
544 | typedef struct {\r | |
545 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
546 | ///\r | |
547 | /// The MAC address for a network interface padded with 0s.\r | |
548 | ///\r | |
549 | EFI_MAC_ADDRESS MacAddress;\r | |
550 | ///\r | |
551 | /// Network interface type(i.e. 802.3, FDDI).\r | |
552 | ///\r | |
553 | UINT8 IfType;\r | |
554 | } MAC_ADDR_DEVICE_PATH;\r | |
555 | \r | |
556 | ///\r | |
557 | /// IPv4 Device Path SubType\r | |
558 | ///\r | |
559 | #define MSG_IPv4_DP 0x0c\r | |
560 | typedef struct {\r | |
561 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
562 | ///\r | |
563 | /// The local IPv4 address.\r | |
564 | ///\r | |
565 | EFI_IPv4_ADDRESS LocalIpAddress;\r | |
566 | ///\r | |
567 | /// The remote IPv4 address.\r | |
568 | ///\r | |
569 | EFI_IPv4_ADDRESS RemoteIpAddress;\r | |
570 | ///\r | |
571 | /// The local port number.\r | |
572 | ///\r | |
573 | UINT16 LocalPort;\r | |
574 | ///\r | |
575 | /// The remote port number.\r | |
576 | ///\r | |
577 | UINT16 RemotePort;\r | |
578 | ///\r | |
579 | /// The network protocol(i.e. UDP, TCP).\r | |
580 | ///\r | |
581 | UINT16 Protocol;\r | |
582 | ///\r | |
583 | /// 0x00 - The Source IP Address was assigned though DHCP.\r | |
584 | /// 0x01 - The Source IP Address is statically bound.\r | |
585 | ///\r | |
586 | BOOLEAN StaticIpAddress;\r | |
587 | ///\r | |
588 | /// The gateway IP address\r | |
589 | ///\r | |
590 | EFI_IPv4_ADDRESS GatewayIpAddress;\r | |
591 | ///\r | |
592 | /// The subnet mask\r | |
593 | ///\r | |
594 | EFI_IPv4_ADDRESS SubnetMask;\r | |
595 | } IPv4_DEVICE_PATH;\r | |
596 | \r | |
597 | ///\r | |
598 | /// IPv6 Device Path SubType.\r | |
599 | ///\r | |
600 | #define MSG_IPv6_DP 0x0d\r | |
601 | typedef struct {\r | |
602 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
603 | ///\r | |
604 | /// The local IPv6 address.\r | |
605 | ///\r | |
606 | EFI_IPv6_ADDRESS LocalIpAddress;\r | |
607 | ///\r | |
608 | /// The remote IPv6 address.\r | |
609 | ///\r | |
610 | EFI_IPv6_ADDRESS RemoteIpAddress;\r | |
611 | ///\r | |
612 | /// The local port number.\r | |
613 | ///\r | |
614 | UINT16 LocalPort;\r | |
615 | ///\r | |
616 | /// The remote port number.\r | |
617 | ///\r | |
618 | UINT16 RemotePort;\r | |
619 | ///\r | |
620 | /// The network protocol(i.e. UDP, TCP).\r | |
621 | ///\r | |
622 | UINT16 Protocol;\r | |
623 | ///\r | |
624 | /// 0x00 - The Local IP Address was manually configured.\r | |
625 | /// 0x01 - The Local IP Address is assigned through IPv6\r | |
626 | /// stateless auto-configuration.\r | |
627 | /// 0x02 - The Local IP Address is assigned through IPv6\r | |
628 | /// stateful configuration.\r | |
629 | ///\r | |
630 | UINT8 IpAddressOrigin;\r | |
631 | ///\r | |
632 | /// The prefix length\r | |
633 | ///\r | |
634 | UINT8 PrefixLength;\r | |
635 | ///\r | |
636 | /// The gateway IP address\r | |
637 | ///\r | |
638 | EFI_IPv6_ADDRESS GatewayIpAddress;\r | |
639 | } IPv6_DEVICE_PATH;\r | |
640 | \r | |
641 | ///\r | |
642 | /// InfiniBand Device Path SubType.\r | |
643 | ///\r | |
644 | #define MSG_INFINIBAND_DP 0x09\r | |
645 | typedef struct {\r | |
646 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
647 | ///\r | |
648 | /// Flags to help identify/manage InfiniBand device path elements:\r | |
649 | /// Bit 0 - IOC/Service (0b = IOC, 1b = Service).\r | |
650 | /// Bit 1 - Extend Boot Environment.\r | |
651 | /// Bit 2 - Console Protocol.\r | |
652 | /// Bit 3 - Storage Protocol.\r | |
653 | /// Bit 4 - Network Protocol.\r | |
654 | /// All other bits are reserved.\r | |
655 | ///\r | |
656 | UINT32 ResourceFlags;\r | |
657 | ///\r | |
658 | /// 128-bit Global Identifier for remote fabric port.\r | |
659 | ///\r | |
660 | UINT8 PortGid[16];\r | |
661 | ///\r | |
662 | /// 64-bit unique identifier to remote IOC or server process.\r | |
663 | /// Interpretation of field specified by Resource Flags (bit 0).\r | |
664 | ///\r | |
665 | UINT64 ServiceId;\r | |
666 | ///\r | |
667 | /// 64-bit persistent ID of remote IOC port.\r | |
668 | ///\r | |
669 | UINT64 TargetPortId;\r | |
670 | ///\r | |
671 | /// 64-bit persistent ID of remote device.\r | |
672 | ///\r | |
673 | UINT64 DeviceId;\r | |
674 | } INFINIBAND_DEVICE_PATH;\r | |
675 | \r | |
676 | #define INFINIBAND_RESOURCE_FLAG_IOC_SERVICE 0x01\r | |
677 | #define INFINIBAND_RESOURCE_FLAG_EXTENDED_BOOT_ENVIRONMENT 0x02\r | |
678 | #define INFINIBAND_RESOURCE_FLAG_CONSOLE_PROTOCOL 0x04\r | |
679 | #define INFINIBAND_RESOURCE_FLAG_STORAGE_PROTOCOL 0x08\r | |
680 | #define INFINIBAND_RESOURCE_FLAG_NETWORK_PROTOCOL 0x10\r | |
681 | \r | |
682 | ///\r | |
683 | /// UART Device Path SubType.\r | |
684 | ///\r | |
685 | #define MSG_UART_DP 0x0e\r | |
686 | typedef struct {\r | |
687 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
688 | ///\r | |
689 | /// Reserved.\r | |
690 | ///\r | |
691 | UINT32 Reserved;\r | |
692 | ///\r | |
693 | /// The baud rate setting for the UART style device. A value of 0\r | |
694 | /// means that the device's default baud rate will be used.\r | |
695 | ///\r | |
696 | UINT64 BaudRate;\r | |
697 | ///\r | |
698 | /// The number of data bits for the UART style device. A value\r | |
699 | /// of 0 means that the device's default number of data bits will be used.\r | |
700 | ///\r | |
701 | UINT8 DataBits;\r | |
702 | ///\r | |
703 | /// The parity setting for the UART style device.\r | |
704 | /// Parity 0x00 - Default Parity.\r | |
705 | /// Parity 0x01 - No Parity.\r | |
706 | /// Parity 0x02 - Even Parity.\r | |
707 | /// Parity 0x03 - Odd Parity.\r | |
708 | /// Parity 0x04 - Mark Parity.\r | |
709 | /// Parity 0x05 - Space Parity.\r | |
710 | ///\r | |
711 | UINT8 Parity;\r | |
712 | ///\r | |
713 | /// The number of stop bits for the UART style device.\r | |
714 | /// Stop Bits 0x00 - Default Stop Bits.\r | |
715 | /// Stop Bits 0x01 - 1 Stop Bit.\r | |
716 | /// Stop Bits 0x02 - 1.5 Stop Bits.\r | |
717 | /// Stop Bits 0x03 - 2 Stop Bits.\r | |
718 | ///\r | |
719 | UINT8 StopBits;\r | |
720 | } UART_DEVICE_PATH;\r | |
721 | \r | |
5c7526f5 OY |
722 | ///\r |
723 | /// NVDIMM Namespace Device Path SubType.\r | |
724 | ///\r | |
725 | #define NVDIMM_NAMESPACE_DP 0x20\r | |
726 | typedef struct {\r | |
727 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
728 | ///\r | |
729 | /// Namespace unique label identifier UUID.\r | |
730 | ///\r | |
731 | EFI_GUID Uuid;\r | |
732 | } NVDIMM_NAMESPACE_DEVICE_PATH;\r | |
733 | \r | |
7dbc50bd YZ |
734 | //\r |
735 | // Use VENDOR_DEVICE_PATH struct\r | |
736 | //\r | |
737 | #define MSG_VENDOR_DP 0x0a\r | |
738 | typedef VENDOR_DEVICE_PATH VENDOR_DEFINED_DEVICE_PATH;\r | |
739 | \r | |
740 | #define DEVICE_PATH_MESSAGING_PC_ANSI EFI_PC_ANSI_GUID\r | |
741 | #define DEVICE_PATH_MESSAGING_VT_100 EFI_VT_100_GUID\r | |
742 | #define DEVICE_PATH_MESSAGING_VT_100_PLUS EFI_VT_100_PLUS_GUID\r | |
743 | #define DEVICE_PATH_MESSAGING_VT_UTF8 EFI_VT_UTF8_GUID\r | |
744 | \r | |
745 | ///\r | |
746 | /// A new device path node is defined to declare flow control characteristics.\r | |
747 | /// UART Flow Control Messaging Device Path\r | |
748 | ///\r | |
749 | typedef struct {\r | |
750 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
751 | ///\r | |
752 | /// DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL GUID.\r | |
753 | ///\r | |
754 | EFI_GUID Guid;\r | |
755 | ///\r | |
756 | /// Bitmap of supported flow control types.\r | |
757 | /// Bit 0 set indicates hardware flow control.\r | |
758 | /// Bit 1 set indicates Xon/Xoff flow control.\r | |
759 | /// All other bits are reserved and are clear.\r | |
760 | ///\r | |
761 | UINT32 FlowControlMap;\r | |
762 | } UART_FLOW_CONTROL_DEVICE_PATH;\r | |
763 | \r | |
764 | #define UART_FLOW_CONTROL_HARDWARE 0x00000001\r | |
765 | #define UART_FLOW_CONTROL_XON_XOFF 0x00000010\r | |
766 | \r | |
767 | #define DEVICE_PATH_MESSAGING_SAS EFI_SAS_DEVICE_PATH_GUID\r | |
768 | ///\r | |
769 | /// Serial Attached SCSI (SAS) Device Path.\r | |
770 | ///\r | |
771 | typedef struct {\r | |
772 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
773 | ///\r | |
774 | /// DEVICE_PATH_MESSAGING_SAS GUID.\r | |
775 | ///\r | |
776 | EFI_GUID Guid;\r | |
777 | ///\r | |
778 | /// Reserved for future use.\r | |
779 | ///\r | |
780 | UINT32 Reserved;\r | |
781 | ///\r | |
782 | /// SAS Address for Serial Attached SCSI Target.\r | |
783 | ///\r | |
784 | UINT64 SasAddress;\r | |
785 | ///\r | |
786 | /// SAS Logical Unit Number.\r | |
787 | ///\r | |
788 | UINT64 Lun;\r | |
789 | ///\r | |
790 | /// More Information about the device and its interconnect.\r | |
791 | ///\r | |
792 | UINT16 DeviceTopology;\r | |
793 | ///\r | |
794 | /// Relative Target Port (RTP).\r | |
795 | ///\r | |
796 | UINT16 RelativeTargetPort;\r | |
797 | } SAS_DEVICE_PATH;\r | |
798 | \r | |
799 | ///\r | |
800 | /// Serial Attached SCSI (SAS) Ex Device Path SubType\r | |
801 | ///\r | |
802 | #define MSG_SASEX_DP 0x16\r | |
803 | typedef struct {\r | |
804 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
805 | ///\r | |
806 | /// 8-byte array of the SAS Address for Serial Attached SCSI Target Port.\r | |
807 | ///\r | |
808 | UINT8 SasAddress[8];\r | |
809 | ///\r | |
810 | /// 8-byte array of the SAS Logical Unit Number.\r | |
811 | ///\r | |
812 | UINT8 Lun[8];\r | |
813 | ///\r | |
814 | /// More Information about the device and its interconnect.\r | |
815 | ///\r | |
816 | UINT16 DeviceTopology;\r | |
817 | ///\r | |
818 | /// Relative Target Port (RTP).\r | |
819 | ///\r | |
820 | UINT16 RelativeTargetPort;\r | |
821 | } SASEX_DEVICE_PATH;\r | |
822 | \r | |
823 | ///\r | |
824 | /// NvmExpress Namespace Device Path SubType.\r | |
825 | ///\r | |
826 | #define MSG_NVME_NAMESPACE_DP 0x17\r | |
827 | typedef struct {\r | |
828 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
829 | UINT32 NamespaceId;\r | |
830 | UINT64 NamespaceUuid;\r | |
831 | } NVME_NAMESPACE_DEVICE_PATH;\r | |
832 | \r | |
833 | ///\r | |
834 | /// DNS Device Path SubType\r | |
835 | ///\r | |
836 | #define MSG_DNS_DP 0x1F\r | |
837 | typedef struct {\r | |
838 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
839 | ///\r | |
840 | /// Indicates the DNS server address is IPv4 or IPv6 address.\r | |
841 | ///\r | |
842 | UINT8 IsIPv6;\r | |
843 | ///\r | |
844 | /// Instance of the DNS server address.\r | |
845 | ///\r | |
20203d3f | 846 | EFI_IP_ADDRESS DnsServerIp[];\r |
7dbc50bd YZ |
847 | } DNS_DEVICE_PATH;\r |
848 | \r | |
849 | ///\r | |
850 | /// Uniform Resource Identifiers (URI) Device Path SubType\r | |
851 | ///\r | |
852 | #define MSG_URI_DP 0x18\r | |
853 | typedef struct {\r | |
854 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
855 | ///\r | |
856 | /// Instance of the URI pursuant to RFC 3986.\r | |
857 | ///\r | |
20203d3f | 858 | CHAR8 Uri[];\r |
7dbc50bd YZ |
859 | } URI_DEVICE_PATH;\r |
860 | \r | |
861 | ///\r | |
862 | /// Universal Flash Storage (UFS) Device Path SubType.\r | |
863 | ///\r | |
864 | #define MSG_UFS_DP 0x19\r | |
865 | typedef struct {\r | |
866 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
867 | ///\r | |
868 | /// Target ID on the UFS bus (PUN).\r | |
869 | ///\r | |
870 | UINT8 Pun;\r | |
871 | ///\r | |
872 | /// Logical Unit Number (LUN).\r | |
873 | ///\r | |
874 | UINT8 Lun;\r | |
875 | } UFS_DEVICE_PATH;\r | |
876 | \r | |
877 | ///\r | |
878 | /// SD (Secure Digital) Device Path SubType.\r | |
879 | ///\r | |
880 | #define MSG_SD_DP 0x1A\r | |
881 | typedef struct {\r | |
882 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
883 | UINT8 SlotNumber;\r | |
884 | } SD_DEVICE_PATH;\r | |
885 | \r | |
886 | ///\r | |
887 | /// EMMC (Embedded MMC) Device Path SubType.\r | |
888 | ///\r | |
889 | #define MSG_EMMC_DP 0x1D\r | |
890 | typedef struct {\r | |
891 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
892 | UINT8 SlotNumber;\r | |
893 | } EMMC_DEVICE_PATH;\r | |
894 | \r | |
895 | ///\r | |
896 | /// iSCSI Device Path SubType\r | |
897 | ///\r | |
898 | #define MSG_ISCSI_DP 0x13\r | |
899 | typedef struct {\r | |
900 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
901 | ///\r | |
902 | /// Network Protocol (0 = TCP, 1+ = reserved).\r | |
903 | ///\r | |
904 | UINT16 NetworkProtocol;\r | |
905 | ///\r | |
906 | /// iSCSI Login Options.\r | |
907 | ///\r | |
908 | UINT16 LoginOption;\r | |
909 | ///\r | |
910 | /// iSCSI Logical Unit Number.\r | |
911 | ///\r | |
912 | UINT64 Lun;\r | |
913 | ///\r | |
914 | /// iSCSI Target Portal group tag the initiator intends\r | |
915 | /// to establish a session with.\r | |
916 | ///\r | |
917 | UINT16 TargetPortalGroupTag;\r | |
918 | ///\r | |
919 | /// iSCSI NodeTarget Name. The length of the name\r | |
920 | /// is determined by subtracting the offset of this field from Length.\r | |
921 | ///\r | |
922 | /// CHAR8 iSCSI Target Name.\r | |
923 | } ISCSI_DEVICE_PATH;\r | |
924 | \r | |
925 | #define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST 0x0000\r | |
926 | #define ISCSI_LOGIN_OPTION_HEADER_DIGEST_USING_CRC32C 0x0002\r | |
927 | #define ISCSI_LOGIN_OPTION_NO_DATA_DIGEST 0x0000\r | |
928 | #define ISCSI_LOGIN_OPTION_DATA_DIGEST_USING_CRC32C 0x0008\r | |
929 | #define ISCSI_LOGIN_OPTION_AUTHMETHOD_CHAP 0x0000\r | |
930 | #define ISCSI_LOGIN_OPTION_AUTHMETHOD_NON 0x1000\r | |
931 | #define ISCSI_LOGIN_OPTION_CHAP_BI 0x0000\r | |
932 | #define ISCSI_LOGIN_OPTION_CHAP_UNI 0x2000\r | |
933 | \r | |
934 | ///\r | |
935 | /// VLAN Device Path SubType.\r | |
936 | ///\r | |
937 | #define MSG_VLAN_DP 0x14\r | |
938 | typedef struct {\r | |
939 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
940 | ///\r | |
941 | /// VLAN identifier (0-4094).\r | |
942 | ///\r | |
943 | UINT16 VlanId;\r | |
944 | } VLAN_DEVICE_PATH;\r | |
945 | \r | |
946 | ///\r | |
947 | /// Bluetooth Device Path SubType.\r | |
948 | ///\r | |
949 | #define MSG_BLUETOOTH_DP 0x1b\r | |
950 | typedef struct {\r | |
951 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
952 | ///\r | |
953 | /// 48bit Bluetooth device address.\r | |
954 | ///\r | |
955 | BLUETOOTH_ADDRESS BD_ADDR;\r | |
956 | } BLUETOOTH_DEVICE_PATH;\r | |
957 | \r | |
958 | ///\r | |
959 | /// Wi-Fi Device Path SubType.\r | |
960 | ///\r | |
961 | #define MSG_WIFI_DP 0x1C\r | |
962 | typedef struct {\r | |
963 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
964 | ///\r | |
965 | /// Service set identifier. A 32-byte octets string.\r | |
966 | ///\r | |
967 | UINT8 SSId[32];\r | |
968 | } WIFI_DEVICE_PATH;\r | |
969 | \r | |
970 | ///\r | |
971 | /// Bluetooth LE Device Path SubType.\r | |
972 | ///\r | |
973 | #define MSG_BLUETOOTH_LE_DP 0x1E\r | |
974 | typedef struct {\r | |
975 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
976 | BLUETOOTH_LE_ADDRESS Address;\r | |
977 | } BLUETOOTH_LE_DEVICE_PATH;\r | |
978 | \r | |
979 | //\r | |
980 | // Media Device Path\r | |
981 | //\r | |
982 | #define MEDIA_DEVICE_PATH 0x04\r | |
983 | \r | |
984 | ///\r | |
985 | /// Hard Drive Media Device Path SubType.\r | |
986 | ///\r | |
987 | #define MEDIA_HARDDRIVE_DP 0x01\r | |
988 | \r | |
989 | ///\r | |
990 | /// The Hard Drive Media Device Path is used to represent a partition on a hard drive.\r | |
991 | ///\r | |
992 | typedef struct {\r | |
993 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
994 | ///\r | |
995 | /// Describes the entry in a partition table, starting with entry 1.\r | |
996 | /// Partition number zero represents the entire device. Valid\r | |
997 | /// partition numbers for a MBR partition are [1, 4]. Valid\r | |
998 | /// partition numbers for a GPT partition are [1, NumberOfPartitionEntries].\r | |
999 | ///\r | |
1000 | UINT32 PartitionNumber;\r | |
1001 | ///\r | |
1002 | /// Starting LBA of the partition on the hard drive.\r | |
1003 | ///\r | |
1004 | UINT64 PartitionStart;\r | |
1005 | ///\r | |
1006 | /// Size of the partition in units of Logical Blocks.\r | |
1007 | ///\r | |
1008 | UINT64 PartitionSize;\r | |
1009 | ///\r | |
1010 | /// Signature unique to this partition:\r | |
1011 | /// If SignatureType is 0, this field has to be initialized with 16 zeros.\r | |
1012 | /// If SignatureType is 1, the MBR signature is stored in the first 4 bytes of this field.\r | |
1013 | /// The other 12 bytes are initialized with zeros.\r | |
1014 | /// If SignatureType is 2, this field contains a 16 byte signature.\r | |
1015 | ///\r | |
1016 | UINT8 Signature[16];\r | |
1017 | ///\r | |
1018 | /// Partition Format: (Unused values reserved).\r | |
1019 | /// 0x01 - PC-AT compatible legacy MBR.\r | |
1020 | /// 0x02 - GUID Partition Table.\r | |
1021 | ///\r | |
1022 | UINT8 MBRType;\r | |
1023 | ///\r | |
1024 | /// Type of Disk Signature: (Unused values reserved).\r | |
1025 | /// 0x00 - No Disk Signature.\r | |
1026 | /// 0x01 - 32-bit signature from address 0x1b8 of the type 0x01 MBR.\r | |
1027 | /// 0x02 - GUID signature.\r | |
1028 | ///\r | |
1029 | UINT8 SignatureType;\r | |
1030 | } HARDDRIVE_DEVICE_PATH;\r | |
1031 | \r | |
1032 | #define MBR_TYPE_PCAT 0x01\r | |
1033 | #define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02\r | |
1034 | \r | |
1035 | #define NO_DISK_SIGNATURE 0x00\r | |
1036 | #define SIGNATURE_TYPE_MBR 0x01\r | |
1037 | #define SIGNATURE_TYPE_GUID 0x02\r | |
1038 | \r | |
1039 | ///\r | |
1040 | /// CD-ROM Media Device Path SubType.\r | |
1041 | ///\r | |
1042 | #define MEDIA_CDROM_DP 0x02\r | |
1043 | \r | |
1044 | ///\r | |
1045 | /// The CD-ROM Media Device Path is used to define a system partition that exists on a CD-ROM.\r | |
1046 | ///\r | |
1047 | typedef struct {\r | |
1048 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
1049 | ///\r | |
1050 | /// Boot Entry number from the Boot Catalog. The Initial/Default entry is defined as zero.\r | |
1051 | ///\r | |
1052 | UINT32 BootEntry;\r | |
1053 | ///\r | |
1054 | /// Starting RBA of the partition on the medium. CD-ROMs use Relative logical Block Addressing.\r | |
1055 | ///\r | |
1056 | UINT64 PartitionStart;\r | |
1057 | ///\r | |
1058 | /// Size of the partition in units of Blocks, also called Sectors.\r | |
1059 | ///\r | |
1060 | UINT64 PartitionSize;\r | |
1061 | } CDROM_DEVICE_PATH;\r | |
1062 | \r | |
1063 | //\r | |
1064 | // Use VENDOR_DEVICE_PATH struct\r | |
1065 | //\r | |
1066 | #define MEDIA_VENDOR_DP 0x03 ///< Media vendor device path subtype.\r | |
1067 | \r | |
1068 | ///\r | |
1069 | /// File Path Media Device Path SubType\r | |
1070 | ///\r | |
1071 | #define MEDIA_FILEPATH_DP 0x04\r | |
1072 | typedef struct {\r | |
1073 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
1074 | ///\r | |
1075 | /// A NULL-terminated Path string including directory and file names.\r | |
1076 | ///\r | |
1077 | CHAR16 PathName[1];\r | |
1078 | } FILEPATH_DEVICE_PATH;\r | |
1079 | \r | |
1080 | #define SIZE_OF_FILEPATH_DEVICE_PATH OFFSET_OF(FILEPATH_DEVICE_PATH,PathName)\r | |
1081 | \r | |
1082 | ///\r | |
1083 | /// Media Protocol Device Path SubType.\r | |
1084 | ///\r | |
1085 | #define MEDIA_PROTOCOL_DP 0x05\r | |
1086 | \r | |
1087 | ///\r | |
1088 | /// The Media Protocol Device Path is used to denote the protocol that is being\r | |
1089 | /// used in a device path at the location of the path specified.\r | |
1090 | /// Many protocols are inherent to the style of device path.\r | |
1091 | ///\r | |
1092 | typedef struct {\r | |
1093 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
1094 | ///\r | |
1095 | /// The ID of the protocol.\r | |
1096 | ///\r | |
1097 | EFI_GUID Protocol;\r | |
1098 | } MEDIA_PROTOCOL_DEVICE_PATH;\r | |
1099 | \r | |
1100 | ///\r | |
1101 | /// PIWG Firmware File SubType.\r | |
1102 | ///\r | |
1103 | #define MEDIA_PIWG_FW_FILE_DP 0x06\r | |
1104 | \r | |
1105 | ///\r | |
1106 | /// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware file.\r | |
1107 | ///\r | |
1108 | typedef struct {\r | |
1109 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
1110 | ///\r | |
1111 | /// Firmware file name\r | |
1112 | ///\r | |
1113 | EFI_GUID FvFileName;\r | |
1114 | } MEDIA_FW_VOL_FILEPATH_DEVICE_PATH;\r | |
1115 | \r | |
1116 | ///\r | |
1117 | /// PIWG Firmware Volume Device Path SubType.\r | |
1118 | ///\r | |
1119 | #define MEDIA_PIWG_FW_VOL_DP 0x07\r | |
1120 | \r | |
1121 | ///\r | |
1122 | /// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware volume.\r | |
1123 | ///\r | |
1124 | typedef struct {\r | |
1125 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
1126 | ///\r | |
1127 | /// Firmware volume name.\r | |
1128 | ///\r | |
1129 | EFI_GUID FvName;\r | |
1130 | } MEDIA_FW_VOL_DEVICE_PATH;\r | |
1131 | \r | |
1132 | ///\r | |
1133 | /// Media relative offset range device path.\r | |
1134 | ///\r | |
1135 | #define MEDIA_RELATIVE_OFFSET_RANGE_DP 0x08\r | |
1136 | \r | |
1137 | ///\r | |
1138 | /// Used to describe the offset range of media relative.\r | |
1139 | ///\r | |
1140 | typedef struct {\r | |
1141 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
1142 | UINT32 Reserved;\r | |
1143 | UINT64 StartingOffset;\r | |
1144 | UINT64 EndingOffset;\r | |
1145 | } MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH;\r | |
1146 | \r | |
1147 | ///\r | |
1148 | /// This GUID defines a RAM Disk supporting a raw disk format in volatile memory.\r | |
1149 | ///\r | |
1150 | #define EFI_VIRTUAL_DISK_GUID \\r | |
1151 | { \\r | |
1152 | 0x77AB535A, 0x45FC, 0x624B, {0x55, 0x60, 0xF7, 0xB2, 0x81, 0xD1, 0xF9, 0x6E } \\r | |
1153 | }\r | |
1154 | \r | |
1155 | extern EFI_GUID gEfiVirtualDiskGuid;\r | |
1156 | \r | |
1157 | ///\r | |
1158 | /// This GUID defines a RAM Disk supporting an ISO image in volatile memory.\r | |
1159 | ///\r | |
1160 | #define EFI_VIRTUAL_CD_GUID \\r | |
1161 | { \\r | |
1162 | 0x3D5ABD30, 0x4175, 0x87CE, {0x6D, 0x64, 0xD2, 0xAD, 0xE5, 0x23, 0xC4, 0xBB } \\r | |
1163 | }\r | |
1164 | extern EFI_GUID gEfiVirtualCdGuid;\r | |
1165 | \r | |
1166 | ///\r | |
1167 | /// This GUID defines a RAM Disk supporting a raw disk format in persistent memory.\r | |
1168 | ///\r | |
1169 | #define EFI_PERSISTENT_VIRTUAL_DISK_GUID \\r | |
1170 | { \\r | |
1171 | 0x5CEA02C9, 0x4D07, 0x69D3, {0x26, 0x9F ,0x44, 0x96, 0xFB, 0xE0, 0x96, 0xF9 } \\r | |
1172 | }\r | |
1173 | \r | |
1174 | extern EFI_GUID gEfiPersistentVirtualDiskGuid;\r | |
1175 | \r | |
1176 | ///\r | |
1177 | /// This GUID defines a RAM Disk supporting an ISO image in persistent memory.\r | |
1178 | ///\r | |
1179 | #define EFI_PERSISTENT_VIRTUAL_CD_GUID \\r | |
1180 | { \\r | |
1181 | 0x08018188, 0x42CD, 0xBB48, {0x10, 0x0F, 0x53, 0x87, 0xD5, 0x3D, 0xED, 0x3D } \\r | |
1182 | }\r | |
1183 | \r | |
1184 | extern EFI_GUID gEfiPersistentVirtualCdGuid;\r | |
1185 | \r | |
1186 | ///\r | |
1187 | /// Media ram disk device path.\r | |
1188 | ///\r | |
1189 | #define MEDIA_RAM_DISK_DP 0x09\r | |
1190 | \r | |
1191 | ///\r | |
1192 | /// Used to describe the ram disk device path.\r | |
1193 | ///\r | |
1194 | typedef struct {\r | |
1195 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
1196 | ///\r | |
1197 | /// Starting Memory Address.\r | |
1198 | ///\r | |
1199 | UINT32 StartingAddr[2];\r | |
1200 | ///\r | |
1201 | /// Ending Memory Address.\r | |
1202 | ///\r | |
1203 | UINT32 EndingAddr[2];\r | |
1204 | ///\r | |
1205 | /// GUID that defines the type of the RAM Disk.\r | |
1206 | ///\r | |
1207 | EFI_GUID TypeGuid;\r | |
1208 | ///\r | |
1209 | /// RAM Diskinstance number, if supported. The default value is zero.\r | |
1210 | ///\r | |
1211 | UINT16 Instance;\r | |
1212 | } MEDIA_RAM_DISK_DEVICE_PATH;\r | |
1213 | \r | |
1214 | ///\r | |
1215 | /// BIOS Boot Specification Device Path.\r | |
1216 | ///\r | |
1217 | #define BBS_DEVICE_PATH 0x05\r | |
1218 | \r | |
1219 | ///\r | |
1220 | /// BIOS Boot Specification Device Path SubType.\r | |
1221 | ///\r | |
1222 | #define BBS_BBS_DP 0x01\r | |
1223 | \r | |
1224 | ///\r | |
1225 | /// This Device Path is used to describe the booting of non-EFI-aware operating systems.\r | |
1226 | ///\r | |
1227 | typedef struct {\r | |
1228 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
1229 | ///\r | |
1230 | /// Device Type as defined by the BIOS Boot Specification.\r | |
1231 | ///\r | |
1232 | UINT16 DeviceType;\r | |
1233 | ///\r | |
1234 | /// Status Flags as defined by the BIOS Boot Specification.\r | |
1235 | ///\r | |
1236 | UINT16 StatusFlag;\r | |
1237 | ///\r | |
1238 | /// Null-terminated ASCII string that describes the boot device to a user.\r | |
1239 | ///\r | |
1240 | CHAR8 String[1];\r | |
1241 | } BBS_BBS_DEVICE_PATH;\r | |
1242 | \r | |
1243 | //\r | |
1244 | // DeviceType definitions - from BBS specification\r | |
1245 | //\r | |
1246 | #define BBS_TYPE_FLOPPY 0x01\r | |
1247 | #define BBS_TYPE_HARDDRIVE 0x02\r | |
1248 | #define BBS_TYPE_CDROM 0x03\r | |
1249 | #define BBS_TYPE_PCMCIA 0x04\r | |
1250 | #define BBS_TYPE_USB 0x05\r | |
1251 | #define BBS_TYPE_EMBEDDED_NETWORK 0x06\r | |
1252 | #define BBS_TYPE_BEV 0x80\r | |
1253 | #define BBS_TYPE_UNKNOWN 0xFF\r | |
1254 | \r | |
1255 | \r | |
1256 | ///\r | |
1257 | /// Union of all possible Device Paths and pointers to Device Paths.\r | |
1258 | ///\r | |
1259 | typedef union {\r | |
1260 | EFI_DEVICE_PATH_PROTOCOL DevPath;\r | |
1261 | PCI_DEVICE_PATH Pci;\r | |
1262 | PCCARD_DEVICE_PATH PcCard;\r | |
1263 | MEMMAP_DEVICE_PATH MemMap;\r | |
1264 | VENDOR_DEVICE_PATH Vendor;\r | |
1265 | \r | |
1266 | CONTROLLER_DEVICE_PATH Controller;\r | |
1267 | BMC_DEVICE_PATH Bmc;\r | |
1268 | ACPI_HID_DEVICE_PATH Acpi;\r | |
1269 | ACPI_EXTENDED_HID_DEVICE_PATH ExtendedAcpi;\r | |
1270 | ACPI_ADR_DEVICE_PATH AcpiAdr;\r | |
1271 | \r | |
1272 | ATAPI_DEVICE_PATH Atapi;\r | |
1273 | SCSI_DEVICE_PATH Scsi;\r | |
1274 | ISCSI_DEVICE_PATH Iscsi;\r | |
1275 | FIBRECHANNEL_DEVICE_PATH FibreChannel;\r | |
1276 | FIBRECHANNELEX_DEVICE_PATH FibreChannelEx;\r | |
1277 | \r | |
1278 | F1394_DEVICE_PATH F1394;\r | |
1279 | USB_DEVICE_PATH Usb;\r | |
1280 | SATA_DEVICE_PATH Sata;\r | |
1281 | USB_CLASS_DEVICE_PATH UsbClass;\r | |
1282 | USB_WWID_DEVICE_PATH UsbWwid;\r | |
1283 | DEVICE_LOGICAL_UNIT_DEVICE_PATH LogicUnit;\r | |
1284 | I2O_DEVICE_PATH I2O;\r | |
1285 | MAC_ADDR_DEVICE_PATH MacAddr;\r | |
1286 | IPv4_DEVICE_PATH Ipv4;\r | |
1287 | IPv6_DEVICE_PATH Ipv6;\r | |
1288 | VLAN_DEVICE_PATH Vlan;\r | |
1289 | INFINIBAND_DEVICE_PATH InfiniBand;\r | |
1290 | UART_DEVICE_PATH Uart;\r | |
1291 | UART_FLOW_CONTROL_DEVICE_PATH UartFlowControl;\r | |
1292 | SAS_DEVICE_PATH Sas;\r | |
1293 | SASEX_DEVICE_PATH SasEx;\r | |
1294 | NVME_NAMESPACE_DEVICE_PATH NvmeNamespace;\r | |
1295 | DNS_DEVICE_PATH Dns;\r | |
1296 | URI_DEVICE_PATH Uri;\r | |
1297 | BLUETOOTH_DEVICE_PATH Bluetooth;\r | |
1298 | WIFI_DEVICE_PATH WiFi;\r | |
1299 | UFS_DEVICE_PATH Ufs;\r | |
1300 | SD_DEVICE_PATH Sd;\r | |
1301 | EMMC_DEVICE_PATH Emmc;\r | |
1302 | HARDDRIVE_DEVICE_PATH HardDrive;\r | |
1303 | CDROM_DEVICE_PATH CD;\r | |
1304 | \r | |
1305 | FILEPATH_DEVICE_PATH FilePath;\r | |
1306 | MEDIA_PROTOCOL_DEVICE_PATH MediaProtocol;\r | |
1307 | \r | |
1308 | MEDIA_FW_VOL_DEVICE_PATH FirmwareVolume;\r | |
1309 | MEDIA_FW_VOL_FILEPATH_DEVICE_PATH FirmwareFile;\r | |
1310 | MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH Offset;\r | |
1311 | MEDIA_RAM_DISK_DEVICE_PATH RamDisk;\r | |
1312 | BBS_BBS_DEVICE_PATH Bbs;\r | |
1313 | } EFI_DEV_PATH;\r | |
1314 | \r | |
1315 | \r | |
1316 | \r | |
1317 | typedef union {\r | |
1318 | EFI_DEVICE_PATH_PROTOCOL *DevPath;\r | |
1319 | PCI_DEVICE_PATH *Pci;\r | |
1320 | PCCARD_DEVICE_PATH *PcCard;\r | |
1321 | MEMMAP_DEVICE_PATH *MemMap;\r | |
1322 | VENDOR_DEVICE_PATH *Vendor;\r | |
1323 | \r | |
1324 | CONTROLLER_DEVICE_PATH *Controller;\r | |
1325 | BMC_DEVICE_PATH *Bmc;\r | |
1326 | ACPI_HID_DEVICE_PATH *Acpi;\r | |
1327 | ACPI_EXTENDED_HID_DEVICE_PATH *ExtendedAcpi;\r | |
1328 | ACPI_ADR_DEVICE_PATH *AcpiAdr;\r | |
1329 | \r | |
1330 | ATAPI_DEVICE_PATH *Atapi;\r | |
1331 | SCSI_DEVICE_PATH *Scsi;\r | |
1332 | ISCSI_DEVICE_PATH *Iscsi;\r | |
1333 | FIBRECHANNEL_DEVICE_PATH *FibreChannel;\r | |
1334 | FIBRECHANNELEX_DEVICE_PATH *FibreChannelEx;\r | |
1335 | \r | |
1336 | F1394_DEVICE_PATH *F1394;\r | |
1337 | USB_DEVICE_PATH *Usb;\r | |
1338 | SATA_DEVICE_PATH *Sata;\r | |
1339 | USB_CLASS_DEVICE_PATH *UsbClass;\r | |
1340 | USB_WWID_DEVICE_PATH *UsbWwid;\r | |
1341 | DEVICE_LOGICAL_UNIT_DEVICE_PATH *LogicUnit;\r | |
1342 | I2O_DEVICE_PATH *I2O;\r | |
1343 | MAC_ADDR_DEVICE_PATH *MacAddr;\r | |
1344 | IPv4_DEVICE_PATH *Ipv4;\r | |
1345 | IPv6_DEVICE_PATH *Ipv6;\r | |
1346 | VLAN_DEVICE_PATH *Vlan;\r | |
1347 | INFINIBAND_DEVICE_PATH *InfiniBand;\r | |
1348 | UART_DEVICE_PATH *Uart;\r | |
1349 | UART_FLOW_CONTROL_DEVICE_PATH *UartFlowControl;\r | |
1350 | SAS_DEVICE_PATH *Sas;\r | |
1351 | SASEX_DEVICE_PATH *SasEx;\r | |
1352 | NVME_NAMESPACE_DEVICE_PATH *NvmeNamespace;\r | |
1353 | DNS_DEVICE_PATH *Dns;\r | |
1354 | URI_DEVICE_PATH *Uri;\r | |
1355 | BLUETOOTH_DEVICE_PATH *Bluetooth;\r | |
1356 | WIFI_DEVICE_PATH *WiFi;\r | |
1357 | UFS_DEVICE_PATH *Ufs;\r | |
1358 | SD_DEVICE_PATH *Sd;\r | |
1359 | EMMC_DEVICE_PATH *Emmc;\r | |
1360 | HARDDRIVE_DEVICE_PATH *HardDrive;\r | |
1361 | CDROM_DEVICE_PATH *CD;\r | |
1362 | \r | |
1363 | FILEPATH_DEVICE_PATH *FilePath;\r | |
1364 | MEDIA_PROTOCOL_DEVICE_PATH *MediaProtocol;\r | |
1365 | \r | |
1366 | MEDIA_FW_VOL_DEVICE_PATH *FirmwareVolume;\r | |
1367 | MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FirmwareFile;\r | |
1368 | MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *Offset;\r | |
1369 | MEDIA_RAM_DISK_DEVICE_PATH *RamDisk;\r | |
1370 | BBS_BBS_DEVICE_PATH *Bbs;\r | |
1371 | UINT8 *Raw;\r | |
1372 | } EFI_DEV_PATH_PTR;\r | |
1373 | \r | |
1374 | #define EFI_DEBUGPORT_PROTOCOL_GUID \\r | |
1375 | { \\r | |
1376 | 0xEBA4E8D2, 0x3858, 0x41EC, {0xA2, 0x81, 0x26, 0x47, 0xBA, 0x96, 0x60, 0xD0 } \\r | |
1377 | }\r | |
1378 | //\r | |
1379 | // DEBUGPORT variable definitions...\r | |
1380 | //\r | |
1381 | #define EFI_DEBUGPORT_VARIABLE_NAME L"DEBUGPORT"\r | |
1382 | #define EFI_DEBUGPORT_VARIABLE_GUID EFI_DEBUGPORT_PROTOCOL_GUID\r | |
1383 | extern EFI_GUID gEfiDebugPortVariableGuid;\r | |
1384 | \r | |
1385 | //\r | |
1386 | // DebugPort device path definitions...\r | |
1387 | //\r | |
1388 | #define DEVICE_PATH_MESSAGING_DEBUGPORT EFI_DEBUGPORT_PROTOCOL_GUID\r | |
23a62c69 | 1389 | extern EFI_GUID gEfiDebugPortProtocolGuid;\r |
7dbc50bd YZ |
1390 | \r |
1391 | typedef struct {\r | |
1392 | EFI_DEVICE_PATH_PROTOCOL Header;\r | |
1393 | EFI_GUID Guid;\r | |
1394 | } DEBUGPORT_DEVICE_PATH;\r | |
1395 | \r | |
1396 | #pragma pack()\r | |
1397 | \r | |
1398 | #define END_DEVICE_PATH_TYPE 0x7f\r | |
1399 | #define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xFF\r | |
1400 | #define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01\r | |
1401 | \r | |
1402 | extern EFI_GUID gEfiDevicePathProtocolGuid;\r | |
1403 | \r | |
1404 | #endif\r |