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) 2006 - 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.
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_PROTOCOL_H__
20 #define __EFI_DEVICE_PATH_PROTOCOL_H__
22 #include <Guid/PcAnsi.h>
23 #include <IndustryStandard/Bluetooth.h>
24 #include <IndustryStandard/Acpi60.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
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.
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.
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
62 UINT8 Length
[2]; ///< Specific Device Path data. Type and Sub-Type define
63 ///< type of data. Size of data is included in Length.
65 } EFI_DEVICE_PATH_PROTOCOL
;
68 /// Device Path protocol definition for backward-compatible with EFI1.1.
70 typedef EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH
;
73 /// Hardware Device Paths.
75 #define HARDWARE_DEVICE_PATH 0x01
78 /// PCI Device Path SubType.
80 #define HW_PCI_DP 0x01
86 EFI_DEVICE_PATH_PROTOCOL Header
;
88 /// PCI Function Number.
92 /// PCI Device Number.
98 /// PCCARD Device Path SubType.
100 #define HW_PCCARD_DP 0x02
103 /// PCCARD Device Path.
106 EFI_DEVICE_PATH_PROTOCOL Header
;
108 /// Function Number (0 = First Function).
110 UINT8 FunctionNumber
;
111 } PCCARD_DEVICE_PATH
;
114 /// Memory Mapped Device Path SubType.
116 #define HW_MEMMAP_DP 0x03
119 /// Memory Mapped Device Path.
122 EFI_DEVICE_PATH_PROTOCOL Header
;
128 /// Starting Memory Address.
130 EFI_PHYSICAL_ADDRESS StartingAddress
;
132 /// Ending Memory Address.
134 EFI_PHYSICAL_ADDRESS EndingAddress
;
135 } MEMMAP_DEVICE_PATH
;
138 /// Hardware Vendor Device Path SubType.
140 #define HW_VENDOR_DP 0x04
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.
148 EFI_DEVICE_PATH_PROTOCOL Header
;
150 /// Vendor-assigned GUID that defines the data that follows.
154 /// Vendor-defined variable size data.
156 } VENDOR_DEVICE_PATH
;
159 /// Controller Device Path SubType.
161 #define HW_CONTROLLER_DP 0x05
164 /// Controller Device Path.
167 EFI_DEVICE_PATH_PROTOCOL Header
;
169 /// Controller number.
171 UINT32 ControllerNumber
;
172 } CONTROLLER_DEVICE_PATH
;
175 /// BMC Device Path SubType.
177 #define HW_BMC_DP 0x06
183 EFI_DEVICE_PATH_PROTOCOL Header
;
191 UINT8 BaseAddress
[8];
195 /// ACPI Device Paths.
197 #define ACPI_DEVICE_PATH 0x02
200 /// ACPI Device Path SubType.
204 EFI_DEVICE_PATH_PROTOCOL Header
;
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.
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.
219 } ACPI_HID_DEVICE_PATH
;
222 /// Expanded ACPI Device Path SubType.
224 #define ACPI_EXTENDED_DP 0x02
226 EFI_DEVICE_PATH_PROTOCOL Header
;
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.
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.
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.
247 /// Optional variable length _HIDSTR.
248 /// Optional variable length _UIDSTR.
249 /// Optional variable length _CIDSTR.
251 } ACPI_EXTENDED_HID_DEVICE_PATH
;
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'
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)))
265 #define PNP_EISA_ID_MASK 0xffff
266 #define EISA_ID_TO_NUM(_Id) ((_Id) >> 16)
269 /// ACPI _ADR Device Path SubType.
271 #define ACPI_ADR_DP 0x03
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.
279 EFI_DEVICE_PATH_PROTOCOL Header
;
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.
287 // This device path may optionally contain more than one _ADR entry.
289 } ACPI_ADR_DEVICE_PATH
;
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
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) | \
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.
313 #define MESSAGING_DEVICE_PATH 0x03
316 /// ATAPI Device Path SubType
318 #define MSG_ATAPI_DP 0x01
320 EFI_DEVICE_PATH_PROTOCOL Header
;
322 /// Set to zero for primary, or one for secondary.
324 UINT8 PrimarySecondary
;
326 /// Set to zero for master, or one for slave mode.
330 /// Logical Unit Number.
336 /// SCSI Device Path SubType.
338 #define MSG_SCSI_DP 0x02
340 EFI_DEVICE_PATH_PROTOCOL Header
;
342 /// Target ID on the SCSI bus (PUN).
346 /// Logical Unit Number (LUN).
352 /// Fibre Channel SubType.
354 #define MSG_FIBRECHANNEL_DP 0x03
356 EFI_DEVICE_PATH_PROTOCOL Header
;
358 /// Reserved for the future.
362 /// Fibre Channel World Wide Number.
366 /// Fibre Channel Logical Unit Number.
369 } FIBRECHANNEL_DEVICE_PATH
;
372 /// Fibre Channel Ex SubType.
374 #define MSG_FIBRECHANNELEX_DP 0x15
376 EFI_DEVICE_PATH_PROTOCOL Header
;
378 /// Reserved for the future.
382 /// 8 byte array containing Fibre Channel End Device Port Name.
386 /// 8 byte array containing Fibre Channel Logical Unit Number.
389 } FIBRECHANNELEX_DEVICE_PATH
;
392 /// 1394 Device Path SubType
394 #define MSG_1394_DP 0x04
396 EFI_DEVICE_PATH_PROTOCOL Header
;
398 /// Reserved for the future.
402 /// 1394 Global Unique ID (GUID).
408 /// USB Device Path SubType.
410 #define MSG_USB_DP 0x05
412 EFI_DEVICE_PATH_PROTOCOL Header
;
414 /// USB Parent Port Number.
416 UINT8 ParentPortNumber
;
418 /// USB Interface Number.
420 UINT8 InterfaceNumber
;
424 /// USB Class Device Path SubType.
426 #define MSG_USB_CLASS_DP 0x0f
428 EFI_DEVICE_PATH_PROTOCOL Header
;
430 /// Vendor ID assigned by USB-IF. A value of 0xFFFF will
431 /// match any Vendor ID.
435 /// Product ID assigned by USB-IF. A value of 0xFFFF will
436 /// match any Product ID.
440 /// The class code assigned by the USB-IF. A value of 0xFF
441 /// will match any class code.
445 /// The subclass code assigned by the USB-IF. A value of
446 /// 0xFF will match any subclass code.
448 UINT8 DeviceSubClass
;
450 /// The protocol code assigned by the USB-IF. A value of
451 /// 0xFF will match any protocol code.
453 UINT8 DeviceProtocol
;
454 } USB_CLASS_DEVICE_PATH
;
457 /// USB WWID Device Path SubType.
459 #define MSG_USB_WWID_DP 0x10
462 /// This device path describes a USB device using its serial number.
465 EFI_DEVICE_PATH_PROTOCOL Header
;
467 /// USB interface number.
469 UINT16 InterfaceNumber
;
471 /// USB vendor id of the device.
475 /// USB product id of the device.
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)
484 /// CHAR16 SerialNumber[...];
485 } USB_WWID_DEVICE_PATH
;
488 /// Device Logical Unit SubType.
490 #define MSG_DEVICE_LOGICAL_UNIT_DP 0x11
492 EFI_DEVICE_PATH_PROTOCOL Header
;
494 /// Logical Unit Number for the interface.
497 } DEVICE_LOGICAL_UNIT_DEVICE_PATH
;
500 /// SATA Device Path SubType.
502 #define MSG_SATA_DP 0x12
504 EFI_DEVICE_PATH_PROTOCOL Header
;
506 /// The HBA port number that facilitates the connection to the
507 /// device or a port multiplier. The value 0xFFFF is reserved.
509 UINT16 HBAPortNumber
;
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.
515 UINT16 PortMultiplierPortNumber
;
517 /// Logical Unit Number.
523 /// Flag for if the device is directly connected to the HBA.
525 #define SATA_HBA_DIRECT_CONNECT_FLAG 0x8000
528 /// I2O Device Path SubType.
530 #define MSG_I2O_DP 0x06
532 EFI_DEVICE_PATH_PROTOCOL Header
;
534 /// Target ID (TID) for a device.
540 /// MAC Address Device Path SubType.
542 #define MSG_MAC_ADDR_DP 0x0b
544 EFI_DEVICE_PATH_PROTOCOL Header
;
546 /// The MAC address for a network interface padded with 0s.
548 EFI_MAC_ADDRESS MacAddress
;
550 /// Network interface type(i.e. 802.3, FDDI).
553 } MAC_ADDR_DEVICE_PATH
;
556 /// IPv4 Device Path SubType
558 #define MSG_IPv4_DP 0x0c
560 EFI_DEVICE_PATH_PROTOCOL Header
;
562 /// The local IPv4 address.
564 EFI_IPv4_ADDRESS LocalIpAddress
;
566 /// The remote IPv4 address.
568 EFI_IPv4_ADDRESS RemoteIpAddress
;
570 /// The local port number.
574 /// The remote port number.
578 /// The network protocol(i.e. UDP, TCP).
582 /// 0x00 - The Source IP Address was assigned though DHCP.
583 /// 0x01 - The Source IP Address is statically bound.
585 BOOLEAN StaticIpAddress
;
587 /// The gateway IP address
589 EFI_IPv4_ADDRESS GatewayIpAddress
;
593 EFI_IPv4_ADDRESS SubnetMask
;
597 /// IPv6 Device Path SubType.
599 #define MSG_IPv6_DP 0x0d
601 EFI_DEVICE_PATH_PROTOCOL Header
;
603 /// The local IPv6 address.
605 EFI_IPv6_ADDRESS LocalIpAddress
;
607 /// The remote IPv6 address.
609 EFI_IPv6_ADDRESS RemoteIpAddress
;
611 /// The local port number.
615 /// The remote port number.
619 /// The network protocol(i.e. UDP, TCP).
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.
629 UINT8 IpAddressOrigin
;
631 /// The prefix length
635 /// The gateway IP address
637 EFI_IPv6_ADDRESS GatewayIpAddress
;
641 /// InfiniBand Device Path SubType.
643 #define MSG_INFINIBAND_DP 0x09
645 EFI_DEVICE_PATH_PROTOCOL Header
;
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.
655 UINT32 ResourceFlags
;
657 /// 128-bit Global Identifier for remote fabric port.
661 /// 64-bit unique identifier to remote IOC or server process.
662 /// Interpretation of field specified by Resource Flags (bit 0).
666 /// 64-bit persistent ID of remote IOC port.
670 /// 64-bit persistent ID of remote device.
673 } INFINIBAND_DEVICE_PATH
;
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
682 /// UART Device Path SubType.
684 #define MSG_UART_DP 0x0e
686 EFI_DEVICE_PATH_PROTOCOL Header
;
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.
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.
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.
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.
722 // Use VENDOR_DEVICE_PATH struct
724 #define MSG_VENDOR_DP 0x0a
725 typedef VENDOR_DEVICE_PATH VENDOR_DEFINED_DEVICE_PATH
;
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
733 /// A new device path node is defined to declare flow control characteristics.
734 /// UART Flow Control Messaging Device Path
737 EFI_DEVICE_PATH_PROTOCOL Header
;
739 /// DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL GUID.
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.
748 UINT32 FlowControlMap
;
749 } UART_FLOW_CONTROL_DEVICE_PATH
;
751 #define UART_FLOW_CONTROL_HARDWARE 0x00000001
752 #define UART_FLOW_CONTROL_XON_XOFF 0x00000010
754 #define DEVICE_PATH_MESSAGING_SAS EFI_SAS_DEVICE_PATH_GUID
756 /// Serial Attached SCSI (SAS) Device Path.
759 EFI_DEVICE_PATH_PROTOCOL Header
;
761 /// DEVICE_PATH_MESSAGING_SAS GUID.
765 /// Reserved for future use.
769 /// SAS Address for Serial Attached SCSI Target.
773 /// SAS Logical Unit Number.
777 /// More Information about the device and its interconnect.
779 UINT16 DeviceTopology
;
781 /// Relative Target Port (RTP).
783 UINT16 RelativeTargetPort
;
787 /// Serial Attached SCSI (SAS) Ex Device Path SubType
789 #define MSG_SASEX_DP 0x16
791 EFI_DEVICE_PATH_PROTOCOL Header
;
793 /// 8-byte array of the SAS Address for Serial Attached SCSI Target Port.
797 /// 8-byte array of the SAS Logical Unit Number.
801 /// More Information about the device and its interconnect.
803 UINT16 DeviceTopology
;
805 /// Relative Target Port (RTP).
807 UINT16 RelativeTargetPort
;
811 /// NvmExpress Namespace Device Path SubType.
813 #define MSG_NVME_NAMESPACE_DP 0x17
815 EFI_DEVICE_PATH_PROTOCOL Header
;
817 UINT64 NamespaceUuid
;
818 } NVME_NAMESPACE_DEVICE_PATH
;
821 /// DNS Device Path SubType
823 #define MSG_DNS_DP 0x1F
825 EFI_DEVICE_PATH_PROTOCOL Header
;
827 /// Indicates the DNS server address is IPv4 or IPv6 address.
831 /// Instance of the DNS server address.
833 EFI_IP_ADDRESS DnsServerIp
[];
837 /// Uniform Resource Identifiers (URI) Device Path SubType
839 #define MSG_URI_DP 0x18
841 EFI_DEVICE_PATH_PROTOCOL Header
;
843 /// Instance of the URI pursuant to RFC 3986.
849 /// Universal Flash Storage (UFS) Device Path SubType.
851 #define MSG_UFS_DP 0x19
853 EFI_DEVICE_PATH_PROTOCOL Header
;
855 /// Target ID on the UFS bus (PUN).
859 /// Logical Unit Number (LUN).
865 /// SD (Secure Digital) Device Path SubType.
867 #define MSG_SD_DP 0x1A
869 EFI_DEVICE_PATH_PROTOCOL Header
;
874 /// EMMC (Embedded MMC) Device Path SubType.
876 #define MSG_EMMC_DP 0x1D
878 EFI_DEVICE_PATH_PROTOCOL Header
;
883 /// iSCSI Device Path SubType
885 #define MSG_ISCSI_DP 0x13
887 EFI_DEVICE_PATH_PROTOCOL Header
;
889 /// Network Protocol (0 = TCP, 1+ = reserved).
891 UINT16 NetworkProtocol
;
893 /// iSCSI Login Options.
897 /// iSCSI Logical Unit Number.
901 /// iSCSI Target Portal group tag the initiator intends
902 /// to establish a session with.
904 UINT16 TargetPortalGroupTag
;
906 /// iSCSI NodeTarget Name. The length of the name
907 /// is determined by subtracting the offset of this field from Length.
909 /// CHAR8 iSCSI Target Name.
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
922 /// VLAN Device Path SubType.
924 #define MSG_VLAN_DP 0x14
926 EFI_DEVICE_PATH_PROTOCOL Header
;
928 /// VLAN identifier (0-4094).
934 /// Bluetooth Device Path SubType.
936 #define MSG_BLUETOOTH_DP 0x1b
938 EFI_DEVICE_PATH_PROTOCOL Header
;
940 /// 48bit Bluetooth device address.
942 BLUETOOTH_ADDRESS BD_ADDR
;
943 } BLUETOOTH_DEVICE_PATH
;
946 /// Wi-Fi Device Path SubType.
948 #define MSG_WIFI_DP 0x1C
950 EFI_DEVICE_PATH_PROTOCOL Header
;
952 /// Service set identifier. A 32-byte octets string.
958 /// Bluetooth LE Device Path SubType.
960 #define MSG_BLUETOOTH_LE_DP 0x1E
962 EFI_DEVICE_PATH_PROTOCOL Header
;
963 BLUETOOTH_LE_ADDRESS Address
;
964 } BLUETOOTH_LE_DEVICE_PATH
;
969 #define MEDIA_DEVICE_PATH 0x04
972 /// Hard Drive Media Device Path SubType.
974 #define MEDIA_HARDDRIVE_DP 0x01
977 /// The Hard Drive Media Device Path is used to represent a partition on a hard drive.
980 EFI_DEVICE_PATH_PROTOCOL Header
;
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].
987 UINT32 PartitionNumber
;
989 /// Starting LBA of the partition on the hard drive.
991 UINT64 PartitionStart
;
993 /// Size of the partition in units of Logical Blocks.
995 UINT64 PartitionSize
;
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.
1003 UINT8 Signature
[16];
1005 /// Partition Format: (Unused values reserved).
1006 /// 0x01 - PC-AT compatible legacy MBR.
1007 /// 0x02 - GUID Partition Table.
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.
1016 UINT8 SignatureType
;
1017 } HARDDRIVE_DEVICE_PATH
;
1019 #define MBR_TYPE_PCAT 0x01
1020 #define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02
1022 #define NO_DISK_SIGNATURE 0x00
1023 #define SIGNATURE_TYPE_MBR 0x01
1024 #define SIGNATURE_TYPE_GUID 0x02
1027 /// CD-ROM Media Device Path SubType.
1029 #define MEDIA_CDROM_DP 0x02
1032 /// The CD-ROM Media Device Path is used to define a system partition that exists on a CD-ROM.
1035 EFI_DEVICE_PATH_PROTOCOL Header
;
1037 /// Boot Entry number from the Boot Catalog. The Initial/Default entry is defined as zero.
1041 /// Starting RBA of the partition on the medium. CD-ROMs use Relative logical Block Addressing.
1043 UINT64 PartitionStart
;
1045 /// Size of the partition in units of Blocks, also called Sectors.
1047 UINT64 PartitionSize
;
1048 } CDROM_DEVICE_PATH
;
1051 // Use VENDOR_DEVICE_PATH struct
1053 #define MEDIA_VENDOR_DP 0x03 ///< Media vendor device path subtype.
1056 /// File Path Media Device Path SubType
1058 #define MEDIA_FILEPATH_DP 0x04
1060 EFI_DEVICE_PATH_PROTOCOL Header
;
1062 /// A NULL-terminated Path string including directory and file names.
1065 } FILEPATH_DEVICE_PATH
;
1067 #define SIZE_OF_FILEPATH_DEVICE_PATH OFFSET_OF(FILEPATH_DEVICE_PATH,PathName)
1070 /// Media Protocol Device Path SubType.
1072 #define MEDIA_PROTOCOL_DP 0x05
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.
1080 EFI_DEVICE_PATH_PROTOCOL Header
;
1082 /// The ID of the protocol.
1085 } MEDIA_PROTOCOL_DEVICE_PATH
;
1088 /// PIWG Firmware File SubType.
1090 #define MEDIA_PIWG_FW_FILE_DP 0x06
1093 /// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware file.
1096 EFI_DEVICE_PATH_PROTOCOL Header
;
1098 /// Firmware file name
1100 EFI_GUID FvFileName
;
1101 } MEDIA_FW_VOL_FILEPATH_DEVICE_PATH
;
1104 /// PIWG Firmware Volume Device Path SubType.
1106 #define MEDIA_PIWG_FW_VOL_DP 0x07
1109 /// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware volume.
1112 EFI_DEVICE_PATH_PROTOCOL Header
;
1114 /// Firmware volume name.
1117 } MEDIA_FW_VOL_DEVICE_PATH
;
1120 /// Media relative offset range device path.
1122 #define MEDIA_RELATIVE_OFFSET_RANGE_DP 0x08
1125 /// Used to describe the offset range of media relative.
1128 EFI_DEVICE_PATH_PROTOCOL Header
;
1130 UINT64 StartingOffset
;
1131 UINT64 EndingOffset
;
1132 } MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH
;
1135 /// This GUID defines a RAM Disk supporting a raw disk format in volatile memory.
1137 #define EFI_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE
1139 extern EFI_GUID gEfiVirtualDiskGuid
;
1142 /// This GUID defines a RAM Disk supporting an ISO image in volatile memory.
1144 #define EFI_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE
1146 extern EFI_GUID gEfiVirtualCdGuid
;
1149 /// This GUID defines a RAM Disk supporting a raw disk format in persistent memory.
1151 #define EFI_PERSISTENT_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT
1153 extern EFI_GUID gEfiPersistentVirtualDiskGuid
;
1156 /// This GUID defines a RAM Disk supporting an ISO image in persistent memory.
1158 #define EFI_PERSISTENT_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT
1160 extern EFI_GUID gEfiPersistentVirtualCdGuid
;
1163 /// Media ram disk device path.
1165 #define MEDIA_RAM_DISK_DP 0x09
1168 /// Used to describe the ram disk device path.
1171 EFI_DEVICE_PATH_PROTOCOL Header
;
1173 /// Starting Memory Address.
1175 UINT32 StartingAddr
[2];
1177 /// Ending Memory Address.
1179 UINT32 EndingAddr
[2];
1181 /// GUID that defines the type of the RAM Disk.
1185 /// RAM Diskinstance number, if supported. The default value is zero.
1188 } MEDIA_RAM_DISK_DEVICE_PATH
;
1191 /// BIOS Boot Specification Device Path.
1193 #define BBS_DEVICE_PATH 0x05
1196 /// BIOS Boot Specification Device Path SubType.
1198 #define BBS_BBS_DP 0x01
1201 /// This Device Path is used to describe the booting of non-EFI-aware operating systems.
1204 EFI_DEVICE_PATH_PROTOCOL Header
;
1206 /// Device Type as defined by the BIOS Boot Specification.
1210 /// Status Flags as defined by the BIOS Boot Specification.
1214 /// Null-terminated ASCII string that describes the boot device to a user.
1217 } BBS_BBS_DEVICE_PATH
;
1220 // DeviceType definitions - from BBS specification
1222 #define BBS_TYPE_FLOPPY 0x01
1223 #define BBS_TYPE_HARDDRIVE 0x02
1224 #define BBS_TYPE_CDROM 0x03
1225 #define BBS_TYPE_PCMCIA 0x04
1226 #define BBS_TYPE_USB 0x05
1227 #define BBS_TYPE_EMBEDDED_NETWORK 0x06
1228 #define BBS_TYPE_BEV 0x80
1229 #define BBS_TYPE_UNKNOWN 0xFF
1233 /// Union of all possible Device Paths and pointers to Device Paths.
1236 EFI_DEVICE_PATH_PROTOCOL DevPath
;
1237 PCI_DEVICE_PATH Pci
;
1238 PCCARD_DEVICE_PATH PcCard
;
1239 MEMMAP_DEVICE_PATH MemMap
;
1240 VENDOR_DEVICE_PATH Vendor
;
1242 CONTROLLER_DEVICE_PATH Controller
;
1243 BMC_DEVICE_PATH Bmc
;
1244 ACPI_HID_DEVICE_PATH Acpi
;
1245 ACPI_EXTENDED_HID_DEVICE_PATH ExtendedAcpi
;
1246 ACPI_ADR_DEVICE_PATH AcpiAdr
;
1248 ATAPI_DEVICE_PATH Atapi
;
1249 SCSI_DEVICE_PATH Scsi
;
1250 ISCSI_DEVICE_PATH Iscsi
;
1251 FIBRECHANNEL_DEVICE_PATH FibreChannel
;
1252 FIBRECHANNELEX_DEVICE_PATH FibreChannelEx
;
1254 F1394_DEVICE_PATH F1394
;
1255 USB_DEVICE_PATH Usb
;
1256 SATA_DEVICE_PATH Sata
;
1257 USB_CLASS_DEVICE_PATH UsbClass
;
1258 USB_WWID_DEVICE_PATH UsbWwid
;
1259 DEVICE_LOGICAL_UNIT_DEVICE_PATH LogicUnit
;
1260 I2O_DEVICE_PATH I2O
;
1261 MAC_ADDR_DEVICE_PATH MacAddr
;
1262 IPv4_DEVICE_PATH Ipv4
;
1263 IPv6_DEVICE_PATH Ipv6
;
1264 VLAN_DEVICE_PATH Vlan
;
1265 INFINIBAND_DEVICE_PATH InfiniBand
;
1266 UART_DEVICE_PATH Uart
;
1267 UART_FLOW_CONTROL_DEVICE_PATH UartFlowControl
;
1268 SAS_DEVICE_PATH Sas
;
1269 SASEX_DEVICE_PATH SasEx
;
1270 NVME_NAMESPACE_DEVICE_PATH NvmeNamespace
;
1271 DNS_DEVICE_PATH Dns
;
1272 URI_DEVICE_PATH Uri
;
1273 BLUETOOTH_DEVICE_PATH Bluetooth
;
1274 WIFI_DEVICE_PATH WiFi
;
1275 UFS_DEVICE_PATH Ufs
;
1277 EMMC_DEVICE_PATH Emmc
;
1278 HARDDRIVE_DEVICE_PATH HardDrive
;
1279 CDROM_DEVICE_PATH CD
;
1281 FILEPATH_DEVICE_PATH FilePath
;
1282 MEDIA_PROTOCOL_DEVICE_PATH MediaProtocol
;
1284 MEDIA_FW_VOL_DEVICE_PATH FirmwareVolume
;
1285 MEDIA_FW_VOL_FILEPATH_DEVICE_PATH FirmwareFile
;
1286 MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH Offset
;
1287 MEDIA_RAM_DISK_DEVICE_PATH RamDisk
;
1288 BBS_BBS_DEVICE_PATH Bbs
;
1294 EFI_DEVICE_PATH_PROTOCOL
*DevPath
;
1295 PCI_DEVICE_PATH
*Pci
;
1296 PCCARD_DEVICE_PATH
*PcCard
;
1297 MEMMAP_DEVICE_PATH
*MemMap
;
1298 VENDOR_DEVICE_PATH
*Vendor
;
1300 CONTROLLER_DEVICE_PATH
*Controller
;
1301 BMC_DEVICE_PATH
*Bmc
;
1302 ACPI_HID_DEVICE_PATH
*Acpi
;
1303 ACPI_EXTENDED_HID_DEVICE_PATH
*ExtendedAcpi
;
1304 ACPI_ADR_DEVICE_PATH
*AcpiAdr
;
1306 ATAPI_DEVICE_PATH
*Atapi
;
1307 SCSI_DEVICE_PATH
*Scsi
;
1308 ISCSI_DEVICE_PATH
*Iscsi
;
1309 FIBRECHANNEL_DEVICE_PATH
*FibreChannel
;
1310 FIBRECHANNELEX_DEVICE_PATH
*FibreChannelEx
;
1312 F1394_DEVICE_PATH
*F1394
;
1313 USB_DEVICE_PATH
*Usb
;
1314 SATA_DEVICE_PATH
*Sata
;
1315 USB_CLASS_DEVICE_PATH
*UsbClass
;
1316 USB_WWID_DEVICE_PATH
*UsbWwid
;
1317 DEVICE_LOGICAL_UNIT_DEVICE_PATH
*LogicUnit
;
1318 I2O_DEVICE_PATH
*I2O
;
1319 MAC_ADDR_DEVICE_PATH
*MacAddr
;
1320 IPv4_DEVICE_PATH
*Ipv4
;
1321 IPv6_DEVICE_PATH
*Ipv6
;
1322 VLAN_DEVICE_PATH
*Vlan
;
1323 INFINIBAND_DEVICE_PATH
*InfiniBand
;
1324 UART_DEVICE_PATH
*Uart
;
1325 UART_FLOW_CONTROL_DEVICE_PATH
*UartFlowControl
;
1326 SAS_DEVICE_PATH
*Sas
;
1327 SASEX_DEVICE_PATH
*SasEx
;
1328 NVME_NAMESPACE_DEVICE_PATH
*NvmeNamespace
;
1329 DNS_DEVICE_PATH
*Dns
;
1330 URI_DEVICE_PATH
*Uri
;
1331 BLUETOOTH_DEVICE_PATH
*Bluetooth
;
1332 WIFI_DEVICE_PATH
*WiFi
;
1333 UFS_DEVICE_PATH
*Ufs
;
1335 EMMC_DEVICE_PATH
*Emmc
;
1336 HARDDRIVE_DEVICE_PATH
*HardDrive
;
1337 CDROM_DEVICE_PATH
*CD
;
1339 FILEPATH_DEVICE_PATH
*FilePath
;
1340 MEDIA_PROTOCOL_DEVICE_PATH
*MediaProtocol
;
1342 MEDIA_FW_VOL_DEVICE_PATH
*FirmwareVolume
;
1343 MEDIA_FW_VOL_FILEPATH_DEVICE_PATH
*FirmwareFile
;
1344 MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH
*Offset
;
1345 MEDIA_RAM_DISK_DEVICE_PATH
*RamDisk
;
1346 BBS_BBS_DEVICE_PATH
*Bbs
;
1352 #define END_DEVICE_PATH_TYPE 0x7f
1353 #define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xFF
1354 #define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01
1356 extern EFI_GUID gEfiDevicePathProtocolGuid
;