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 - 2015, 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 /// ACPI Device Paths.
177 #define ACPI_DEVICE_PATH 0x02
180 /// ACPI Device Path SubType.
184 EFI_DEVICE_PATH_PROTOCOL Header
;
186 /// Device's PnP hardware ID stored in a numeric 32-bit
187 /// compressed EISA-type ID. This value must match the
188 /// corresponding _HID in the ACPI name space.
192 /// Unique ID that is required by ACPI if two devices have the
193 /// same _HID. This value must also match the corresponding
194 /// _UID/_HID pair in the ACPI name space. Only the 32-bit
195 /// numeric value type of _UID is supported. Thus, strings must
196 /// not be used for the _UID in the ACPI name space.
199 } ACPI_HID_DEVICE_PATH
;
202 /// Expanded ACPI Device Path SubType.
204 #define ACPI_EXTENDED_DP 0x02
206 EFI_DEVICE_PATH_PROTOCOL Header
;
208 /// Device's PnP hardware ID stored in a numeric 32-bit
209 /// compressed EISA-type ID. This value must match the
210 /// corresponding _HID in the ACPI name space.
214 /// Unique ID that is required by ACPI if two devices have the
215 /// same _HID. This value must also match the corresponding
216 /// _UID/_HID pair in the ACPI name space.
220 /// Device's compatible PnP hardware ID stored in a numeric
221 /// 32-bit compressed EISA-type ID. This value must match at
222 /// least one of the compatible device IDs returned by the
223 /// corresponding _CID in the ACPI name space.
227 /// Optional variable length _HIDSTR.
228 /// Optional variable length _UIDSTR.
229 /// Optional variable length _CIDSTR.
231 } ACPI_EXTENDED_HID_DEVICE_PATH
;
235 // EISA ID Definition 32-bits
236 // bits[15:0] - three character compressed ASCII EISA ID.
237 // bits[31:16] - binary number
238 // Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'
240 #define PNP_EISA_ID_CONST 0x41d0
241 #define EISA_ID(_Name, _Num) ((UINT32)((_Name) | (_Num) << 16))
242 #define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
243 #define EFI_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
245 #define PNP_EISA_ID_MASK 0xffff
246 #define EISA_ID_TO_NUM(_Id) ((_Id) >> 16)
249 /// ACPI _ADR Device Path SubType.
251 #define ACPI_ADR_DP 0x03
254 /// The _ADR device path is used to contain video output device attributes to support the Graphics
255 /// Output Protocol. The device path can contain multiple _ADR entries if multiple video output
256 /// devices are displaying the same output.
259 EFI_DEVICE_PATH_PROTOCOL Header
;
261 /// _ADR value. For video output devices the value of this
262 /// field comes from Table B-2 of the ACPI 3.0 specification. At
263 /// least one _ADR value is required.
267 // This device path may optionally contain more than one _ADR entry.
269 } ACPI_ADR_DEVICE_PATH
;
271 #define ACPI_ADR_DISPLAY_TYPE_OTHER 0
272 #define ACPI_ADR_DISPLAY_TYPE_VGA 1
273 #define ACPI_ADR_DISPLAY_TYPE_TV 2
274 #define ACPI_ADR_DISPLAY_TYPE_EXTERNAL_DIGITAL 3
275 #define ACPI_ADR_DISPLAY_TYPE_INTERNAL_DIGITAL 4
277 #define ACPI_DISPLAY_ADR(_DeviceIdScheme, _HeadId, _NonVgaOutput, _BiosCanDetect, _VendorInfo, _Type, _Port, _Index) \
278 ((UINT32)( ((UINT32)((_DeviceIdScheme) & 0x1) << 31) | \
279 (((_HeadId) & 0x7) << 18) | \
280 (((_NonVgaOutput) & 0x1) << 17) | \
281 (((_BiosCanDetect) & 0x1) << 16) | \
282 (((_VendorInfo) & 0xf) << 12) | \
283 (((_Type) & 0xf) << 8) | \
284 (((_Port) & 0xf) << 4) | \
288 /// Messaging Device Paths.
289 /// This Device Path is used to describe the connection of devices outside the resource domain of the
290 /// system. This Device Path can describe physical messaging information like SCSI ID, or abstract
291 /// information like networking protocol IP addresses.
293 #define MESSAGING_DEVICE_PATH 0x03
296 /// ATAPI Device Path SubType
298 #define MSG_ATAPI_DP 0x01
300 EFI_DEVICE_PATH_PROTOCOL Header
;
302 /// Set to zero for primary, or one for secondary.
304 UINT8 PrimarySecondary
;
306 /// Set to zero for master, or one for slave mode.
310 /// Logical Unit Number.
316 /// SCSI Device Path SubType.
318 #define MSG_SCSI_DP 0x02
320 EFI_DEVICE_PATH_PROTOCOL Header
;
322 /// Target ID on the SCSI bus (PUN).
326 /// Logical Unit Number (LUN).
332 /// Fibre Channel SubType.
334 #define MSG_FIBRECHANNEL_DP 0x03
336 EFI_DEVICE_PATH_PROTOCOL Header
;
338 /// Reserved for the future.
342 /// Fibre Channel World Wide Number.
346 /// Fibre Channel Logical Unit Number.
349 } FIBRECHANNEL_DEVICE_PATH
;
352 /// Fibre Channel Ex SubType.
354 #define MSG_FIBRECHANNELEX_DP 0x15
356 EFI_DEVICE_PATH_PROTOCOL Header
;
358 /// Reserved for the future.
362 /// 8 byte array containing Fibre Channel End Device Port Name.
366 /// 8 byte array containing Fibre Channel Logical Unit Number.
369 } FIBRECHANNELEX_DEVICE_PATH
;
372 /// 1394 Device Path SubType
374 #define MSG_1394_DP 0x04
376 EFI_DEVICE_PATH_PROTOCOL Header
;
378 /// Reserved for the future.
382 /// 1394 Global Unique ID (GUID).
388 /// USB Device Path SubType.
390 #define MSG_USB_DP 0x05
392 EFI_DEVICE_PATH_PROTOCOL Header
;
394 /// USB Parent Port Number.
396 UINT8 ParentPortNumber
;
398 /// USB Interface Number.
400 UINT8 InterfaceNumber
;
404 /// USB Class Device Path SubType.
406 #define MSG_USB_CLASS_DP 0x0f
408 EFI_DEVICE_PATH_PROTOCOL Header
;
410 /// Vendor ID assigned by USB-IF. A value of 0xFFFF will
411 /// match any Vendor ID.
415 /// Product ID assigned by USB-IF. A value of 0xFFFF will
416 /// match any Product ID.
420 /// The class code assigned by the USB-IF. A value of 0xFF
421 /// will match any class code.
425 /// The subclass code assigned by the USB-IF. A value of
426 /// 0xFF will match any subclass code.
428 UINT8 DeviceSubClass
;
430 /// The protocol code assigned by the USB-IF. A value of
431 /// 0xFF will match any protocol code.
433 UINT8 DeviceProtocol
;
434 } USB_CLASS_DEVICE_PATH
;
437 /// USB WWID Device Path SubType.
439 #define MSG_USB_WWID_DP 0x10
442 /// This device path describes a USB device using its serial number.
445 EFI_DEVICE_PATH_PROTOCOL Header
;
447 /// USB interface number.
449 UINT16 InterfaceNumber
;
451 /// USB vendor id of the device.
455 /// USB product id of the device.
459 /// Last 64-or-fewer UTF-16 characters of the USB
460 /// serial number. The length of the string is
461 /// determined by the Length field less the offset of the
462 /// Serial Number field (10)
464 /// CHAR16 SerialNumber[...];
465 } USB_WWID_DEVICE_PATH
;
468 /// Device Logical Unit SubType.
470 #define MSG_DEVICE_LOGICAL_UNIT_DP 0x11
472 EFI_DEVICE_PATH_PROTOCOL Header
;
474 /// Logical Unit Number for the interface.
477 } DEVICE_LOGICAL_UNIT_DEVICE_PATH
;
480 /// SATA Device Path SubType.
482 #define MSG_SATA_DP 0x12
484 EFI_DEVICE_PATH_PROTOCOL Header
;
486 /// The HBA port number that facilitates the connection to the
487 /// device or a port multiplier. The value 0xFFFF is reserved.
489 UINT16 HBAPortNumber
;
491 /// The Port multiplier port number that facilitates the connection
492 /// to the device. Bit 15 should be set if the device is directly
493 /// connected to the HBA.
495 UINT16 PortMultiplierPortNumber
;
497 /// Logical Unit Number.
503 /// Flag for if the device is directly connected to the HBA.
505 #define SATA_HBA_DIRECT_CONNECT_FLAG 0x8000
508 /// I2O Device Path SubType.
510 #define MSG_I2O_DP 0x06
512 EFI_DEVICE_PATH_PROTOCOL Header
;
514 /// Target ID (TID) for a device.
520 /// MAC Address Device Path SubType.
522 #define MSG_MAC_ADDR_DP 0x0b
524 EFI_DEVICE_PATH_PROTOCOL Header
;
526 /// The MAC address for a network interface padded with 0s.
528 EFI_MAC_ADDRESS MacAddress
;
530 /// Network interface type(i.e. 802.3, FDDI).
533 } MAC_ADDR_DEVICE_PATH
;
536 /// IPv4 Device Path SubType
538 #define MSG_IPv4_DP 0x0c
540 EFI_DEVICE_PATH_PROTOCOL Header
;
542 /// The local IPv4 address.
544 EFI_IPv4_ADDRESS LocalIpAddress
;
546 /// The remote IPv4 address.
548 EFI_IPv4_ADDRESS RemoteIpAddress
;
550 /// The local port number.
554 /// The remote port number.
558 /// The network protocol(i.e. UDP, TCP).
562 /// 0x00 - The Source IP Address was assigned though DHCP.
563 /// 0x01 - The Source IP Address is statically bound.
565 BOOLEAN StaticIpAddress
;
567 /// The gateway IP address
569 EFI_IPv4_ADDRESS GatewayIpAddress
;
573 EFI_IPv4_ADDRESS SubnetMask
;
577 /// IPv6 Device Path SubType.
579 #define MSG_IPv6_DP 0x0d
581 EFI_DEVICE_PATH_PROTOCOL Header
;
583 /// The local IPv6 address.
585 EFI_IPv6_ADDRESS LocalIpAddress
;
587 /// The remote IPv6 address.
589 EFI_IPv6_ADDRESS RemoteIpAddress
;
591 /// The local port number.
595 /// The remote port number.
599 /// The network protocol(i.e. UDP, TCP).
603 /// 0x00 - The Local IP Address was manually configured.
604 /// 0x01 - The Local IP Address is assigned through IPv6
605 /// stateless auto-configuration.
606 /// 0x02 - The Local IP Address is assigned through IPv6
607 /// stateful configuration.
609 UINT8 IpAddressOrigin
;
611 /// The prefix length
615 /// The gateway IP address
617 EFI_IPv6_ADDRESS GatewayIpAddress
;
621 /// InfiniBand Device Path SubType.
623 #define MSG_INFINIBAND_DP 0x09
625 EFI_DEVICE_PATH_PROTOCOL Header
;
627 /// Flags to help identify/manage InfiniBand device path elements:
628 /// Bit 0 - IOC/Service (0b = IOC, 1b = Service).
629 /// Bit 1 - Extend Boot Environment.
630 /// Bit 2 - Console Protocol.
631 /// Bit 3 - Storage Protocol.
632 /// Bit 4 - Network Protocol.
633 /// All other bits are reserved.
635 UINT32 ResourceFlags
;
637 /// 128-bit Global Identifier for remote fabric port.
641 /// 64-bit unique identifier to remote IOC or server process.
642 /// Interpretation of field specified by Resource Flags (bit 0).
646 /// 64-bit persistent ID of remote IOC port.
650 /// 64-bit persistent ID of remote device.
653 } INFINIBAND_DEVICE_PATH
;
655 #define INFINIBAND_RESOURCE_FLAG_IOC_SERVICE 0x01
656 #define INFINIBAND_RESOURCE_FLAG_EXTENDED_BOOT_ENVIRONMENT 0x02
657 #define INFINIBAND_RESOURCE_FLAG_CONSOLE_PROTOCOL 0x04
658 #define INFINIBAND_RESOURCE_FLAG_STORAGE_PROTOCOL 0x08
659 #define INFINIBAND_RESOURCE_FLAG_NETWORK_PROTOCOL 0x10
662 /// UART Device Path SubType.
664 #define MSG_UART_DP 0x0e
666 EFI_DEVICE_PATH_PROTOCOL Header
;
672 /// The baud rate setting for the UART style device. A value of 0
673 /// means that the device's default baud rate will be used.
677 /// The number of data bits for the UART style device. A value
678 /// of 0 means that the device's default number of data bits will be used.
682 /// The parity setting for the UART style device.
683 /// Parity 0x00 - Default Parity.
684 /// Parity 0x01 - No Parity.
685 /// Parity 0x02 - Even Parity.
686 /// Parity 0x03 - Odd Parity.
687 /// Parity 0x04 - Mark Parity.
688 /// Parity 0x05 - Space Parity.
692 /// The number of stop bits for the UART style device.
693 /// Stop Bits 0x00 - Default Stop Bits.
694 /// Stop Bits 0x01 - 1 Stop Bit.
695 /// Stop Bits 0x02 - 1.5 Stop Bits.
696 /// Stop Bits 0x03 - 2 Stop Bits.
702 // Use VENDOR_DEVICE_PATH struct
704 #define MSG_VENDOR_DP 0x0a
705 typedef VENDOR_DEVICE_PATH VENDOR_DEFINED_DEVICE_PATH
;
707 #define DEVICE_PATH_MESSAGING_PC_ANSI EFI_PC_ANSI_GUID
708 #define DEVICE_PATH_MESSAGING_VT_100 EFI_VT_100_GUID
709 #define DEVICE_PATH_MESSAGING_VT_100_PLUS EFI_VT_100_PLUS_GUID
710 #define DEVICE_PATH_MESSAGING_VT_UTF8 EFI_VT_UTF8_GUID
713 /// A new device path node is defined to declare flow control characteristics.
714 /// UART Flow Control Messaging Device Path
717 EFI_DEVICE_PATH_PROTOCOL Header
;
719 /// DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL GUID.
723 /// Bitmap of supported flow control types.
724 /// Bit 0 set indicates hardware flow control.
725 /// Bit 1 set indicates Xon/Xoff flow control.
726 /// All other bits are reserved and are clear.
728 UINT32 FlowControlMap
;
729 } UART_FLOW_CONTROL_DEVICE_PATH
;
731 #define UART_FLOW_CONTROL_HARDWARE 0x00000001
732 #define UART_FLOW_CONTROL_XON_XOFF 0x00000010
734 #define DEVICE_PATH_MESSAGING_SAS EFI_SAS_DEVICE_PATH_GUID
736 /// Serial Attached SCSI (SAS) Device Path.
739 EFI_DEVICE_PATH_PROTOCOL Header
;
741 /// DEVICE_PATH_MESSAGING_SAS GUID.
745 /// Reserved for future use.
749 /// SAS Address for Serial Attached SCSI Target.
753 /// SAS Logical Unit Number.
757 /// More Information about the device and its interconnect.
759 UINT16 DeviceTopology
;
761 /// Relative Target Port (RTP).
763 UINT16 RelativeTargetPort
;
767 /// Serial Attached SCSI (SAS) Ex Device Path SubType
769 #define MSG_SASEX_DP 0x16
771 EFI_DEVICE_PATH_PROTOCOL Header
;
773 /// 8-byte array of the SAS Address for Serial Attached SCSI Target Port.
777 /// 8-byte array of the SAS Logical Unit Number.
781 /// More Information about the device and its interconnect.
783 UINT16 DeviceTopology
;
785 /// Relative Target Port (RTP).
787 UINT16 RelativeTargetPort
;
791 /// NvmExpress Namespace Device Path SubType.
793 #define MSG_NVME_NAMESPACE_DP 0x17
795 EFI_DEVICE_PATH_PROTOCOL Header
;
797 UINT64 NamespaceUuid
;
798 } NVME_NAMESPACE_DEVICE_PATH
;
801 /// Uniform Resource Identifiers (URI) Device Path SubType
803 #define MSG_URI_DP 0x18
805 EFI_DEVICE_PATH_PROTOCOL Header
;
807 /// Instance of the URI pursuant to RFC 3986.
813 /// Universal Flash Storage (UFS) Device Path SubType.
815 #define MSG_UFS_DP 0x19
817 EFI_DEVICE_PATH_PROTOCOL Header
;
819 /// Target ID on the UFS bus (PUN).
823 /// Logical Unit Number (LUN).
829 /// SD (Secure Digital) Device Path SubType.
831 #define MSG_SD_DP 0x1A
833 EFI_DEVICE_PATH_PROTOCOL Header
;
838 /// iSCSI Device Path SubType
840 #define MSG_ISCSI_DP 0x13
842 EFI_DEVICE_PATH_PROTOCOL Header
;
844 /// Network Protocol (0 = TCP, 1+ = reserved).
846 UINT16 NetworkProtocol
;
848 /// iSCSI Login Options.
852 /// iSCSI Logical Unit Number.
856 /// iSCSI Target Portal group tag the initiator intends
857 /// to establish a session with.
859 UINT16 TargetPortalGroupTag
;
861 /// iSCSI NodeTarget Name. The length of the name
862 /// is determined by subtracting the offset of this field from Length.
864 /// CHAR8 iSCSI Target Name.
867 #define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST 0x0000
868 #define ISCSI_LOGIN_OPTION_HEADER_DIGEST_USING_CRC32C 0x0002
869 #define ISCSI_LOGIN_OPTION_NO_DATA_DIGEST 0x0000
870 #define ISCSI_LOGIN_OPTION_DATA_DIGEST_USING_CRC32C 0x0008
871 #define ISCSI_LOGIN_OPTION_AUTHMETHOD_CHAP 0x0000
872 #define ISCSI_LOGIN_OPTION_AUTHMETHOD_NON 0x1000
873 #define ISCSI_LOGIN_OPTION_CHAP_BI 0x0000
874 #define ISCSI_LOGIN_OPTION_CHAP_UNI 0x2000
877 /// VLAN Device Path SubType.
879 #define MSG_VLAN_DP 0x14
881 EFI_DEVICE_PATH_PROTOCOL Header
;
883 /// VLAN identifier (0-4094).
889 /// Bluetooth Device Path SubType.
891 #define MSG_BLUETOOTH_DP 0x1b
893 EFI_DEVICE_PATH_PROTOCOL Header
;
895 /// 48bit Bluetooth device address.
897 BLUETOOTH_ADDRESS BD_ADDR
;
898 } BLUETOOTH_DEVICE_PATH
;
901 /// Wi-Fi Device Path SubType.
903 #define MSG_WIFI_DP 0x1C
905 EFI_DEVICE_PATH_PROTOCOL Header
;
907 /// Service set identifier. A 32-byte octets string.
915 #define MEDIA_DEVICE_PATH 0x04
918 /// Hard Drive Media Device Path SubType.
920 #define MEDIA_HARDDRIVE_DP 0x01
923 /// The Hard Drive Media Device Path is used to represent a partition on a hard drive.
926 EFI_DEVICE_PATH_PROTOCOL Header
;
928 /// Describes the entry in a partition table, starting with entry 1.
929 /// Partition number zero represents the entire device. Valid
930 /// partition numbers for a MBR partition are [1, 4]. Valid
931 /// partition numbers for a GPT partition are [1, NumberOfPartitionEntries].
933 UINT32 PartitionNumber
;
935 /// Starting LBA of the partition on the hard drive.
937 UINT64 PartitionStart
;
939 /// Size of the partition in units of Logical Blocks.
941 UINT64 PartitionSize
;
943 /// Signature unique to this partition:
944 /// If SignatureType is 0, this field has to be initialized with 16 zeros.
945 /// If SignatureType is 1, the MBR signature is stored in the first 4 bytes of this field.
946 /// The other 12 bytes are initialized with zeros.
947 /// If SignatureType is 2, this field contains a 16 byte signature.
951 /// Partition Format: (Unused values reserved).
952 /// 0x01 - PC-AT compatible legacy MBR.
953 /// 0x02 - GUID Partition Table.
957 /// Type of Disk Signature: (Unused values reserved).
958 /// 0x00 - No Disk Signature.
959 /// 0x01 - 32-bit signature from address 0x1b8 of the type 0x01 MBR.
960 /// 0x02 - GUID signature.
963 } HARDDRIVE_DEVICE_PATH
;
965 #define MBR_TYPE_PCAT 0x01
966 #define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02
968 #define NO_DISK_SIGNATURE 0x00
969 #define SIGNATURE_TYPE_MBR 0x01
970 #define SIGNATURE_TYPE_GUID 0x02
973 /// CD-ROM Media Device Path SubType.
975 #define MEDIA_CDROM_DP 0x02
978 /// The CD-ROM Media Device Path is used to define a system partition that exists on a CD-ROM.
981 EFI_DEVICE_PATH_PROTOCOL Header
;
983 /// Boot Entry number from the Boot Catalog. The Initial/Default entry is defined as zero.
987 /// Starting RBA of the partition on the medium. CD-ROMs use Relative logical Block Addressing.
989 UINT64 PartitionStart
;
991 /// Size of the partition in units of Blocks, also called Sectors.
993 UINT64 PartitionSize
;
997 // Use VENDOR_DEVICE_PATH struct
999 #define MEDIA_VENDOR_DP 0x03 ///< Media vendor device path subtype.
1002 /// File Path Media Device Path SubType
1004 #define MEDIA_FILEPATH_DP 0x04
1006 EFI_DEVICE_PATH_PROTOCOL Header
;
1008 /// A NULL-terminated Path string including directory and file names.
1011 } FILEPATH_DEVICE_PATH
;
1013 #define SIZE_OF_FILEPATH_DEVICE_PATH OFFSET_OF(FILEPATH_DEVICE_PATH,PathName)
1016 /// Media Protocol Device Path SubType.
1018 #define MEDIA_PROTOCOL_DP 0x05
1021 /// The Media Protocol Device Path is used to denote the protocol that is being
1022 /// used in a device path at the location of the path specified.
1023 /// Many protocols are inherent to the style of device path.
1026 EFI_DEVICE_PATH_PROTOCOL Header
;
1028 /// The ID of the protocol.
1031 } MEDIA_PROTOCOL_DEVICE_PATH
;
1034 /// PIWG Firmware File SubType.
1036 #define MEDIA_PIWG_FW_FILE_DP 0x06
1039 /// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware file.
1042 EFI_DEVICE_PATH_PROTOCOL Header
;
1044 /// Firmware file name
1046 EFI_GUID FvFileName
;
1047 } MEDIA_FW_VOL_FILEPATH_DEVICE_PATH
;
1050 /// PIWG Firmware Volume Device Path SubType.
1052 #define MEDIA_PIWG_FW_VOL_DP 0x07
1055 /// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware volume.
1058 EFI_DEVICE_PATH_PROTOCOL Header
;
1060 /// Firmware volume name.
1063 } MEDIA_FW_VOL_DEVICE_PATH
;
1066 /// Media relative offset range device path.
1068 #define MEDIA_RELATIVE_OFFSET_RANGE_DP 0x08
1071 /// Used to describe the offset range of media relative.
1074 EFI_DEVICE_PATH_PROTOCOL Header
;
1076 UINT64 StartingOffset
;
1077 UINT64 EndingOffset
;
1078 } MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH
;
1081 /// This GUID defines a RAM Disk supporting a raw disk format in volatile memory.
1083 #define EFI_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE
1085 extern EFI_GUID gEfiVirtualDiskGuid
;
1088 /// This GUID defines a RAM Disk supporting an ISO image in volatile memory.
1090 #define EFI_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE
1092 extern EFI_GUID gEfiVirtualCdGuid
;
1095 /// This GUID defines a RAM Disk supporting a raw disk format in persistent memory.
1097 #define EFI_PERSISTENT_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT
1099 extern EFI_GUID gEfiPersistentVirtualDiskGuid
;
1102 /// This GUID defines a RAM Disk supporting an ISO image in persistent memory.
1104 #define EFI_PERSISTENT_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT
1106 extern EFI_GUID gEfiPersistentVirtualCdGuid
;
1109 /// Media ram disk device path.
1111 #define MEDIA_RAM_DISK_DP 0x09
1114 /// Used to describe the ram disk device path.
1117 EFI_DEVICE_PATH_PROTOCOL Header
;
1119 /// Starting Memory Address.
1121 UINT32 StartingAddr
[2];
1123 /// Ending Memory Address.
1125 UINT32 EndingAddr
[2];
1127 /// GUID that defines the type of the RAM Disk.
1131 /// RAM Diskinstance number, if supported. The default value is zero.
1134 } MEDIA_RAM_DISK_DEVICE_PATH
;
1137 /// BIOS Boot Specification Device Path.
1139 #define BBS_DEVICE_PATH 0x05
1142 /// BIOS Boot Specification Device Path SubType.
1144 #define BBS_BBS_DP 0x01
1147 /// This Device Path is used to describe the booting of non-EFI-aware operating systems.
1150 EFI_DEVICE_PATH_PROTOCOL Header
;
1152 /// Device Type as defined by the BIOS Boot Specification.
1156 /// Status Flags as defined by the BIOS Boot Specification.
1160 /// Null-terminated ASCII string that describes the boot device to a user.
1163 } BBS_BBS_DEVICE_PATH
;
1166 // DeviceType definitions - from BBS specification
1168 #define BBS_TYPE_FLOPPY 0x01
1169 #define BBS_TYPE_HARDDRIVE 0x02
1170 #define BBS_TYPE_CDROM 0x03
1171 #define BBS_TYPE_PCMCIA 0x04
1172 #define BBS_TYPE_USB 0x05
1173 #define BBS_TYPE_EMBEDDED_NETWORK 0x06
1174 #define BBS_TYPE_BEV 0x80
1175 #define BBS_TYPE_UNKNOWN 0xFF
1179 /// Union of all possible Device Paths and pointers to Device Paths.
1182 EFI_DEVICE_PATH_PROTOCOL DevPath
;
1183 PCI_DEVICE_PATH Pci
;
1184 PCCARD_DEVICE_PATH PcCard
;
1185 MEMMAP_DEVICE_PATH MemMap
;
1186 VENDOR_DEVICE_PATH Vendor
;
1188 CONTROLLER_DEVICE_PATH Controller
;
1189 ACPI_HID_DEVICE_PATH Acpi
;
1190 ACPI_EXTENDED_HID_DEVICE_PATH ExtendedAcpi
;
1191 ACPI_ADR_DEVICE_PATH AcpiAdr
;
1193 ATAPI_DEVICE_PATH Atapi
;
1194 SCSI_DEVICE_PATH Scsi
;
1195 ISCSI_DEVICE_PATH Iscsi
;
1196 FIBRECHANNEL_DEVICE_PATH FibreChannel
;
1197 FIBRECHANNELEX_DEVICE_PATH FibreChannelEx
;
1199 F1394_DEVICE_PATH F1394
;
1200 USB_DEVICE_PATH Usb
;
1201 SATA_DEVICE_PATH Sata
;
1202 USB_CLASS_DEVICE_PATH UsbClass
;
1203 USB_WWID_DEVICE_PATH UsbWwid
;
1204 DEVICE_LOGICAL_UNIT_DEVICE_PATH LogicUnit
;
1205 I2O_DEVICE_PATH I2O
;
1206 MAC_ADDR_DEVICE_PATH MacAddr
;
1207 IPv4_DEVICE_PATH Ipv4
;
1208 IPv6_DEVICE_PATH Ipv6
;
1209 VLAN_DEVICE_PATH Vlan
;
1210 INFINIBAND_DEVICE_PATH InfiniBand
;
1211 UART_DEVICE_PATH Uart
;
1212 UART_FLOW_CONTROL_DEVICE_PATH UartFlowControl
;
1213 SAS_DEVICE_PATH Sas
;
1214 SASEX_DEVICE_PATH SasEx
;
1215 NVME_NAMESPACE_DEVICE_PATH NvmeNamespace
;
1216 URI_DEVICE_PATH Uri
;
1217 BLUETOOTH_DEVICE_PATH Bluetooth
;
1218 WIFI_DEVICE_PATH WiFi
;
1219 UFS_DEVICE_PATH Ufs
;
1221 HARDDRIVE_DEVICE_PATH HardDrive
;
1222 CDROM_DEVICE_PATH CD
;
1224 FILEPATH_DEVICE_PATH FilePath
;
1225 MEDIA_PROTOCOL_DEVICE_PATH MediaProtocol
;
1227 MEDIA_FW_VOL_DEVICE_PATH FirmwareVolume
;
1228 MEDIA_FW_VOL_FILEPATH_DEVICE_PATH FirmwareFile
;
1229 MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH Offset
;
1230 MEDIA_RAM_DISK_DEVICE_PATH RamDisk
;
1231 BBS_BBS_DEVICE_PATH Bbs
;
1237 EFI_DEVICE_PATH_PROTOCOL
*DevPath
;
1238 PCI_DEVICE_PATH
*Pci
;
1239 PCCARD_DEVICE_PATH
*PcCard
;
1240 MEMMAP_DEVICE_PATH
*MemMap
;
1241 VENDOR_DEVICE_PATH
*Vendor
;
1243 CONTROLLER_DEVICE_PATH
*Controller
;
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 URI_DEVICE_PATH
*Uri
;
1272 BLUETOOTH_DEVICE_PATH
*Bluetooth
;
1273 WIFI_DEVICE_PATH
*WiFi
;
1274 UFS_DEVICE_PATH
*Ufs
;
1276 HARDDRIVE_DEVICE_PATH
*HardDrive
;
1277 CDROM_DEVICE_PATH
*CD
;
1279 FILEPATH_DEVICE_PATH
*FilePath
;
1280 MEDIA_PROTOCOL_DEVICE_PATH
*MediaProtocol
;
1282 MEDIA_FW_VOL_DEVICE_PATH
*FirmwareVolume
;
1283 MEDIA_FW_VOL_FILEPATH_DEVICE_PATH
*FirmwareFile
;
1284 MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH
*Offset
;
1285 MEDIA_RAM_DISK_DEVICE_PATH
*RamDisk
;
1286 BBS_BBS_DEVICE_PATH
*Bbs
;
1292 #define END_DEVICE_PATH_TYPE 0x7f
1293 #define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xFF
1294 #define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01
1296 extern EFI_GUID gEfiDevicePathProtocolGuid
;