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 - 2018, Intel Corporation. All rights reserved.<BR>
9 SPDX-License-Identifier: BSD-2-Clause-Patent
13 #ifndef __EFI_DEVICE_PATH_PROTOCOL_H__
14 #define __EFI_DEVICE_PATH_PROTOCOL_H__
16 #include <Guid/PcAnsi.h>
17 #include <IndustryStandard/Bluetooth.h>
18 #include <IndustryStandard/Acpi60.h>
21 /// Device Path protocol.
23 #define EFI_DEVICE_PATH_PROTOCOL_GUID \
25 0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
29 /// Device Path guid definition for backward-compatible with EFI1.1.
31 #define DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH_PROTOCOL_GUID
36 This protocol can be used on any device handle to obtain generic path/location
37 information concerning the physical device or logical device. If the handle does
38 not logically map to a physical device, the handle may not necessarily support
39 the device path protocol. The device path describes the location of the device
40 the handle is for. The size of the Device Path can be determined from the structures
41 that make up the Device Path.
44 UINT8 Type
; ///< 0x01 Hardware Device Path.
45 ///< 0x02 ACPI Device Path.
46 ///< 0x03 Messaging Device Path.
47 ///< 0x04 Media Device Path.
48 ///< 0x05 BIOS Boot Specification Device Path.
49 ///< 0x7F End of Hardware Device Path.
51 UINT8 SubType
; ///< Varies by Type
52 ///< 0xFF End Entire Device Path, or
53 ///< 0x01 End This Instance of a Device Path and start a new
56 UINT8 Length
[2]; ///< Specific Device Path data. Type and Sub-Type define
57 ///< type of data. Size of data is included in Length.
58 } EFI_DEVICE_PATH_PROTOCOL
;
61 /// Device Path protocol definition for backward-compatible with EFI1.1.
63 typedef EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH
;
66 /// Hardware Device Paths.
68 #define HARDWARE_DEVICE_PATH 0x01
71 /// PCI Device Path SubType.
73 #define HW_PCI_DP 0x01
79 EFI_DEVICE_PATH_PROTOCOL Header
;
81 /// PCI Function Number.
85 /// PCI Device Number.
91 /// PCCARD Device Path SubType.
93 #define HW_PCCARD_DP 0x02
96 /// PCCARD Device Path.
99 EFI_DEVICE_PATH_PROTOCOL Header
;
101 /// Function Number (0 = First Function).
103 UINT8 FunctionNumber
;
104 } PCCARD_DEVICE_PATH
;
107 /// Memory Mapped Device Path SubType.
109 #define HW_MEMMAP_DP 0x03
112 /// Memory Mapped Device Path.
115 EFI_DEVICE_PATH_PROTOCOL Header
;
121 /// Starting Memory Address.
123 EFI_PHYSICAL_ADDRESS StartingAddress
;
125 /// Ending Memory Address.
127 EFI_PHYSICAL_ADDRESS EndingAddress
;
128 } MEMMAP_DEVICE_PATH
;
131 /// Hardware Vendor Device Path SubType.
133 #define HW_VENDOR_DP 0x04
136 /// The Vendor Device Path allows the creation of vendor-defined Device Paths. A vendor must
137 /// allocate a Vendor GUID for a Device Path. The Vendor GUID can then be used to define the
138 /// contents on the n bytes that follow in the Vendor Device Path node.
141 EFI_DEVICE_PATH_PROTOCOL Header
;
143 /// Vendor-assigned GUID that defines the data that follows.
147 /// Vendor-defined variable size data.
149 } VENDOR_DEVICE_PATH
;
152 /// Controller Device Path SubType.
154 #define HW_CONTROLLER_DP 0x05
157 /// Controller Device Path.
160 EFI_DEVICE_PATH_PROTOCOL Header
;
162 /// Controller number.
164 UINT32 ControllerNumber
;
165 } CONTROLLER_DEVICE_PATH
;
168 /// BMC Device Path SubType.
170 #define HW_BMC_DP 0x06
176 EFI_DEVICE_PATH_PROTOCOL Header
;
184 UINT8 BaseAddress
[8];
188 /// ACPI Device Paths.
190 #define ACPI_DEVICE_PATH 0x02
193 /// ACPI Device Path SubType.
197 EFI_DEVICE_PATH_PROTOCOL Header
;
199 /// Device's PnP hardware ID stored in a numeric 32-bit
200 /// compressed EISA-type ID. This value must match the
201 /// corresponding _HID in the ACPI name space.
205 /// Unique ID that is required by ACPI if two devices have the
206 /// same _HID. This value must also match the corresponding
207 /// _UID/_HID pair in the ACPI name space. Only the 32-bit
208 /// numeric value type of _UID is supported. Thus, strings must
209 /// not be used for the _UID in the ACPI name space.
212 } ACPI_HID_DEVICE_PATH
;
215 /// Expanded ACPI Device Path SubType.
217 #define ACPI_EXTENDED_DP 0x02
219 EFI_DEVICE_PATH_PROTOCOL Header
;
221 /// Device's PnP hardware ID stored in a numeric 32-bit
222 /// compressed EISA-type ID. This value must match the
223 /// corresponding _HID in the ACPI name space.
227 /// Unique ID that is required by ACPI if two devices have the
228 /// same _HID. This value must also match the corresponding
229 /// _UID/_HID pair in the ACPI name space.
233 /// Device's compatible PnP hardware ID stored in a numeric
234 /// 32-bit compressed EISA-type ID. This value must match at
235 /// least one of the compatible device IDs returned by the
236 /// corresponding _CID in the ACPI name space.
240 /// Optional variable length _HIDSTR.
241 /// Optional variable length _UIDSTR.
242 /// Optional variable length _CIDSTR.
244 } ACPI_EXTENDED_HID_DEVICE_PATH
;
248 // EISA ID Definition 32-bits
249 // bits[15:0] - three character compressed ASCII EISA ID.
250 // bits[31:16] - binary number
251 // Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'
253 #define PNP_EISA_ID_CONST 0x41d0
254 #define EISA_ID(_Name, _Num) ((UINT32)((_Name) | (_Num) << 16))
255 #define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
256 #define EFI_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
258 #define PNP_EISA_ID_MASK 0xffff
259 #define EISA_ID_TO_NUM(_Id) ((_Id) >> 16)
262 /// ACPI _ADR Device Path SubType.
264 #define ACPI_ADR_DP 0x03
267 /// The _ADR device path is used to contain video output device attributes to support the Graphics
268 /// Output Protocol. The device path can contain multiple _ADR entries if multiple video output
269 /// devices are displaying the same output.
272 EFI_DEVICE_PATH_PROTOCOL Header
;
274 /// _ADR value. For video output devices the value of this
275 /// field comes from Table B-2 of the ACPI 3.0 specification. At
276 /// least one _ADR value is required.
280 // This device path may optionally contain more than one _ADR entry.
282 } ACPI_ADR_DEVICE_PATH
;
285 /// ACPI NVDIMM Device Path SubType.
287 #define ACPI_NVDIMM_DP 0x04
291 EFI_DEVICE_PATH_PROTOCOL Header
;
293 /// NFIT Device Handle, the _ADR of the NVDIMM device.
294 /// The value of this field comes from Section 9.20.3 of the ACPI 6.2A specification.
296 UINT32 NFITDeviceHandle
;
297 } ACPI_NVDIMM_DEVICE_PATH
;
299 #define ACPI_ADR_DISPLAY_TYPE_OTHER 0
300 #define ACPI_ADR_DISPLAY_TYPE_VGA 1
301 #define ACPI_ADR_DISPLAY_TYPE_TV 2
302 #define ACPI_ADR_DISPLAY_TYPE_EXTERNAL_DIGITAL 3
303 #define ACPI_ADR_DISPLAY_TYPE_INTERNAL_DIGITAL 4
305 #define ACPI_DISPLAY_ADR(_DeviceIdScheme, _HeadId, _NonVgaOutput, _BiosCanDetect, _VendorInfo, _Type, _Port, _Index) \
306 ((UINT32)( ((UINT32)((_DeviceIdScheme) & 0x1) << 31) | \
307 (((_HeadId) & 0x7) << 18) | \
308 (((_NonVgaOutput) & 0x1) << 17) | \
309 (((_BiosCanDetect) & 0x1) << 16) | \
310 (((_VendorInfo) & 0xf) << 12) | \
311 (((_Type) & 0xf) << 8) | \
312 (((_Port) & 0xf) << 4) | \
316 /// Messaging Device Paths.
317 /// This Device Path is used to describe the connection of devices outside the resource domain of the
318 /// system. This Device Path can describe physical messaging information like SCSI ID, or abstract
319 /// information like networking protocol IP addresses.
321 #define MESSAGING_DEVICE_PATH 0x03
324 /// ATAPI Device Path SubType
326 #define MSG_ATAPI_DP 0x01
328 EFI_DEVICE_PATH_PROTOCOL Header
;
330 /// Set to zero for primary, or one for secondary.
332 UINT8 PrimarySecondary
;
334 /// Set to zero for master, or one for slave mode.
338 /// Logical Unit Number.
344 /// SCSI Device Path SubType.
346 #define MSG_SCSI_DP 0x02
348 EFI_DEVICE_PATH_PROTOCOL Header
;
350 /// Target ID on the SCSI bus (PUN).
354 /// Logical Unit Number (LUN).
360 /// Fibre Channel SubType.
362 #define MSG_FIBRECHANNEL_DP 0x03
364 EFI_DEVICE_PATH_PROTOCOL Header
;
366 /// Reserved for the future.
370 /// Fibre Channel World Wide Number.
374 /// Fibre Channel Logical Unit Number.
377 } FIBRECHANNEL_DEVICE_PATH
;
380 /// Fibre Channel Ex SubType.
382 #define MSG_FIBRECHANNELEX_DP 0x15
384 EFI_DEVICE_PATH_PROTOCOL Header
;
386 /// Reserved for the future.
390 /// 8 byte array containing Fibre Channel End Device Port Name.
394 /// 8 byte array containing Fibre Channel Logical Unit Number.
397 } FIBRECHANNELEX_DEVICE_PATH
;
400 /// 1394 Device Path SubType
402 #define MSG_1394_DP 0x04
404 EFI_DEVICE_PATH_PROTOCOL Header
;
406 /// Reserved for the future.
410 /// 1394 Global Unique ID (GUID).
416 /// USB Device Path SubType.
418 #define MSG_USB_DP 0x05
420 EFI_DEVICE_PATH_PROTOCOL Header
;
422 /// USB Parent Port Number.
424 UINT8 ParentPortNumber
;
426 /// USB Interface Number.
428 UINT8 InterfaceNumber
;
432 /// USB Class Device Path SubType.
434 #define MSG_USB_CLASS_DP 0x0f
436 EFI_DEVICE_PATH_PROTOCOL Header
;
438 /// Vendor ID assigned by USB-IF. A value of 0xFFFF will
439 /// match any Vendor ID.
443 /// Product ID assigned by USB-IF. A value of 0xFFFF will
444 /// match any Product ID.
448 /// The class code assigned by the USB-IF. A value of 0xFF
449 /// will match any class code.
453 /// The subclass code assigned by the USB-IF. A value of
454 /// 0xFF will match any subclass code.
456 UINT8 DeviceSubClass
;
458 /// The protocol code assigned by the USB-IF. A value of
459 /// 0xFF will match any protocol code.
461 UINT8 DeviceProtocol
;
462 } USB_CLASS_DEVICE_PATH
;
465 /// USB WWID Device Path SubType.
467 #define MSG_USB_WWID_DP 0x10
470 /// This device path describes a USB device using its serial number.
473 EFI_DEVICE_PATH_PROTOCOL Header
;
475 /// USB interface number.
477 UINT16 InterfaceNumber
;
479 /// USB vendor id of the device.
483 /// USB product id of the device.
487 /// Last 64-or-fewer UTF-16 characters of the USB
488 /// serial number. The length of the string is
489 /// determined by the Length field less the offset of the
490 /// Serial Number field (10)
492 /// CHAR16 SerialNumber[...];
493 } USB_WWID_DEVICE_PATH
;
496 /// Device Logical Unit SubType.
498 #define MSG_DEVICE_LOGICAL_UNIT_DP 0x11
500 EFI_DEVICE_PATH_PROTOCOL Header
;
502 /// Logical Unit Number for the interface.
505 } DEVICE_LOGICAL_UNIT_DEVICE_PATH
;
508 /// SATA Device Path SubType.
510 #define MSG_SATA_DP 0x12
512 EFI_DEVICE_PATH_PROTOCOL Header
;
514 /// The HBA port number that facilitates the connection to the
515 /// device or a port multiplier. The value 0xFFFF is reserved.
517 UINT16 HBAPortNumber
;
519 /// The Port multiplier port number that facilitates the connection
520 /// to the device. Must be set to 0xFFFF if the device is directly
521 /// connected to the HBA.
523 UINT16 PortMultiplierPortNumber
;
525 /// Logical Unit Number.
531 /// Flag for if the device is directly connected to the HBA.
533 #define SATA_HBA_DIRECT_CONNECT_FLAG 0x8000
536 /// I2O Device Path SubType.
538 #define MSG_I2O_DP 0x06
540 EFI_DEVICE_PATH_PROTOCOL Header
;
542 /// Target ID (TID) for a device.
548 /// MAC Address Device Path SubType.
550 #define MSG_MAC_ADDR_DP 0x0b
552 EFI_DEVICE_PATH_PROTOCOL Header
;
554 /// The MAC address for a network interface padded with 0s.
556 EFI_MAC_ADDRESS MacAddress
;
558 /// Network interface type(i.e. 802.3, FDDI).
561 } MAC_ADDR_DEVICE_PATH
;
564 /// IPv4 Device Path SubType
566 #define MSG_IPv4_DP 0x0c
568 EFI_DEVICE_PATH_PROTOCOL Header
;
570 /// The local IPv4 address.
572 EFI_IPv4_ADDRESS LocalIpAddress
;
574 /// The remote IPv4 address.
576 EFI_IPv4_ADDRESS RemoteIpAddress
;
578 /// The local port number.
582 /// The remote port number.
586 /// The network protocol(i.e. UDP, TCP).
590 /// 0x00 - The Source IP Address was assigned though DHCP.
591 /// 0x01 - The Source IP Address is statically bound.
593 BOOLEAN StaticIpAddress
;
595 /// The gateway IP address
597 EFI_IPv4_ADDRESS GatewayIpAddress
;
601 EFI_IPv4_ADDRESS SubnetMask
;
605 /// IPv6 Device Path SubType.
607 #define MSG_IPv6_DP 0x0d
609 EFI_DEVICE_PATH_PROTOCOL Header
;
611 /// The local IPv6 address.
613 EFI_IPv6_ADDRESS LocalIpAddress
;
615 /// The remote IPv6 address.
617 EFI_IPv6_ADDRESS RemoteIpAddress
;
619 /// The local port number.
623 /// The remote port number.
627 /// The network protocol(i.e. UDP, TCP).
631 /// 0x00 - The Local IP Address was manually configured.
632 /// 0x01 - The Local IP Address is assigned through IPv6
633 /// stateless auto-configuration.
634 /// 0x02 - The Local IP Address is assigned through IPv6
635 /// stateful configuration.
637 UINT8 IpAddressOrigin
;
639 /// The prefix length
643 /// The gateway IP address
645 EFI_IPv6_ADDRESS GatewayIpAddress
;
649 /// InfiniBand Device Path SubType.
651 #define MSG_INFINIBAND_DP 0x09
653 EFI_DEVICE_PATH_PROTOCOL Header
;
655 /// Flags to help identify/manage InfiniBand device path elements:
656 /// Bit 0 - IOC/Service (0b = IOC, 1b = Service).
657 /// Bit 1 - Extend Boot Environment.
658 /// Bit 2 - Console Protocol.
659 /// Bit 3 - Storage Protocol.
660 /// Bit 4 - Network Protocol.
661 /// All other bits are reserved.
663 UINT32 ResourceFlags
;
665 /// 128-bit Global Identifier for remote fabric port.
669 /// 64-bit unique identifier to remote IOC or server process.
670 /// Interpretation of field specified by Resource Flags (bit 0).
674 /// 64-bit persistent ID of remote IOC port.
678 /// 64-bit persistent ID of remote device.
681 } INFINIBAND_DEVICE_PATH
;
683 #define INFINIBAND_RESOURCE_FLAG_IOC_SERVICE 0x01
684 #define INFINIBAND_RESOURCE_FLAG_EXTENDED_BOOT_ENVIRONMENT 0x02
685 #define INFINIBAND_RESOURCE_FLAG_CONSOLE_PROTOCOL 0x04
686 #define INFINIBAND_RESOURCE_FLAG_STORAGE_PROTOCOL 0x08
687 #define INFINIBAND_RESOURCE_FLAG_NETWORK_PROTOCOL 0x10
690 /// UART Device Path SubType.
692 #define MSG_UART_DP 0x0e
694 EFI_DEVICE_PATH_PROTOCOL Header
;
700 /// The baud rate setting for the UART style device. A value of 0
701 /// means that the device's default baud rate will be used.
705 /// The number of data bits for the UART style device. A value
706 /// of 0 means that the device's default number of data bits will be used.
710 /// The parity setting for the UART style device.
711 /// Parity 0x00 - Default Parity.
712 /// Parity 0x01 - No Parity.
713 /// Parity 0x02 - Even Parity.
714 /// Parity 0x03 - Odd Parity.
715 /// Parity 0x04 - Mark Parity.
716 /// Parity 0x05 - Space Parity.
720 /// The number of stop bits for the UART style device.
721 /// Stop Bits 0x00 - Default Stop Bits.
722 /// Stop Bits 0x01 - 1 Stop Bit.
723 /// Stop Bits 0x02 - 1.5 Stop Bits.
724 /// Stop Bits 0x03 - 2 Stop Bits.
730 /// NVDIMM Namespace Device Path SubType.
732 #define NVDIMM_NAMESPACE_DP 0x20
734 EFI_DEVICE_PATH_PROTOCOL Header
;
736 /// Namespace unique label identifier UUID.
739 } NVDIMM_NAMESPACE_DEVICE_PATH
;
742 // Use VENDOR_DEVICE_PATH struct
744 #define MSG_VENDOR_DP 0x0a
745 typedef VENDOR_DEVICE_PATH VENDOR_DEFINED_DEVICE_PATH
;
747 #define DEVICE_PATH_MESSAGING_PC_ANSI EFI_PC_ANSI_GUID
748 #define DEVICE_PATH_MESSAGING_VT_100 EFI_VT_100_GUID
749 #define DEVICE_PATH_MESSAGING_VT_100_PLUS EFI_VT_100_PLUS_GUID
750 #define DEVICE_PATH_MESSAGING_VT_UTF8 EFI_VT_UTF8_GUID
753 /// A new device path node is defined to declare flow control characteristics.
754 /// UART Flow Control Messaging Device Path
757 EFI_DEVICE_PATH_PROTOCOL Header
;
759 /// DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL GUID.
763 /// Bitmap of supported flow control types.
764 /// Bit 0 set indicates hardware flow control.
765 /// Bit 1 set indicates Xon/Xoff flow control.
766 /// All other bits are reserved and are clear.
768 UINT32 FlowControlMap
;
769 } UART_FLOW_CONTROL_DEVICE_PATH
;
771 #define UART_FLOW_CONTROL_HARDWARE 0x00000001
772 #define UART_FLOW_CONTROL_XON_XOFF 0x00000010
774 #define DEVICE_PATH_MESSAGING_SAS EFI_SAS_DEVICE_PATH_GUID
776 /// Serial Attached SCSI (SAS) Device Path.
779 EFI_DEVICE_PATH_PROTOCOL Header
;
781 /// DEVICE_PATH_MESSAGING_SAS GUID.
785 /// Reserved for future use.
789 /// SAS Address for Serial Attached SCSI Target.
793 /// SAS Logical Unit Number.
797 /// More Information about the device and its interconnect.
799 UINT16 DeviceTopology
;
801 /// Relative Target Port (RTP).
803 UINT16 RelativeTargetPort
;
807 /// Serial Attached SCSI (SAS) Ex Device Path SubType
809 #define MSG_SASEX_DP 0x16
811 EFI_DEVICE_PATH_PROTOCOL Header
;
813 /// 8-byte array of the SAS Address for Serial Attached SCSI Target Port.
817 /// 8-byte array of the SAS Logical Unit Number.
821 /// More Information about the device and its interconnect.
823 UINT16 DeviceTopology
;
825 /// Relative Target Port (RTP).
827 UINT16 RelativeTargetPort
;
831 /// NvmExpress Namespace Device Path SubType.
833 #define MSG_NVME_NAMESPACE_DP 0x17
835 EFI_DEVICE_PATH_PROTOCOL Header
;
837 UINT64 NamespaceUuid
;
838 } NVME_NAMESPACE_DEVICE_PATH
;
841 /// DNS Device Path SubType
843 #define MSG_DNS_DP 0x1F
845 EFI_DEVICE_PATH_PROTOCOL Header
;
847 /// Indicates the DNS server address is IPv4 or IPv6 address.
851 /// Instance of the DNS server address.
853 EFI_IP_ADDRESS DnsServerIp
[];
857 /// Uniform Resource Identifiers (URI) Device Path SubType
859 #define MSG_URI_DP 0x18
861 EFI_DEVICE_PATH_PROTOCOL Header
;
863 /// Instance of the URI pursuant to RFC 3986.
869 /// Universal Flash Storage (UFS) Device Path SubType.
871 #define MSG_UFS_DP 0x19
873 EFI_DEVICE_PATH_PROTOCOL Header
;
875 /// Target ID on the UFS bus (PUN).
879 /// Logical Unit Number (LUN).
885 /// SD (Secure Digital) Device Path SubType.
887 #define MSG_SD_DP 0x1A
889 EFI_DEVICE_PATH_PROTOCOL Header
;
894 /// EMMC (Embedded MMC) Device Path SubType.
896 #define MSG_EMMC_DP 0x1D
898 EFI_DEVICE_PATH_PROTOCOL Header
;
903 /// iSCSI Device Path SubType
905 #define MSG_ISCSI_DP 0x13
907 EFI_DEVICE_PATH_PROTOCOL Header
;
909 /// Network Protocol (0 = TCP, 1+ = reserved).
911 UINT16 NetworkProtocol
;
913 /// iSCSI Login Options.
917 /// iSCSI Logical Unit Number.
921 /// iSCSI Target Portal group tag the initiator intends
922 /// to establish a session with.
924 UINT16 TargetPortalGroupTag
;
926 /// iSCSI NodeTarget Name. The length of the name
927 /// is determined by subtracting the offset of this field from Length.
929 /// CHAR8 iSCSI Target Name.
932 #define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST 0x0000
933 #define ISCSI_LOGIN_OPTION_HEADER_DIGEST_USING_CRC32C 0x0002
934 #define ISCSI_LOGIN_OPTION_NO_DATA_DIGEST 0x0000
935 #define ISCSI_LOGIN_OPTION_DATA_DIGEST_USING_CRC32C 0x0008
936 #define ISCSI_LOGIN_OPTION_AUTHMETHOD_CHAP 0x0000
937 #define ISCSI_LOGIN_OPTION_AUTHMETHOD_NON 0x1000
938 #define ISCSI_LOGIN_OPTION_CHAP_BI 0x0000
939 #define ISCSI_LOGIN_OPTION_CHAP_UNI 0x2000
942 /// VLAN Device Path SubType.
944 #define MSG_VLAN_DP 0x14
946 EFI_DEVICE_PATH_PROTOCOL Header
;
948 /// VLAN identifier (0-4094).
954 /// Bluetooth Device Path SubType.
956 #define MSG_BLUETOOTH_DP 0x1b
958 EFI_DEVICE_PATH_PROTOCOL Header
;
960 /// 48bit Bluetooth device address.
962 BLUETOOTH_ADDRESS BD_ADDR
;
963 } BLUETOOTH_DEVICE_PATH
;
966 /// Wi-Fi Device Path SubType.
968 #define MSG_WIFI_DP 0x1C
970 EFI_DEVICE_PATH_PROTOCOL Header
;
972 /// Service set identifier. A 32-byte octets string.
978 /// Bluetooth LE Device Path SubType.
980 #define MSG_BLUETOOTH_LE_DP 0x1E
982 EFI_DEVICE_PATH_PROTOCOL Header
;
983 BLUETOOTH_LE_ADDRESS Address
;
984 } BLUETOOTH_LE_DEVICE_PATH
;
989 #define MEDIA_DEVICE_PATH 0x04
992 /// Hard Drive Media Device Path SubType.
994 #define MEDIA_HARDDRIVE_DP 0x01
997 /// The Hard Drive Media Device Path is used to represent a partition on a hard drive.
1000 EFI_DEVICE_PATH_PROTOCOL Header
;
1002 /// Describes the entry in a partition table, starting with entry 1.
1003 /// Partition number zero represents the entire device. Valid
1004 /// partition numbers for a MBR partition are [1, 4]. Valid
1005 /// partition numbers for a GPT partition are [1, NumberOfPartitionEntries].
1007 UINT32 PartitionNumber
;
1009 /// Starting LBA of the partition on the hard drive.
1011 UINT64 PartitionStart
;
1013 /// Size of the partition in units of Logical Blocks.
1015 UINT64 PartitionSize
;
1017 /// Signature unique to this partition:
1018 /// If SignatureType is 0, this field has to be initialized with 16 zeros.
1019 /// If SignatureType is 1, the MBR signature is stored in the first 4 bytes of this field.
1020 /// The other 12 bytes are initialized with zeros.
1021 /// If SignatureType is 2, this field contains a 16 byte signature.
1023 UINT8 Signature
[16];
1025 /// Partition Format: (Unused values reserved).
1026 /// 0x01 - PC-AT compatible legacy MBR.
1027 /// 0x02 - GUID Partition Table.
1031 /// Type of Disk Signature: (Unused values reserved).
1032 /// 0x00 - No Disk Signature.
1033 /// 0x01 - 32-bit signature from address 0x1b8 of the type 0x01 MBR.
1034 /// 0x02 - GUID signature.
1036 UINT8 SignatureType
;
1037 } HARDDRIVE_DEVICE_PATH
;
1039 #define MBR_TYPE_PCAT 0x01
1040 #define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02
1042 #define NO_DISK_SIGNATURE 0x00
1043 #define SIGNATURE_TYPE_MBR 0x01
1044 #define SIGNATURE_TYPE_GUID 0x02
1047 /// CD-ROM Media Device Path SubType.
1049 #define MEDIA_CDROM_DP 0x02
1052 /// The CD-ROM Media Device Path is used to define a system partition that exists on a CD-ROM.
1055 EFI_DEVICE_PATH_PROTOCOL Header
;
1057 /// Boot Entry number from the Boot Catalog. The Initial/Default entry is defined as zero.
1061 /// Starting RBA of the partition on the medium. CD-ROMs use Relative logical Block Addressing.
1063 UINT64 PartitionStart
;
1065 /// Size of the partition in units of Blocks, also called Sectors.
1067 UINT64 PartitionSize
;
1068 } CDROM_DEVICE_PATH
;
1071 // Use VENDOR_DEVICE_PATH struct
1073 #define MEDIA_VENDOR_DP 0x03 ///< Media vendor device path subtype.
1076 /// File Path Media Device Path SubType
1078 #define MEDIA_FILEPATH_DP 0x04
1080 EFI_DEVICE_PATH_PROTOCOL Header
;
1082 /// A NULL-terminated Path string including directory and file names.
1085 } FILEPATH_DEVICE_PATH
;
1087 #define SIZE_OF_FILEPATH_DEVICE_PATH OFFSET_OF(FILEPATH_DEVICE_PATH,PathName)
1090 /// Media Protocol Device Path SubType.
1092 #define MEDIA_PROTOCOL_DP 0x05
1095 /// The Media Protocol Device Path is used to denote the protocol that is being
1096 /// used in a device path at the location of the path specified.
1097 /// Many protocols are inherent to the style of device path.
1100 EFI_DEVICE_PATH_PROTOCOL Header
;
1102 /// The ID of the protocol.
1105 } MEDIA_PROTOCOL_DEVICE_PATH
;
1108 /// PIWG Firmware File SubType.
1110 #define MEDIA_PIWG_FW_FILE_DP 0x06
1113 /// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware file.
1116 EFI_DEVICE_PATH_PROTOCOL Header
;
1118 /// Firmware file name
1120 EFI_GUID FvFileName
;
1121 } MEDIA_FW_VOL_FILEPATH_DEVICE_PATH
;
1124 /// PIWG Firmware Volume Device Path SubType.
1126 #define MEDIA_PIWG_FW_VOL_DP 0x07
1129 /// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware volume.
1132 EFI_DEVICE_PATH_PROTOCOL Header
;
1134 /// Firmware volume name.
1137 } MEDIA_FW_VOL_DEVICE_PATH
;
1140 /// Media relative offset range device path.
1142 #define MEDIA_RELATIVE_OFFSET_RANGE_DP 0x08
1145 /// Used to describe the offset range of media relative.
1148 EFI_DEVICE_PATH_PROTOCOL Header
;
1150 UINT64 StartingOffset
;
1151 UINT64 EndingOffset
;
1152 } MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH
;
1155 /// This GUID defines a RAM Disk supporting a raw disk format in volatile memory.
1157 #define EFI_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE
1159 extern EFI_GUID gEfiVirtualDiskGuid
;
1162 /// This GUID defines a RAM Disk supporting an ISO image in volatile memory.
1164 #define EFI_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE
1166 extern EFI_GUID gEfiVirtualCdGuid
;
1169 /// This GUID defines a RAM Disk supporting a raw disk format in persistent memory.
1171 #define EFI_PERSISTENT_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT
1173 extern EFI_GUID gEfiPersistentVirtualDiskGuid
;
1176 /// This GUID defines a RAM Disk supporting an ISO image in persistent memory.
1178 #define EFI_PERSISTENT_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT
1180 extern EFI_GUID gEfiPersistentVirtualCdGuid
;
1183 /// Media ram disk device path.
1185 #define MEDIA_RAM_DISK_DP 0x09
1188 /// Used to describe the ram disk device path.
1191 EFI_DEVICE_PATH_PROTOCOL Header
;
1193 /// Starting Memory Address.
1195 UINT32 StartingAddr
[2];
1197 /// Ending Memory Address.
1199 UINT32 EndingAddr
[2];
1201 /// GUID that defines the type of the RAM Disk.
1205 /// RAM Diskinstance number, if supported. The default value is zero.
1208 } MEDIA_RAM_DISK_DEVICE_PATH
;
1211 /// BIOS Boot Specification Device Path.
1213 #define BBS_DEVICE_PATH 0x05
1216 /// BIOS Boot Specification Device Path SubType.
1218 #define BBS_BBS_DP 0x01
1221 /// This Device Path is used to describe the booting of non-EFI-aware operating systems.
1224 EFI_DEVICE_PATH_PROTOCOL Header
;
1226 /// Device Type as defined by the BIOS Boot Specification.
1230 /// Status Flags as defined by the BIOS Boot Specification.
1234 /// Null-terminated ASCII string that describes the boot device to a user.
1237 } BBS_BBS_DEVICE_PATH
;
1240 // DeviceType definitions - from BBS specification
1242 #define BBS_TYPE_FLOPPY 0x01
1243 #define BBS_TYPE_HARDDRIVE 0x02
1244 #define BBS_TYPE_CDROM 0x03
1245 #define BBS_TYPE_PCMCIA 0x04
1246 #define BBS_TYPE_USB 0x05
1247 #define BBS_TYPE_EMBEDDED_NETWORK 0x06
1248 #define BBS_TYPE_BEV 0x80
1249 #define BBS_TYPE_UNKNOWN 0xFF
1252 /// Union of all possible Device Paths and pointers to Device Paths.
1255 EFI_DEVICE_PATH_PROTOCOL DevPath
;
1256 PCI_DEVICE_PATH Pci
;
1257 PCCARD_DEVICE_PATH PcCard
;
1258 MEMMAP_DEVICE_PATH MemMap
;
1259 VENDOR_DEVICE_PATH Vendor
;
1261 CONTROLLER_DEVICE_PATH Controller
;
1262 BMC_DEVICE_PATH Bmc
;
1263 ACPI_HID_DEVICE_PATH Acpi
;
1264 ACPI_EXTENDED_HID_DEVICE_PATH ExtendedAcpi
;
1265 ACPI_ADR_DEVICE_PATH AcpiAdr
;
1267 ATAPI_DEVICE_PATH Atapi
;
1268 SCSI_DEVICE_PATH Scsi
;
1269 ISCSI_DEVICE_PATH Iscsi
;
1270 FIBRECHANNEL_DEVICE_PATH FibreChannel
;
1271 FIBRECHANNELEX_DEVICE_PATH FibreChannelEx
;
1273 F1394_DEVICE_PATH F1394
;
1274 USB_DEVICE_PATH Usb
;
1275 SATA_DEVICE_PATH Sata
;
1276 USB_CLASS_DEVICE_PATH UsbClass
;
1277 USB_WWID_DEVICE_PATH UsbWwid
;
1278 DEVICE_LOGICAL_UNIT_DEVICE_PATH LogicUnit
;
1279 I2O_DEVICE_PATH I2O
;
1280 MAC_ADDR_DEVICE_PATH MacAddr
;
1281 IPv4_DEVICE_PATH Ipv4
;
1282 IPv6_DEVICE_PATH Ipv6
;
1283 VLAN_DEVICE_PATH Vlan
;
1284 INFINIBAND_DEVICE_PATH InfiniBand
;
1285 UART_DEVICE_PATH Uart
;
1286 UART_FLOW_CONTROL_DEVICE_PATH UartFlowControl
;
1287 SAS_DEVICE_PATH Sas
;
1288 SASEX_DEVICE_PATH SasEx
;
1289 NVME_NAMESPACE_DEVICE_PATH NvmeNamespace
;
1290 DNS_DEVICE_PATH Dns
;
1291 URI_DEVICE_PATH Uri
;
1292 BLUETOOTH_DEVICE_PATH Bluetooth
;
1293 WIFI_DEVICE_PATH WiFi
;
1294 UFS_DEVICE_PATH Ufs
;
1296 EMMC_DEVICE_PATH Emmc
;
1297 HARDDRIVE_DEVICE_PATH HardDrive
;
1298 CDROM_DEVICE_PATH CD
;
1300 FILEPATH_DEVICE_PATH FilePath
;
1301 MEDIA_PROTOCOL_DEVICE_PATH MediaProtocol
;
1303 MEDIA_FW_VOL_DEVICE_PATH FirmwareVolume
;
1304 MEDIA_FW_VOL_FILEPATH_DEVICE_PATH FirmwareFile
;
1305 MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH Offset
;
1306 MEDIA_RAM_DISK_DEVICE_PATH RamDisk
;
1307 BBS_BBS_DEVICE_PATH Bbs
;
1311 EFI_DEVICE_PATH_PROTOCOL
*DevPath
;
1312 PCI_DEVICE_PATH
*Pci
;
1313 PCCARD_DEVICE_PATH
*PcCard
;
1314 MEMMAP_DEVICE_PATH
*MemMap
;
1315 VENDOR_DEVICE_PATH
*Vendor
;
1317 CONTROLLER_DEVICE_PATH
*Controller
;
1318 BMC_DEVICE_PATH
*Bmc
;
1319 ACPI_HID_DEVICE_PATH
*Acpi
;
1320 ACPI_EXTENDED_HID_DEVICE_PATH
*ExtendedAcpi
;
1321 ACPI_ADR_DEVICE_PATH
*AcpiAdr
;
1323 ATAPI_DEVICE_PATH
*Atapi
;
1324 SCSI_DEVICE_PATH
*Scsi
;
1325 ISCSI_DEVICE_PATH
*Iscsi
;
1326 FIBRECHANNEL_DEVICE_PATH
*FibreChannel
;
1327 FIBRECHANNELEX_DEVICE_PATH
*FibreChannelEx
;
1329 F1394_DEVICE_PATH
*F1394
;
1330 USB_DEVICE_PATH
*Usb
;
1331 SATA_DEVICE_PATH
*Sata
;
1332 USB_CLASS_DEVICE_PATH
*UsbClass
;
1333 USB_WWID_DEVICE_PATH
*UsbWwid
;
1334 DEVICE_LOGICAL_UNIT_DEVICE_PATH
*LogicUnit
;
1335 I2O_DEVICE_PATH
*I2O
;
1336 MAC_ADDR_DEVICE_PATH
*MacAddr
;
1337 IPv4_DEVICE_PATH
*Ipv4
;
1338 IPv6_DEVICE_PATH
*Ipv6
;
1339 VLAN_DEVICE_PATH
*Vlan
;
1340 INFINIBAND_DEVICE_PATH
*InfiniBand
;
1341 UART_DEVICE_PATH
*Uart
;
1342 UART_FLOW_CONTROL_DEVICE_PATH
*UartFlowControl
;
1343 SAS_DEVICE_PATH
*Sas
;
1344 SASEX_DEVICE_PATH
*SasEx
;
1345 NVME_NAMESPACE_DEVICE_PATH
*NvmeNamespace
;
1346 DNS_DEVICE_PATH
*Dns
;
1347 URI_DEVICE_PATH
*Uri
;
1348 BLUETOOTH_DEVICE_PATH
*Bluetooth
;
1349 WIFI_DEVICE_PATH
*WiFi
;
1350 UFS_DEVICE_PATH
*Ufs
;
1352 EMMC_DEVICE_PATH
*Emmc
;
1353 HARDDRIVE_DEVICE_PATH
*HardDrive
;
1354 CDROM_DEVICE_PATH
*CD
;
1356 FILEPATH_DEVICE_PATH
*FilePath
;
1357 MEDIA_PROTOCOL_DEVICE_PATH
*MediaProtocol
;
1359 MEDIA_FW_VOL_DEVICE_PATH
*FirmwareVolume
;
1360 MEDIA_FW_VOL_FILEPATH_DEVICE_PATH
*FirmwareFile
;
1361 MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH
*Offset
;
1362 MEDIA_RAM_DISK_DEVICE_PATH
*RamDisk
;
1363 BBS_BBS_DEVICE_PATH
*Bbs
;
1369 #define END_DEVICE_PATH_TYPE 0x7f
1370 #define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xFF
1371 #define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01
1373 extern EFI_GUID gEfiDevicePathProtocolGuid
;