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