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