TianoCore EDK2 master
Loading...
Searching...
No Matches
DevicePath.h
Go to the documentation of this file.
1
13#ifndef __EFI_DEVICE_PATH_PROTOCOL_H__
14#define __EFI_DEVICE_PATH_PROTOCOL_H__
15
16#include <Guid/PcAnsi.h>
19
23#define EFI_DEVICE_PATH_PROTOCOL_GUID \
24 { \
25 0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
26 }
27
31#define DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH_PROTOCOL_GUID
32
33#pragma pack(1)
34
43typedef struct {
44 UINT8 Type;
50
51 UINT8 SubType;
55
56 UINT8 Length[2];
59
64
68#define HARDWARE_DEVICE_PATH 0x01
69
73#define HW_PCI_DP 0x01
74
78typedef struct {
83 UINT8 Function;
87 UINT8 Device;
89
93#define HW_PCCARD_DP 0x02
94
98typedef struct {
105
109#define HW_MEMMAP_DP 0x03
110
114typedef struct {
129
133#define HW_VENDOR_DP 0x04
134
140typedef struct {
150
154#define HW_CONTROLLER_DP 0x05
155
159typedef struct {
166
170#define HW_BMC_DP 0x06
171
175typedef struct {
184 UINT8 BaseAddress[8];
186
190#define ACPI_DEVICE_PATH 0x02
191
195#define ACPI_DP 0x01
196typedef struct {
203 UINT32 HID;
211 UINT32 UID;
213
217#define ACPI_EXTENDED_DP 0x02
218typedef struct {
225 UINT32 HID;
231 UINT32 UID;
238 UINT32 CID;
245
246//
247// EISA ID Macro
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'
252//
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)))
257
258#define PNP_EISA_ID_MASK 0xffff
259#define EISA_ID_TO_NUM(_Id) ((_Id) >> 16)
260
264#define ACPI_ADR_DP 0x03
265
271typedef struct {
278 UINT32 ADR;
279 //
280 // This device path may optionally contain more than one _ADR entry.
281 //
283
287#define ACPI_NVDIMM_DP 0x04
290typedef struct {
298
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
304
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) | \
313 ((_Index) & 0xf) ))
314
321#define MESSAGING_DEVICE_PATH 0x03
322
326#define MSG_ATAPI_DP 0x01
327typedef struct {
340 UINT16 Lun;
342
346#define MSG_SCSI_DP 0x02
347typedef struct {
352 UINT16 Pun;
356 UINT16 Lun;
358
362#define MSG_FIBRECHANNEL_DP 0x03
363typedef struct {
368 UINT32 Reserved;
372 UINT64 WWN;
376 UINT64 Lun;
378
382#define MSG_FIBRECHANNELEX_DP 0x15
383typedef struct {
388 UINT32 Reserved;
392 UINT8 WWN[8];
396 UINT8 Lun[8];
398
402#define MSG_1394_DP 0x04
403typedef struct {
408 UINT32 Reserved;
412 UINT64 Guid;
414
418#define MSG_USB_DP 0x05
419typedef struct {
430
434#define MSG_USB_CLASS_DP 0x0f
435typedef struct {
441 UINT16 VendorId;
446 UINT16 ProductId;
463
467#define MSG_USB_WWID_DP 0x10
468
472typedef struct {
481 UINT16 VendorId;
485 UINT16 ProductId;
494
498#define MSG_DEVICE_LOGICAL_UNIT_DP 0x11
499typedef struct {
504 UINT8 Lun;
506
510#define MSG_SATA_DP 0x12
511typedef struct {
527 UINT16 Lun;
529
533#define SATA_HBA_DIRECT_CONNECT_FLAG 0x8000
534
538#define MSG_I2O_DP 0x06
539typedef struct {
544 UINT32 Tid;
546
550#define MSG_MAC_ADDR_DP 0x0b
551typedef struct {
560 UINT8 IfType;
562
566#define MSG_IPv4_DP 0x0c
567typedef struct {
580 UINT16 LocalPort;
588 UINT16 Protocol;
603
607#define MSG_IPv6_DP 0x0d
608typedef struct {
621 UINT16 LocalPort;
629 UINT16 Protocol;
647
651#define MSG_INFINIBAND_DP 0x09
652typedef struct {
667 UINT8 PortGid[16];
672 UINT64 ServiceId;
680 UINT64 DeviceId;
682
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
688
692#define MSG_UART_DP 0x0e
693typedef struct {
698 UINT32 Reserved;
703 UINT64 BaudRate;
708 UINT8 DataBits;
718 UINT8 Parity;
726 UINT8 StopBits;
728
732#define NVDIMM_NAMESPACE_DP 0x20
733typedef struct {
740
741//
742// Use VENDOR_DEVICE_PATH struct
743//
744#define MSG_VENDOR_DP 0x0a
746
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
751
756typedef struct {
770
771#define UART_FLOW_CONTROL_HARDWARE 0x00000001
772#define UART_FLOW_CONTROL_XON_XOFF 0x00000010
773
774#define DEVICE_PATH_MESSAGING_SAS EFI_SAS_DEVICE_PATH_GUID
778typedef struct {
787 UINT32 Reserved;
795 UINT64 Lun;
805
809#define MSG_SASEX_DP 0x16
810typedef struct {
815 UINT8 SasAddress[8];
819 UINT8 Lun[8];
829
833#define MSG_NVME_NAMESPACE_DP 0x17
834typedef struct {
836 UINT32 NamespaceId;
837 UINT64 NamespaceUuid;
839
843#define MSG_NVME_OF_NAMESPACE_DP 0x22
844typedef struct {
853 UINT8 NamespaceId[16];
857 CHAR8 SubsystemNqn[];
859
863#define MSG_DNS_DP 0x1F
864typedef struct {
869 UINT8 IsIPv6;
873 EFI_IP_ADDRESS DnsServerIp[];
875
879#define MSG_URI_DP 0x18
880typedef struct {
885 CHAR8 Uri[];
887
891#define MSG_UFS_DP 0x19
892typedef struct {
897 UINT8 Pun;
901 UINT8 Lun;
903
907#define MSG_SD_DP 0x1A
908typedef struct {
910 UINT8 SlotNumber;
912
916#define MSG_EMMC_DP 0x1D
917typedef struct {
919 UINT8 SlotNumber;
921
925#define MSG_ISCSI_DP 0x13
926typedef struct {
939 UINT64 Lun;
951
952#define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST 0x0000
953#define ISCSI_LOGIN_OPTION_HEADER_DIGEST_USING_CRC32C 0x0002
954#define ISCSI_LOGIN_OPTION_NO_DATA_DIGEST 0x0000
955#define ISCSI_LOGIN_OPTION_DATA_DIGEST_USING_CRC32C 0x0008
956#define ISCSI_LOGIN_OPTION_AUTHMETHOD_CHAP 0x0000
957#define ISCSI_LOGIN_OPTION_AUTHMETHOD_NON 0x1000
958#define ISCSI_LOGIN_OPTION_CHAP_BI 0x0000
959#define ISCSI_LOGIN_OPTION_CHAP_UNI 0x2000
960
964#define MSG_VLAN_DP 0x14
965typedef struct {
970 UINT16 VlanId;
972
976#define MSG_BLUETOOTH_DP 0x1b
977typedef struct {
984
988#define MSG_WIFI_DP 0x1C
989typedef struct {
994 UINT8 SSId[32];
996
1000#define MSG_BLUETOOTH_LE_DP 0x1E
1001typedef struct {
1003 BLUETOOTH_LE_ADDRESS Address;
1005
1006//
1007// Media Device Path
1008//
1009#define MEDIA_DEVICE_PATH 0x04
1010
1014#define MEDIA_HARDDRIVE_DP 0x01
1015
1019typedef struct {
1043 UINT8 Signature[16];
1049 UINT8 MBRType;
1058
1059#define MBR_TYPE_PCAT 0x01
1060#define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02
1061
1062#define NO_DISK_SIGNATURE 0x00
1063#define SIGNATURE_TYPE_MBR 0x01
1064#define SIGNATURE_TYPE_GUID 0x02
1065
1069#define MEDIA_CDROM_DP 0x02
1070
1074typedef struct {
1089
1090//
1091// Use VENDOR_DEVICE_PATH struct
1092//
1093#define MEDIA_VENDOR_DP 0x03
1094
1098#define MEDIA_FILEPATH_DP 0x04
1099typedef struct {
1104 CHAR16 PathName[1];
1106
1107#define SIZE_OF_FILEPATH_DEVICE_PATH OFFSET_OF(FILEPATH_DEVICE_PATH,PathName)
1108
1112#define MEDIA_PROTOCOL_DP 0x05
1113
1119typedef struct {
1126
1130#define MEDIA_PIWG_FW_FILE_DP 0x06
1131
1135typedef struct {
1142
1146#define MEDIA_PIWG_FW_VOL_DP 0x07
1147
1151typedef struct {
1158
1162#define MEDIA_RELATIVE_OFFSET_RANGE_DP 0x08
1163
1167typedef struct {
1169 UINT32 Reserved;
1170 UINT64 StartingOffset;
1171 UINT64 EndingOffset;
1173
1177#define EFI_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE
1178
1179extern EFI_GUID gEfiVirtualDiskGuid;
1180
1184#define EFI_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE
1185
1186extern EFI_GUID gEfiVirtualCdGuid;
1187
1191#define EFI_PERSISTENT_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT
1192
1193extern EFI_GUID gEfiPersistentVirtualDiskGuid;
1194
1198#define EFI_PERSISTENT_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT
1199
1200extern EFI_GUID gEfiPersistentVirtualCdGuid;
1201
1205#define MEDIA_RAM_DISK_DP 0x09
1206
1210typedef struct {
1215 UINT32 StartingAddr[2];
1219 UINT32 EndingAddr[2];
1227 UINT16 Instance;
1229
1233#define BBS_DEVICE_PATH 0x05
1234
1238#define BBS_BBS_DP 0x01
1239
1243typedef struct {
1256 CHAR8 String[1];
1258
1259//
1260// DeviceType definitions - from BBS specification
1261//
1262#define BBS_TYPE_FLOPPY 0x01
1263#define BBS_TYPE_HARDDRIVE 0x02
1264#define BBS_TYPE_CDROM 0x03
1265#define BBS_TYPE_PCMCIA 0x04
1266#define BBS_TYPE_USB 0x05
1267#define BBS_TYPE_EMBEDDED_NETWORK 0x06
1268#define BBS_TYPE_BEV 0x80
1269#define BBS_TYPE_UNKNOWN 0xFF
1270
1274typedef union {
1276 PCI_DEVICE_PATH Pci;
1277 PCCARD_DEVICE_PATH PcCard;
1278 MEMMAP_DEVICE_PATH MemMap;
1279 VENDOR_DEVICE_PATH Vendor;
1280
1281 CONTROLLER_DEVICE_PATH Controller;
1282 BMC_DEVICE_PATH Bmc;
1284 ACPI_EXTENDED_HID_DEVICE_PATH ExtendedAcpi;
1285 ACPI_ADR_DEVICE_PATH AcpiAdr;
1286
1287 ATAPI_DEVICE_PATH Atapi;
1288 SCSI_DEVICE_PATH Scsi;
1289 ISCSI_DEVICE_PATH Iscsi;
1290 FIBRECHANNEL_DEVICE_PATH FibreChannel;
1291 FIBRECHANNELEX_DEVICE_PATH FibreChannelEx;
1292
1293 F1394_DEVICE_PATH F1394;
1294 USB_DEVICE_PATH Usb;
1295 SATA_DEVICE_PATH Sata;
1296 USB_CLASS_DEVICE_PATH UsbClass;
1297 USB_WWID_DEVICE_PATH UsbWwid;
1299 I2O_DEVICE_PATH I2O;
1300 MAC_ADDR_DEVICE_PATH MacAddr;
1301 IPv4_DEVICE_PATH Ipv4;
1302 IPv6_DEVICE_PATH Ipv6;
1303 VLAN_DEVICE_PATH Vlan;
1304 INFINIBAND_DEVICE_PATH InfiniBand;
1305 UART_DEVICE_PATH Uart;
1306 UART_FLOW_CONTROL_DEVICE_PATH UartFlowControl;
1307 SAS_DEVICE_PATH Sas;
1308 SASEX_DEVICE_PATH SasEx;
1309 NVME_NAMESPACE_DEVICE_PATH NvmeNamespace;
1310 NVME_OF_NAMESPACE_DEVICE_PATH NvmeOfNamespace;
1311 DNS_DEVICE_PATH Dns;
1312 URI_DEVICE_PATH Uri;
1313 BLUETOOTH_DEVICE_PATH Bluetooth;
1314 WIFI_DEVICE_PATH WiFi;
1315 UFS_DEVICE_PATH Ufs;
1316 SD_DEVICE_PATH Sd;
1317 EMMC_DEVICE_PATH Emmc;
1318 HARDDRIVE_DEVICE_PATH HardDrive;
1320
1321 FILEPATH_DEVICE_PATH FilePath;
1322 MEDIA_PROTOCOL_DEVICE_PATH MediaProtocol;
1323
1324 MEDIA_FW_VOL_DEVICE_PATH FirmwareVolume;
1329} EFI_DEV_PATH;
1330
1331typedef union {
1332 EFI_DEVICE_PATH_PROTOCOL *DevPath;
1333 PCI_DEVICE_PATH *Pci;
1334 PCCARD_DEVICE_PATH *PcCard;
1335 MEMMAP_DEVICE_PATH *MemMap;
1336 VENDOR_DEVICE_PATH *Vendor;
1337
1338 CONTROLLER_DEVICE_PATH *Controller;
1339 BMC_DEVICE_PATH *Bmc;
1341 ACPI_EXTENDED_HID_DEVICE_PATH *ExtendedAcpi;
1342 ACPI_ADR_DEVICE_PATH *AcpiAdr;
1343
1344 ATAPI_DEVICE_PATH *Atapi;
1345 SCSI_DEVICE_PATH *Scsi;
1346 ISCSI_DEVICE_PATH *Iscsi;
1347 FIBRECHANNEL_DEVICE_PATH *FibreChannel;
1348 FIBRECHANNELEX_DEVICE_PATH *FibreChannelEx;
1349
1350 F1394_DEVICE_PATH *F1394;
1351 USB_DEVICE_PATH *Usb;
1352 SATA_DEVICE_PATH *Sata;
1353 USB_CLASS_DEVICE_PATH *UsbClass;
1354 USB_WWID_DEVICE_PATH *UsbWwid;
1356 I2O_DEVICE_PATH *I2O;
1357 MAC_ADDR_DEVICE_PATH *MacAddr;
1358 IPv4_DEVICE_PATH *Ipv4;
1359 IPv6_DEVICE_PATH *Ipv6;
1360 VLAN_DEVICE_PATH *Vlan;
1361 INFINIBAND_DEVICE_PATH *InfiniBand;
1362 UART_DEVICE_PATH *Uart;
1363 UART_FLOW_CONTROL_DEVICE_PATH *UartFlowControl;
1364 SAS_DEVICE_PATH *Sas;
1365 SASEX_DEVICE_PATH *SasEx;
1366 NVME_NAMESPACE_DEVICE_PATH *NvmeNamespace;
1367 NVME_OF_NAMESPACE_DEVICE_PATH *NvmeOfNamespace;
1368 DNS_DEVICE_PATH *Dns;
1369 URI_DEVICE_PATH *Uri;
1370 BLUETOOTH_DEVICE_PATH *Bluetooth;
1371 WIFI_DEVICE_PATH *WiFi;
1372 UFS_DEVICE_PATH *Ufs;
1373 SD_DEVICE_PATH *Sd;
1374 EMMC_DEVICE_PATH *Emmc;
1375 HARDDRIVE_DEVICE_PATH *HardDrive;
1377
1378 FILEPATH_DEVICE_PATH *FilePath;
1379 MEDIA_PROTOCOL_DEVICE_PATH *MediaProtocol;
1380
1381 MEDIA_FW_VOL_DEVICE_PATH *FirmwareVolume;
1386 UINT8 *Raw;
1388
1389#pragma pack()
1390
1391#define END_DEVICE_PATH_TYPE 0x7f
1392#define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xFF
1393#define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01
1394
1395extern EFI_GUID gEfiDevicePathProtocolGuid;
1396
1397#endif
EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH
Definition: DevicePath.h:63
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
UINT8 PrimarySecondary
Definition: DevicePath.h:332
BLUETOOTH_ADDRESS BD_ADDR
Definition: DevicePath.h:982
UINT8 InterfaceType
Definition: DevicePath.h:180
Definition: Base.h:213
EFI_IPv4_ADDRESS GatewayIpAddress
Definition: DevicePath.h:597
EFI_IPv4_ADDRESS SubnetMask
Definition: DevicePath.h:601
BOOLEAN StaticIpAddress
Definition: DevicePath.h:593
EFI_IPv4_ADDRESS LocalIpAddress
Definition: DevicePath.h:572
EFI_IPv4_ADDRESS RemoteIpAddress
Definition: DevicePath.h:576
EFI_IPv6_ADDRESS LocalIpAddress
Definition: DevicePath.h:613
UINT8 IpAddressOrigin
Definition: DevicePath.h:637
EFI_IPv6_ADDRESS RemoteIpAddress
Definition: DevicePath.h:617
EFI_IPv6_ADDRESS GatewayIpAddress
Definition: DevicePath.h:645
UINT16 TargetPortalGroupTag
Definition: DevicePath.h:944
UINT16 NetworkProtocol
Definition: DevicePath.h:931
EFI_MAC_ADDRESS MacAddress
Definition: DevicePath.h:556
EFI_PHYSICAL_ADDRESS StartingAddress
Definition: DevicePath.h:123
EFI_PHYSICAL_ADDRESS EndingAddress
Definition: DevicePath.h:127
UINT16 RelativeTargetPort
Definition: DevicePath.h:803
EFI_GUID Guid
Definition: DevicePath.h:783
UINT64 SasAddress
Definition: DevicePath.h:791
UINT16 DeviceTopology
Definition: DevicePath.h:799
UINT16 DeviceTopology
Definition: DevicePath.h:823
UINT16 RelativeTargetPort
Definition: DevicePath.h:827
UINT16 PortMultiplierPortNumber
Definition: DevicePath.h:523
UINT16 HBAPortNumber
Definition: DevicePath.h:517
UINT8 InterfaceNumber
Definition: DevicePath.h:428
UINT8 ParentPortNumber
Definition: DevicePath.h:424