2 The device path protocol as defined in UEFI 2.0.
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.
8 Copyright (c) 2017 - 2018, 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.
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.
19 #ifndef __EFI_DEVICE_PATH_H__
20 #define __EFI_DEVICE_PATH_H__
22 #include <Guid/PcAnsi.h>
23 #include <IndustryStandard/Acpi3_0.h>
24 #include <IndustryStandard/Bluetooth.h>
27 /// Device Path protocol.
29 #define EFI_DEVICE_PATH_PROTOCOL_GUID \
31 0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
35 /// Device Path guid definition for backward-compatible with EFI1.1.
37 #define DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH_PROTOCOL_GUID
41 #if defined(_MSC_EXTENSIONS)
43 // Disable warning when last field of data structure is a zero sized array.
45 #pragma warning ( disable : 4200 )
49 This protocol can be used on any device handle to obtain generic path/location
50 information concerning the physical device or logical device. If the handle does
51 not logically map to a physical device, the handle may not necessarily support
52 the device path protocol. The device path describes the location of the device
53 the handle is for. The size of the Device Path can be determined from the structures
54 that make up the Device Path.
57 UINT8 Type
; ///< 0x01 Hardware Device Path.
58 ///< 0x02 ACPI Device Path.
59 ///< 0x03 Messaging Device Path.
60 ///< 0x04 Media Device Path.
61 ///< 0x05 BIOS Boot Specification Device Path.
62 ///< 0x7F End of Hardware Device Path.
64 UINT8 SubType
; ///< Varies by Type
65 ///< 0xFF End Entire Device Path, or
66 ///< 0x01 End This Instance of a Device Path and start a new
69 UINT8 Length
[2]; ///< Specific Device Path data. Type and Sub-Type define
70 ///< type of data. Size of data is included in Length.
72 } EFI_DEVICE_PATH_PROTOCOL
;
75 /// Device Path protocol definition for backward-compatible with EFI1.1.
77 typedef EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH
;
80 /// Hardware Device Paths.
82 #define HARDWARE_DEVICE_PATH 0x01
85 /// PCI Device Path SubType.
87 #define HW_PCI_DP 0x01
93 EFI_DEVICE_PATH_PROTOCOL Header
;
95 /// PCI Function Number.
99 /// PCI Device Number.
105 /// PCCARD Device Path SubType.
107 #define HW_PCCARD_DP 0x02
110 /// PCCARD Device Path.
113 EFI_DEVICE_PATH_PROTOCOL Header
;
115 /// Function Number (0 = First Function).
117 UINT8 FunctionNumber
;
118 } PCCARD_DEVICE_PATH
;
121 /// Memory Mapped Device Path SubType.
123 #define HW_MEMMAP_DP 0x03
126 /// Memory Mapped Device Path.
129 EFI_DEVICE_PATH_PROTOCOL Header
;
135 /// Starting Memory Address.
137 EFI_PHYSICAL_ADDRESS StartingAddress
;
139 /// Ending Memory Address.
141 EFI_PHYSICAL_ADDRESS EndingAddress
;
142 } MEMMAP_DEVICE_PATH
;
145 /// Hardware Vendor Device Path SubType.
147 #define HW_VENDOR_DP 0x04
150 /// The Vendor Device Path allows the creation of vendor-defined Device Paths. A vendor must
151 /// allocate a Vendor GUID for a Device Path. The Vendor GUID can then be used to define the
152 /// contents on the n bytes that follow in the Vendor Device Path node.
155 EFI_DEVICE_PATH_PROTOCOL Header
;
157 /// Vendor-assigned GUID that defines the data that follows.
161 /// Vendor-defined variable size data.
163 } VENDOR_DEVICE_PATH
;
166 /// Controller Device Path SubType.
168 #define HW_CONTROLLER_DP 0x05
171 /// Controller Device Path.
174 EFI_DEVICE_PATH_PROTOCOL Header
;
176 /// Controller number.
178 UINT32 ControllerNumber
;
179 } CONTROLLER_DEVICE_PATH
;
182 /// BMC Device Path SubType.
184 #define HW_BMC_DP 0x06
190 EFI_DEVICE_PATH_PROTOCOL Header
;
198 UINT8 BaseAddress
[8];
202 /// ACPI Device Paths.
204 #define ACPI_DEVICE_PATH 0x02
207 /// ACPI Device Path SubType.
211 EFI_DEVICE_PATH_PROTOCOL Header
;
213 /// Device's PnP hardware ID stored in a numeric 32-bit
214 /// compressed EISA-type ID. This value must match the
215 /// corresponding _HID in the ACPI name space.
219 /// Unique ID that is required by ACPI if two devices have the
220 /// same _HID. This value must also match the corresponding
221 /// _UID/_HID pair in the ACPI name space. Only the 32-bit
222 /// numeric value type of _UID is supported. Thus, strings must
223 /// not be used for the _UID in the ACPI name space.
226 } ACPI_HID_DEVICE_PATH
;
229 /// Expanded ACPI Device Path SubType.
231 #define ACPI_EXTENDED_DP 0x02
233 EFI_DEVICE_PATH_PROTOCOL Header
;
235 /// Device's PnP hardware ID stored in a numeric 32-bit
236 /// compressed EISA-type ID. This value must match the
237 /// corresponding _HID in the ACPI name space.
241 /// Unique ID that is required by ACPI if two devices have the
242 /// same _HID. This value must also match the corresponding
243 /// _UID/_HID pair in the ACPI name space.
247 /// Device's compatible PnP hardware ID stored in a numeric
248 /// 32-bit compressed EISA-type ID. This value must match at
249 /// least one of the compatible device IDs returned by the
250 /// corresponding _CID in the ACPI name space.
254 /// Optional variable length _HIDSTR.
255 /// Optional variable length _UIDSTR.
256 /// Optional variable length _CIDSTR.
258 } ACPI_EXTENDED_HID_DEVICE_PATH
;
262 // EISA ID Definition 32-bits
263 // bits[15:0] - three character compressed ASCII EISA ID.
264 // bits[31:16] - binary number
265 // Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'
267 #define PNP_EISA_ID_CONST 0x41d0
268 #define EISA_ID(_Name, _Num) ((UINT32)((_Name) | (_Num) << 16))
269 #define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
270 #define EFI_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
272 #define PNP_EISA_ID_MASK 0xffff
273 #define EISA_ID_TO_NUM(_Id) ((_Id) >> 16)
276 /// ACPI _ADR Device Path SubType.
278 #define ACPI_ADR_DP 0x03
281 /// The _ADR device path is used to contain video output device attributes to support the Graphics
282 /// Output Protocol. The device path can contain multiple _ADR entries if multiple video output
283 /// devices are displaying the same output.
286 EFI_DEVICE_PATH_PROTOCOL Header
;
288 /// _ADR value. For video output devices the value of this
289 /// field comes from Table B-2 of the ACPI 3.0 specification. At
290 /// least one _ADR value is required.
294 // This device path may optionally contain more than one _ADR entry.
296 } ACPI_ADR_DEVICE_PATH
;
298 #define ACPI_ADR_DISPLAY_TYPE_OTHER 0
299 #define ACPI_ADR_DISPLAY_TYPE_VGA 1
300 #define ACPI_ADR_DISPLAY_TYPE_TV 2
301 #define ACPI_ADR_DISPLAY_TYPE_EXTERNAL_DIGITAL 3
302 #define ACPI_ADR_DISPLAY_TYPE_INTERNAL_DIGITAL 4
304 #define ACPI_DISPLAY_ADR(_DeviceIdScheme, _HeadId, _NonVgaOutput, _BiosCanDetect, _VendorInfo, _Type, _Port, _Index) \
305 ((UINT32)( ((UINT32)((_DeviceIdScheme) & 0x1) << 31) | \
306 (((_HeadId) & 0x7) << 18) | \
307 (((_NonVgaOutput) & 0x1) << 17) | \
308 (((_BiosCanDetect) & 0x1) << 16) | \
309 (((_VendorInfo) & 0xf) << 12) | \
310 (((_Type) & 0xf) << 8) | \
311 (((_Port) & 0xf) << 4) | \
315 /// Messaging Device Paths.
316 /// This Device Path is used to describe the connection of devices outside the resource domain of the
317 /// system. This Device Path can describe physical messaging information like SCSI ID, or abstract
318 /// information like networking protocol IP addresses.
320 #define MESSAGING_DEVICE_PATH 0x03
323 /// ATAPI Device Path SubType
325 #define MSG_ATAPI_DP 0x01
327 EFI_DEVICE_PATH_PROTOCOL Header
;
329 /// Set to zero for primary, or one for secondary.
331 UINT8 PrimarySecondary
;
333 /// Set to zero for master, or one for slave mode.
337 /// Logical Unit Number.
343 /// SCSI Device Path SubType.
345 #define MSG_SCSI_DP 0x02
347 EFI_DEVICE_PATH_PROTOCOL Header
;
349 /// Target ID on the SCSI bus (PUN).
353 /// Logical Unit Number (LUN).
359 /// Fibre Channel SubType.
361 #define MSG_FIBRECHANNEL_DP 0x03
363 EFI_DEVICE_PATH_PROTOCOL Header
;
365 /// Reserved for the future.
369 /// Fibre Channel World Wide Number.
373 /// Fibre Channel Logical Unit Number.
376 } FIBRECHANNEL_DEVICE_PATH
;
379 /// Fibre Channel Ex SubType.
381 #define MSG_FIBRECHANNELEX_DP 0x15
383 EFI_DEVICE_PATH_PROTOCOL Header
;
385 /// Reserved for the future.
389 /// 8 byte array containing Fibre Channel End Device Port Name.
393 /// 8 byte array containing Fibre Channel Logical Unit Number.
396 } FIBRECHANNELEX_DEVICE_PATH
;
399 /// 1394 Device Path SubType
401 #define MSG_1394_DP 0x04
403 EFI_DEVICE_PATH_PROTOCOL Header
;
405 /// Reserved for the future.
409 /// 1394 Global Unique ID (GUID).
415 /// USB Device Path SubType.
417 #define MSG_USB_DP 0x05
419 EFI_DEVICE_PATH_PROTOCOL Header
;
421 /// USB Parent Port Number.
423 UINT8 ParentPortNumber
;
425 /// USB Interface Number.
427 UINT8 InterfaceNumber
;
431 /// USB Class Device Path SubType.
433 #define MSG_USB_CLASS_DP 0x0f
435 EFI_DEVICE_PATH_PROTOCOL Header
;
437 /// Vendor ID assigned by USB-IF. A value of 0xFFFF will
438 /// match any Vendor ID.
442 /// Product ID assigned by USB-IF. A value of 0xFFFF will
443 /// match any Product ID.
447 /// The class code assigned by the USB-IF. A value of 0xFF
448 /// will match any class code.
452 /// The subclass code assigned by the USB-IF. A value of
453 /// 0xFF will match any subclass code.
455 UINT8 DeviceSubClass
;
457 /// The protocol code assigned by the USB-IF. A value of
458 /// 0xFF will match any protocol code.
460 UINT8 DeviceProtocol
;
461 } USB_CLASS_DEVICE_PATH
;
464 /// USB WWID Device Path SubType.
466 #define MSG_USB_WWID_DP 0x10
469 /// This device path describes a USB device using its serial number.
472 EFI_DEVICE_PATH_PROTOCOL Header
;
474 /// USB interface number.
476 UINT16 InterfaceNumber
;
478 /// USB vendor id of the device.
482 /// USB product id of the device.
486 /// Last 64-or-fewer UTF-16 characters of the USB
487 /// serial number. The length of the string is
488 /// determined by the Length field less the offset of the
489 /// Serial Number field (10)
491 /// CHAR16 SerialNumber[...];
492 } USB_WWID_DEVICE_PATH
;
495 /// Device Logical Unit SubType.
497 #define MSG_DEVICE_LOGICAL_UNIT_DP 0x11
499 EFI_DEVICE_PATH_PROTOCOL Header
;
501 /// Logical Unit Number for the interface.
504 } DEVICE_LOGICAL_UNIT_DEVICE_PATH
;
507 /// SATA Device Path SubType.
509 #define MSG_SATA_DP 0x12
511 EFI_DEVICE_PATH_PROTOCOL Header
;
513 /// The HBA port number that facilitates the connection to the
514 /// device or a port multiplier. The value 0xFFFF is reserved.
516 UINT16 HBAPortNumber
;
518 /// The Port multiplier port number that facilitates the connection
519 /// to the device. Must be set to 0xFFFF if the device is directly
520 /// connected to the HBA.
522 UINT16 PortMultiplierPortNumber
;
524 /// Logical Unit Number.
530 /// Flag for if the device is directly connected to the HBA.
532 #define SATA_HBA_DIRECT_CONNECT_FLAG 0x8000
535 /// I2O Device Path SubType.
537 #define MSG_I2O_DP 0x06
539 EFI_DEVICE_PATH_PROTOCOL Header
;
541 /// Target ID (TID) for a device.
547 /// MAC Address Device Path SubType.
549 #define MSG_MAC_ADDR_DP 0x0b
551 EFI_DEVICE_PATH_PROTOCOL Header
;
553 /// The MAC address for a network interface padded with 0s.
555 EFI_MAC_ADDRESS MacAddress
;
557 /// Network interface type(i.e. 802.3, FDDI).
560 } MAC_ADDR_DEVICE_PATH
;
563 /// IPv4 Device Path SubType
565 #define MSG_IPv4_DP 0x0c
567 EFI_DEVICE_PATH_PROTOCOL Header
;
569 /// The local IPv4 address.
571 EFI_IPv4_ADDRESS LocalIpAddress
;
573 /// The remote IPv4 address.
575 EFI_IPv4_ADDRESS RemoteIpAddress
;
577 /// The local port number.
581 /// The remote port number.
585 /// The network protocol(i.e. UDP, TCP).
589 /// 0x00 - The Source IP Address was assigned though DHCP.
590 /// 0x01 - The Source IP Address is statically bound.
592 BOOLEAN StaticIpAddress
;
594 /// The gateway IP address
596 EFI_IPv4_ADDRESS GatewayIpAddress
;
600 EFI_IPv4_ADDRESS SubnetMask
;
604 /// IPv6 Device Path SubType.
606 #define MSG_IPv6_DP 0x0d
608 EFI_DEVICE_PATH_PROTOCOL Header
;
610 /// The local IPv6 address.
612 EFI_IPv6_ADDRESS LocalIpAddress
;
614 /// The remote IPv6 address.
616 EFI_IPv6_ADDRESS RemoteIpAddress
;
618 /// The local port number.
622 /// The remote port number.
626 /// The network protocol(i.e. UDP, TCP).
630 /// 0x00 - The Local IP Address was manually configured.
631 /// 0x01 - The Local IP Address is assigned through IPv6
632 /// stateless auto-configuration.
633 /// 0x02 - The Local IP Address is assigned through IPv6
634 /// stateful configuration.
636 UINT8 IpAddressOrigin
;
638 /// The prefix length
642 /// The gateway IP address
644 EFI_IPv6_ADDRESS GatewayIpAddress
;
648 /// InfiniBand Device Path SubType.
650 #define MSG_INFINIBAND_DP 0x09
652 EFI_DEVICE_PATH_PROTOCOL Header
;
654 /// Flags to help identify/manage InfiniBand device path elements:
655 /// Bit 0 - IOC/Service (0b = IOC, 1b = Service).
656 /// Bit 1 - Extend Boot Environment.
657 /// Bit 2 - Console Protocol.
658 /// Bit 3 - Storage Protocol.
659 /// Bit 4 - Network Protocol.
660 /// All other bits are reserved.
662 UINT32 ResourceFlags
;
664 /// 128-bit Global Identifier for remote fabric port.
668 /// 64-bit unique identifier to remote IOC or server process.
669 /// Interpretation of field specified by Resource Flags (bit 0).
673 /// 64-bit persistent ID of remote IOC port.
677 /// 64-bit persistent ID of remote device.
680 } INFINIBAND_DEVICE_PATH
;
682 #define INFINIBAND_RESOURCE_FLAG_IOC_SERVICE 0x01
683 #define INFINIBAND_RESOURCE_FLAG_EXTENDED_BOOT_ENVIRONMENT 0x02
684 #define INFINIBAND_RESOURCE_FLAG_CONSOLE_PROTOCOL 0x04
685 #define INFINIBAND_RESOURCE_FLAG_STORAGE_PROTOCOL 0x08
686 #define INFINIBAND_RESOURCE_FLAG_NETWORK_PROTOCOL 0x10
689 /// UART Device Path SubType.
691 #define MSG_UART_DP 0x0e
693 EFI_DEVICE_PATH_PROTOCOL Header
;
699 /// The baud rate setting for the UART style device. A value of 0
700 /// means that the device's default baud rate will be used.
704 /// The number of data bits for the UART style device. A value
705 /// of 0 means that the device's default number of data bits will be used.
709 /// The parity setting for the UART style device.
710 /// Parity 0x00 - Default Parity.
711 /// Parity 0x01 - No Parity.
712 /// Parity 0x02 - Even Parity.
713 /// Parity 0x03 - Odd Parity.
714 /// Parity 0x04 - Mark Parity.
715 /// Parity 0x05 - Space Parity.
719 /// The number of stop bits for the UART style device.
720 /// Stop Bits 0x00 - Default Stop Bits.
721 /// Stop Bits 0x01 - 1 Stop Bit.
722 /// Stop Bits 0x02 - 1.5 Stop Bits.
723 /// Stop Bits 0x03 - 2 Stop Bits.
729 // Use VENDOR_DEVICE_PATH struct
731 #define MSG_VENDOR_DP 0x0a
732 typedef VENDOR_DEVICE_PATH VENDOR_DEFINED_DEVICE_PATH
;
734 #define DEVICE_PATH_MESSAGING_PC_ANSI EFI_PC_ANSI_GUID
735 #define DEVICE_PATH_MESSAGING_VT_100 EFI_VT_100_GUID
736 #define DEVICE_PATH_MESSAGING_VT_100_PLUS EFI_VT_100_PLUS_GUID
737 #define DEVICE_PATH_MESSAGING_VT_UTF8 EFI_VT_UTF8_GUID
740 /// A new device path node is defined to declare flow control characteristics.
741 /// UART Flow Control Messaging Device Path
744 EFI_DEVICE_PATH_PROTOCOL Header
;
746 /// DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL GUID.
750 /// Bitmap of supported flow control types.
751 /// Bit 0 set indicates hardware flow control.
752 /// Bit 1 set indicates Xon/Xoff flow control.
753 /// All other bits are reserved and are clear.
755 UINT32 FlowControlMap
;
756 } UART_FLOW_CONTROL_DEVICE_PATH
;
758 #define UART_FLOW_CONTROL_HARDWARE 0x00000001
759 #define UART_FLOW_CONTROL_XON_XOFF 0x00000010
761 #define DEVICE_PATH_MESSAGING_SAS EFI_SAS_DEVICE_PATH_GUID
763 /// Serial Attached SCSI (SAS) Device Path.
766 EFI_DEVICE_PATH_PROTOCOL Header
;
768 /// DEVICE_PATH_MESSAGING_SAS GUID.
772 /// Reserved for future use.
776 /// SAS Address for Serial Attached SCSI Target.
780 /// SAS Logical Unit Number.
784 /// More Information about the device and its interconnect.
786 UINT16 DeviceTopology
;
788 /// Relative Target Port (RTP).
790 UINT16 RelativeTargetPort
;
794 /// Serial Attached SCSI (SAS) Ex Device Path SubType
796 #define MSG_SASEX_DP 0x16
798 EFI_DEVICE_PATH_PROTOCOL Header
;
800 /// 8-byte array of the SAS Address for Serial Attached SCSI Target Port.
804 /// 8-byte array of the SAS Logical Unit Number.
808 /// More Information about the device and its interconnect.
810 UINT16 DeviceTopology
;
812 /// Relative Target Port (RTP).
814 UINT16 RelativeTargetPort
;
818 /// NvmExpress Namespace Device Path SubType.
820 #define MSG_NVME_NAMESPACE_DP 0x17
822 EFI_DEVICE_PATH_PROTOCOL Header
;
824 UINT64 NamespaceUuid
;
825 } NVME_NAMESPACE_DEVICE_PATH
;
828 /// DNS Device Path SubType
830 #define MSG_DNS_DP 0x1F
832 EFI_DEVICE_PATH_PROTOCOL Header
;
834 /// Indicates the DNS server address is IPv4 or IPv6 address.
838 /// Instance of the DNS server address.
840 EFI_IP_ADDRESS DnsServerIp
[];
844 /// Uniform Resource Identifiers (URI) Device Path SubType
846 #define MSG_URI_DP 0x18
848 EFI_DEVICE_PATH_PROTOCOL Header
;
850 /// Instance of the URI pursuant to RFC 3986.
856 /// Universal Flash Storage (UFS) Device Path SubType.
858 #define MSG_UFS_DP 0x19
860 EFI_DEVICE_PATH_PROTOCOL Header
;
862 /// Target ID on the UFS bus (PUN).
866 /// Logical Unit Number (LUN).
872 /// SD (Secure Digital) Device Path SubType.
874 #define MSG_SD_DP 0x1A
876 EFI_DEVICE_PATH_PROTOCOL Header
;
881 /// EMMC (Embedded MMC) Device Path SubType.
883 #define MSG_EMMC_DP 0x1D
885 EFI_DEVICE_PATH_PROTOCOL Header
;
890 /// iSCSI Device Path SubType
892 #define MSG_ISCSI_DP 0x13
894 EFI_DEVICE_PATH_PROTOCOL Header
;
896 /// Network Protocol (0 = TCP, 1+ = reserved).
898 UINT16 NetworkProtocol
;
900 /// iSCSI Login Options.
904 /// iSCSI Logical Unit Number.
908 /// iSCSI Target Portal group tag the initiator intends
909 /// to establish a session with.
911 UINT16 TargetPortalGroupTag
;
913 /// iSCSI NodeTarget Name. The length of the name
914 /// is determined by subtracting the offset of this field from Length.
916 /// CHAR8 iSCSI Target Name.
919 #define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST 0x0000
920 #define ISCSI_LOGIN_OPTION_HEADER_DIGEST_USING_CRC32C 0x0002
921 #define ISCSI_LOGIN_OPTION_NO_DATA_DIGEST 0x0000
922 #define ISCSI_LOGIN_OPTION_DATA_DIGEST_USING_CRC32C 0x0008
923 #define ISCSI_LOGIN_OPTION_AUTHMETHOD_CHAP 0x0000
924 #define ISCSI_LOGIN_OPTION_AUTHMETHOD_NON 0x1000
925 #define ISCSI_LOGIN_OPTION_CHAP_BI 0x0000
926 #define ISCSI_LOGIN_OPTION_CHAP_UNI 0x2000
929 /// VLAN Device Path SubType.
931 #define MSG_VLAN_DP 0x14
933 EFI_DEVICE_PATH_PROTOCOL Header
;
935 /// VLAN identifier (0-4094).
941 /// Bluetooth Device Path SubType.
943 #define MSG_BLUETOOTH_DP 0x1b
945 EFI_DEVICE_PATH_PROTOCOL Header
;
947 /// 48bit Bluetooth device address.
949 BLUETOOTH_ADDRESS BD_ADDR
;
950 } BLUETOOTH_DEVICE_PATH
;
953 /// Wi-Fi Device Path SubType.
955 #define MSG_WIFI_DP 0x1C
957 EFI_DEVICE_PATH_PROTOCOL Header
;
959 /// Service set identifier. A 32-byte octets string.
965 /// Bluetooth LE Device Path SubType.
967 #define MSG_BLUETOOTH_LE_DP 0x1E
969 EFI_DEVICE_PATH_PROTOCOL Header
;
970 BLUETOOTH_LE_ADDRESS Address
;
971 } BLUETOOTH_LE_DEVICE_PATH
;
976 #define MEDIA_DEVICE_PATH 0x04
979 /// Hard Drive Media Device Path SubType.
981 #define MEDIA_HARDDRIVE_DP 0x01
984 /// The Hard Drive Media Device Path is used to represent a partition on a hard drive.
987 EFI_DEVICE_PATH_PROTOCOL Header
;
989 /// Describes the entry in a partition table, starting with entry 1.
990 /// Partition number zero represents the entire device. Valid
991 /// partition numbers for a MBR partition are [1, 4]. Valid
992 /// partition numbers for a GPT partition are [1, NumberOfPartitionEntries].
994 UINT32 PartitionNumber
;
996 /// Starting LBA of the partition on the hard drive.
998 UINT64 PartitionStart
;
1000 /// Size of the partition in units of Logical Blocks.
1002 UINT64 PartitionSize
;
1004 /// Signature unique to this partition:
1005 /// If SignatureType is 0, this field has to be initialized with 16 zeros.
1006 /// If SignatureType is 1, the MBR signature is stored in the first 4 bytes of this field.
1007 /// The other 12 bytes are initialized with zeros.
1008 /// If SignatureType is 2, this field contains a 16 byte signature.
1010 UINT8 Signature
[16];
1012 /// Partition Format: (Unused values reserved).
1013 /// 0x01 - PC-AT compatible legacy MBR.
1014 /// 0x02 - GUID Partition Table.
1018 /// Type of Disk Signature: (Unused values reserved).
1019 /// 0x00 - No Disk Signature.
1020 /// 0x01 - 32-bit signature from address 0x1b8 of the type 0x01 MBR.
1021 /// 0x02 - GUID signature.
1023 UINT8 SignatureType
;
1024 } HARDDRIVE_DEVICE_PATH
;
1026 #define MBR_TYPE_PCAT 0x01
1027 #define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02
1029 #define NO_DISK_SIGNATURE 0x00
1030 #define SIGNATURE_TYPE_MBR 0x01
1031 #define SIGNATURE_TYPE_GUID 0x02
1034 /// CD-ROM Media Device Path SubType.
1036 #define MEDIA_CDROM_DP 0x02
1039 /// The CD-ROM Media Device Path is used to define a system partition that exists on a CD-ROM.
1042 EFI_DEVICE_PATH_PROTOCOL Header
;
1044 /// Boot Entry number from the Boot Catalog. The Initial/Default entry is defined as zero.
1048 /// Starting RBA of the partition on the medium. CD-ROMs use Relative logical Block Addressing.
1050 UINT64 PartitionStart
;
1052 /// Size of the partition in units of Blocks, also called Sectors.
1054 UINT64 PartitionSize
;
1055 } CDROM_DEVICE_PATH
;
1058 // Use VENDOR_DEVICE_PATH struct
1060 #define MEDIA_VENDOR_DP 0x03 ///< Media vendor device path subtype.
1063 /// File Path Media Device Path SubType
1065 #define MEDIA_FILEPATH_DP 0x04
1067 EFI_DEVICE_PATH_PROTOCOL Header
;
1069 /// A NULL-terminated Path string including directory and file names.
1072 } FILEPATH_DEVICE_PATH
;
1074 #define SIZE_OF_FILEPATH_DEVICE_PATH OFFSET_OF(FILEPATH_DEVICE_PATH,PathName)
1077 /// Media Protocol Device Path SubType.
1079 #define MEDIA_PROTOCOL_DP 0x05
1082 /// The Media Protocol Device Path is used to denote the protocol that is being
1083 /// used in a device path at the location of the path specified.
1084 /// Many protocols are inherent to the style of device path.
1087 EFI_DEVICE_PATH_PROTOCOL Header
;
1089 /// The ID of the protocol.
1092 } MEDIA_PROTOCOL_DEVICE_PATH
;
1095 /// PIWG Firmware File SubType.
1097 #define MEDIA_PIWG_FW_FILE_DP 0x06
1100 /// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware file.
1103 EFI_DEVICE_PATH_PROTOCOL Header
;
1105 /// Firmware file name
1107 EFI_GUID FvFileName
;
1108 } MEDIA_FW_VOL_FILEPATH_DEVICE_PATH
;
1111 /// PIWG Firmware Volume Device Path SubType.
1113 #define MEDIA_PIWG_FW_VOL_DP 0x07
1116 /// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware volume.
1119 EFI_DEVICE_PATH_PROTOCOL Header
;
1121 /// Firmware volume name.
1124 } MEDIA_FW_VOL_DEVICE_PATH
;
1127 /// Media relative offset range device path.
1129 #define MEDIA_RELATIVE_OFFSET_RANGE_DP 0x08
1132 /// Used to describe the offset range of media relative.
1135 EFI_DEVICE_PATH_PROTOCOL Header
;
1137 UINT64 StartingOffset
;
1138 UINT64 EndingOffset
;
1139 } MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH
;
1142 /// This GUID defines a RAM Disk supporting a raw disk format in volatile memory.
1144 #define EFI_VIRTUAL_DISK_GUID \
1146 0x77AB535A, 0x45FC, 0x624B, {0x55, 0x60, 0xF7, 0xB2, 0x81, 0xD1, 0xF9, 0x6E } \
1149 extern EFI_GUID gEfiVirtualDiskGuid
;
1152 /// This GUID defines a RAM Disk supporting an ISO image in volatile memory.
1154 #define EFI_VIRTUAL_CD_GUID \
1156 0x3D5ABD30, 0x4175, 0x87CE, {0x6D, 0x64, 0xD2, 0xAD, 0xE5, 0x23, 0xC4, 0xBB } \
1158 extern EFI_GUID gEfiVirtualCdGuid
;
1161 /// This GUID defines a RAM Disk supporting a raw disk format in persistent memory.
1163 #define EFI_PERSISTENT_VIRTUAL_DISK_GUID \
1165 0x5CEA02C9, 0x4D07, 0x69D3, {0x26, 0x9F ,0x44, 0x96, 0xFB, 0xE0, 0x96, 0xF9 } \
1168 extern EFI_GUID gEfiPersistentVirtualDiskGuid
;
1171 /// This GUID defines a RAM Disk supporting an ISO image in persistent memory.
1173 #define EFI_PERSISTENT_VIRTUAL_CD_GUID \
1175 0x08018188, 0x42CD, 0xBB48, {0x10, 0x0F, 0x53, 0x87, 0xD5, 0x3D, 0xED, 0x3D } \
1178 extern EFI_GUID gEfiPersistentVirtualCdGuid
;
1181 /// Media ram disk device path.
1183 #define MEDIA_RAM_DISK_DP 0x09
1186 /// Used to describe the ram disk device path.
1189 EFI_DEVICE_PATH_PROTOCOL Header
;
1191 /// Starting Memory Address.
1193 UINT32 StartingAddr
[2];
1195 /// Ending Memory Address.
1197 UINT32 EndingAddr
[2];
1199 /// GUID that defines the type of the RAM Disk.
1203 /// RAM Diskinstance number, if supported. The default value is zero.
1206 } MEDIA_RAM_DISK_DEVICE_PATH
;
1209 /// BIOS Boot Specification Device Path.
1211 #define BBS_DEVICE_PATH 0x05
1214 /// BIOS Boot Specification Device Path SubType.
1216 #define BBS_BBS_DP 0x01
1219 /// This Device Path is used to describe the booting of non-EFI-aware operating systems.
1222 EFI_DEVICE_PATH_PROTOCOL Header
;
1224 /// Device Type as defined by the BIOS Boot Specification.
1228 /// Status Flags as defined by the BIOS Boot Specification.
1232 /// Null-terminated ASCII string that describes the boot device to a user.
1235 } BBS_BBS_DEVICE_PATH
;
1238 // DeviceType definitions - from BBS specification
1240 #define BBS_TYPE_FLOPPY 0x01
1241 #define BBS_TYPE_HARDDRIVE 0x02
1242 #define BBS_TYPE_CDROM 0x03
1243 #define BBS_TYPE_PCMCIA 0x04
1244 #define BBS_TYPE_USB 0x05
1245 #define BBS_TYPE_EMBEDDED_NETWORK 0x06
1246 #define BBS_TYPE_BEV 0x80
1247 #define BBS_TYPE_UNKNOWN 0xFF
1251 /// Union of all possible Device Paths and pointers to Device Paths.
1254 EFI_DEVICE_PATH_PROTOCOL DevPath
;
1255 PCI_DEVICE_PATH Pci
;
1256 PCCARD_DEVICE_PATH PcCard
;
1257 MEMMAP_DEVICE_PATH MemMap
;
1258 VENDOR_DEVICE_PATH Vendor
;
1260 CONTROLLER_DEVICE_PATH Controller
;
1261 BMC_DEVICE_PATH Bmc
;
1262 ACPI_HID_DEVICE_PATH Acpi
;
1263 ACPI_EXTENDED_HID_DEVICE_PATH ExtendedAcpi
;
1264 ACPI_ADR_DEVICE_PATH AcpiAdr
;
1266 ATAPI_DEVICE_PATH Atapi
;
1267 SCSI_DEVICE_PATH Scsi
;
1268 ISCSI_DEVICE_PATH Iscsi
;
1269 FIBRECHANNEL_DEVICE_PATH FibreChannel
;
1270 FIBRECHANNELEX_DEVICE_PATH FibreChannelEx
;
1272 F1394_DEVICE_PATH F1394
;
1273 USB_DEVICE_PATH Usb
;
1274 SATA_DEVICE_PATH Sata
;
1275 USB_CLASS_DEVICE_PATH UsbClass
;
1276 USB_WWID_DEVICE_PATH UsbWwid
;
1277 DEVICE_LOGICAL_UNIT_DEVICE_PATH LogicUnit
;
1278 I2O_DEVICE_PATH I2O
;
1279 MAC_ADDR_DEVICE_PATH MacAddr
;
1280 IPv4_DEVICE_PATH Ipv4
;
1281 IPv6_DEVICE_PATH Ipv6
;
1282 VLAN_DEVICE_PATH Vlan
;
1283 INFINIBAND_DEVICE_PATH InfiniBand
;
1284 UART_DEVICE_PATH Uart
;
1285 UART_FLOW_CONTROL_DEVICE_PATH UartFlowControl
;
1286 SAS_DEVICE_PATH Sas
;
1287 SASEX_DEVICE_PATH SasEx
;
1288 NVME_NAMESPACE_DEVICE_PATH NvmeNamespace
;
1289 DNS_DEVICE_PATH Dns
;
1290 URI_DEVICE_PATH Uri
;
1291 BLUETOOTH_DEVICE_PATH Bluetooth
;
1292 WIFI_DEVICE_PATH WiFi
;
1293 UFS_DEVICE_PATH Ufs
;
1295 EMMC_DEVICE_PATH Emmc
;
1296 HARDDRIVE_DEVICE_PATH HardDrive
;
1297 CDROM_DEVICE_PATH CD
;
1299 FILEPATH_DEVICE_PATH FilePath
;
1300 MEDIA_PROTOCOL_DEVICE_PATH MediaProtocol
;
1302 MEDIA_FW_VOL_DEVICE_PATH FirmwareVolume
;
1303 MEDIA_FW_VOL_FILEPATH_DEVICE_PATH FirmwareFile
;
1304 MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH Offset
;
1305 MEDIA_RAM_DISK_DEVICE_PATH RamDisk
;
1306 BBS_BBS_DEVICE_PATH Bbs
;
1312 EFI_DEVICE_PATH_PROTOCOL
*DevPath
;
1313 PCI_DEVICE_PATH
*Pci
;
1314 PCCARD_DEVICE_PATH
*PcCard
;
1315 MEMMAP_DEVICE_PATH
*MemMap
;
1316 VENDOR_DEVICE_PATH
*Vendor
;
1318 CONTROLLER_DEVICE_PATH
*Controller
;
1319 BMC_DEVICE_PATH
*Bmc
;
1320 ACPI_HID_DEVICE_PATH
*Acpi
;
1321 ACPI_EXTENDED_HID_DEVICE_PATH
*ExtendedAcpi
;
1322 ACPI_ADR_DEVICE_PATH
*AcpiAdr
;
1324 ATAPI_DEVICE_PATH
*Atapi
;
1325 SCSI_DEVICE_PATH
*Scsi
;
1326 ISCSI_DEVICE_PATH
*Iscsi
;
1327 FIBRECHANNEL_DEVICE_PATH
*FibreChannel
;
1328 FIBRECHANNELEX_DEVICE_PATH
*FibreChannelEx
;
1330 F1394_DEVICE_PATH
*F1394
;
1331 USB_DEVICE_PATH
*Usb
;
1332 SATA_DEVICE_PATH
*Sata
;
1333 USB_CLASS_DEVICE_PATH
*UsbClass
;
1334 USB_WWID_DEVICE_PATH
*UsbWwid
;
1335 DEVICE_LOGICAL_UNIT_DEVICE_PATH
*LogicUnit
;
1336 I2O_DEVICE_PATH
*I2O
;
1337 MAC_ADDR_DEVICE_PATH
*MacAddr
;
1338 IPv4_DEVICE_PATH
*Ipv4
;
1339 IPv6_DEVICE_PATH
*Ipv6
;
1340 VLAN_DEVICE_PATH
*Vlan
;
1341 INFINIBAND_DEVICE_PATH
*InfiniBand
;
1342 UART_DEVICE_PATH
*Uart
;
1343 UART_FLOW_CONTROL_DEVICE_PATH
*UartFlowControl
;
1344 SAS_DEVICE_PATH
*Sas
;
1345 SASEX_DEVICE_PATH
*SasEx
;
1346 NVME_NAMESPACE_DEVICE_PATH
*NvmeNamespace
;
1347 DNS_DEVICE_PATH
*Dns
;
1348 URI_DEVICE_PATH
*Uri
;
1349 BLUETOOTH_DEVICE_PATH
*Bluetooth
;
1350 WIFI_DEVICE_PATH
*WiFi
;
1351 UFS_DEVICE_PATH
*Ufs
;
1353 EMMC_DEVICE_PATH
*Emmc
;
1354 HARDDRIVE_DEVICE_PATH
*HardDrive
;
1355 CDROM_DEVICE_PATH
*CD
;
1357 FILEPATH_DEVICE_PATH
*FilePath
;
1358 MEDIA_PROTOCOL_DEVICE_PATH
*MediaProtocol
;
1360 MEDIA_FW_VOL_DEVICE_PATH
*FirmwareVolume
;
1361 MEDIA_FW_VOL_FILEPATH_DEVICE_PATH
*FirmwareFile
;
1362 MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH
*Offset
;
1363 MEDIA_RAM_DISK_DEVICE_PATH
*RamDisk
;
1364 BBS_BBS_DEVICE_PATH
*Bbs
;
1368 #define EFI_DEBUGPORT_PROTOCOL_GUID \
1370 0xEBA4E8D2, 0x3858, 0x41EC, {0xA2, 0x81, 0x26, 0x47, 0xBA, 0x96, 0x60, 0xD0 } \
1373 // DEBUGPORT variable definitions...
1375 #define EFI_DEBUGPORT_VARIABLE_NAME L"DEBUGPORT"
1376 #define EFI_DEBUGPORT_VARIABLE_GUID EFI_DEBUGPORT_PROTOCOL_GUID
1377 extern EFI_GUID gEfiDebugPortVariableGuid
;
1380 // DebugPort device path definitions...
1382 #define DEVICE_PATH_MESSAGING_DEBUGPORT EFI_DEBUGPORT_PROTOCOL_GUID
1383 extern EFI_GUID gEfiDebugPortProtocolGuid
;
1386 EFI_DEVICE_PATH_PROTOCOL Header
;
1388 } DEBUGPORT_DEVICE_PATH
;
1392 #define END_DEVICE_PATH_TYPE 0x7f
1393 #define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xFF
1394 #define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01
1396 extern EFI_GUID gEfiDevicePathProtocolGuid
;