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