]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/DevicePath.h
MdePkg/BaseLib: add support for RMPADJUST instruction
[mirror_edk2.git] / MdePkg / Include / Protocol / DevicePath.h
CommitLineData
d1f95000 1/** @file\r
8a7d75b0 2 The device path protocol as defined in UEFI 2.0.\r
959ccb23 3\r
630b4187 4 The device path represents a programmatic path to a device,\r
9095d37b 5 from a software point of view. The path must persist from boot to boot, so\r
d1f95000 6 it can not contain things like PCI bus numbers that change from boot to boot.\r
959ccb23 7\r
9095d37b 8Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
9344f092 9SPDX-License-Identifier: BSD-2-Clause-Patent\r
959ccb23 10\r
959ccb23 11**/\r
12\r
d1f95000 13#ifndef __EFI_DEVICE_PATH_PROTOCOL_H__\r
14#define __EFI_DEVICE_PATH_PROTOCOL_H__\r
15\r
b25e8149 16#include <Guid/PcAnsi.h>\r
362c355c 17#include <IndustryStandard/Bluetooth.h>\r
6a46c1a2
FT
18#include <IndustryStandard/Acpi60.h>\r
19\r
99e8ed21 20///\r
af2dc6a7 21/// Device Path protocol.\r
99e8ed21 22///\r
d1f95000 23#define EFI_DEVICE_PATH_PROTOCOL_GUID \\r
24 { \\r
25 0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \\r
26 }\r
959ccb23 27\r
99e8ed21 28///\r
9319d2c2 29/// Device Path guid definition for backward-compatible with EFI1.1.\r
99e8ed21 30///\r
a6508c05 31#define DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH_PROTOCOL_GUID\r
959ccb23 32\r
33#pragma pack(1)\r
34\r
2d824143 35/**\r
9095d37b
LG
36 This protocol can be used on any device handle to obtain generic path/location\r
37 information concerning the physical device or logical device. If the handle does\r
38 not logically map to a physical device, the handle may not necessarily support\r
39 the device path protocol. The device path describes the location of the device\r
40 the handle is for. The size of the Device Path can be determined from the structures\r
2d824143 41 that make up the Device Path.\r
42**/\r
d1f95000 43typedef struct {\r
af2dc6a7 44 UINT8 Type; ///< 0x01 Hardware Device Path.\r
45 ///< 0x02 ACPI Device Path.\r
46 ///< 0x03 Messaging Device Path.\r
47 ///< 0x04 Media Device Path.\r
48 ///< 0x05 BIOS Boot Specification Device Path.\r
49 ///< 0x7F End of Hardware Device Path.\r
9095d37b 50\r
2d824143 51 UINT8 SubType; ///< Varies by Type\r
842a119d 52 ///< 0xFF End Entire Device Path, or\r
53 ///< 0x01 End This Instance of a Device Path and start a new\r
af2dc6a7 54 ///< Device Path.\r
9095d37b 55\r
2d824143 56 UINT8 Length[2]; ///< Specific Device Path data. Type and Sub-Type define\r
57 ///< type of data. Size of data is included in Length.\r
9095d37b 58\r
d1f95000 59} EFI_DEVICE_PATH_PROTOCOL;\r
60\r
99e8ed21 61///\r
9319d2c2 62/// Device Path protocol definition for backward-compatible with EFI1.1.\r
9095d37b 63///\r
a6508c05 64typedef EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH;\r
65\r
99e8ed21 66///\r
af2dc6a7 67/// Hardware Device Paths.\r
99e8ed21 68///\r
959ccb23 69#define HARDWARE_DEVICE_PATH 0x01\r
70\r
f1004231 71///\r
af2dc6a7 72/// PCI Device Path SubType.\r
f1004231 73///\r
959ccb23 74#define HW_PCI_DP 0x01\r
f1409bb2 75\r
76///\r
af2dc6a7 77/// PCI Device Path.\r
f1409bb2 78///\r
959ccb23 79typedef struct {\r
80 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231 81 ///\r
af2dc6a7 82 /// PCI Function Number.\r
f1004231 83 ///\r
959ccb23 84 UINT8 Function;\r
f1004231 85 ///\r
af2dc6a7 86 /// PCI Device Number.\r
f1004231 87 ///\r
959ccb23 88 UINT8 Device;\r
89} PCI_DEVICE_PATH;\r
90\r
f1004231 91///\r
af2dc6a7 92/// PCCARD Device Path SubType.\r
f1004231 93///\r
959ccb23 94#define HW_PCCARD_DP 0x02\r
f1409bb2 95\r
96///\r
af2dc6a7 97/// PCCARD Device Path.\r
f1409bb2 98///\r
959ccb23 99typedef struct {\r
100 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231 101 ///\r
af2dc6a7 102 /// Function Number (0 = First Function).\r
f1004231 103 ///\r
959ccb23 104 UINT8 FunctionNumber;\r
105} PCCARD_DEVICE_PATH;\r
106\r
f1004231 107///\r
af2dc6a7 108/// Memory Mapped Device Path SubType.\r
f1004231 109///\r
959ccb23 110#define HW_MEMMAP_DP 0x03\r
9319d2c2
LG
111\r
112///\r
af2dc6a7 113/// Memory Mapped Device Path.\r
9319d2c2 114///\r
959ccb23 115typedef struct {\r
116 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231
LG
117 ///\r
118 /// EFI_MEMORY_TYPE\r
119 ///\r
959ccb23 120 UINT32 MemoryType;\r
f1004231
LG
121 ///\r
122 /// Starting Memory Address.\r
123 ///\r
959ccb23 124 EFI_PHYSICAL_ADDRESS StartingAddress;\r
f1004231 125 ///\r
af2dc6a7 126 /// Ending Memory Address.\r
f1004231 127 ///\r
959ccb23 128 EFI_PHYSICAL_ADDRESS EndingAddress;\r
129} MEMMAP_DEVICE_PATH;\r
130\r
9319d2c2 131///\r
af2dc6a7 132/// Hardware Vendor Device Path SubType.\r
9319d2c2
LG
133///\r
134#define HW_VENDOR_DP 0x04\r
135\r
f1004231
LG
136///\r
137/// The Vendor Device Path allows the creation of vendor-defined Device Paths. A vendor must\r
138/// allocate a Vendor GUID for a Device Path. The Vendor GUID can then be used to define the\r
139/// contents on the n bytes that follow in the Vendor Device Path node.\r
140///\r
959ccb23 141typedef struct {\r
142 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231
LG
143 ///\r
144 /// Vendor-assigned GUID that defines the data that follows.\r
145 ///\r
959ccb23 146 EFI_GUID Guid;\r
f1004231
LG
147 ///\r
148 /// Vendor-defined variable size data.\r
149 ///\r
959ccb23 150} VENDOR_DEVICE_PATH;\r
151\r
f1004231 152///\r
af2dc6a7 153/// Controller Device Path SubType.\r
f1004231 154///\r
959ccb23 155#define HW_CONTROLLER_DP 0x05\r
9319d2c2
LG
156\r
157///\r
af2dc6a7 158/// Controller Device Path.\r
9319d2c2 159///\r
959ccb23 160typedef struct {\r
161 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231
LG
162 ///\r
163 /// Controller number.\r
164 ///\r
959ccb23 165 UINT32 ControllerNumber;\r
166} CONTROLLER_DEVICE_PATH;\r
167\r
624f017e
HW
168///\r
169/// BMC Device Path SubType.\r
170///\r
171#define HW_BMC_DP 0x06\r
172\r
173///\r
174/// BMC Device Path.\r
175///\r
176typedef struct {\r
177 EFI_DEVICE_PATH_PROTOCOL Header;\r
178 ///\r
179 /// Interface Type.\r
180 ///\r
181 UINT8 InterfaceType;\r
182 ///\r
183 /// Base Address.\r
184 ///\r
185 UINT8 BaseAddress[8];\r
186} BMC_DEVICE_PATH;\r
187\r
99e8ed21 188///\r
af2dc6a7 189/// ACPI Device Paths.\r
99e8ed21 190///\r
959ccb23 191#define ACPI_DEVICE_PATH 0x02\r
192\r
f1004231 193///\r
af2dc6a7 194/// ACPI Device Path SubType.\r
f1004231 195///\r
959ccb23 196#define ACPI_DP 0x01\r
197typedef struct {\r
198 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231
LG
199 ///\r
200 /// Device's PnP hardware ID stored in a numeric 32-bit\r
201 /// compressed EISA-type ID. This value must match the\r
202 /// corresponding _HID in the ACPI name space.\r
203 ///\r
959ccb23 204 UINT32 HID;\r
f1004231
LG
205 ///\r
206 /// Unique ID that is required by ACPI if two devices have the\r
207 /// same _HID. This value must also match the corresponding\r
208 /// _UID/_HID pair in the ACPI name space. Only the 32-bit\r
af2dc6a7 209 /// numeric value type of _UID is supported. Thus, strings must\r
f1004231
LG
210 /// not be used for the _UID in the ACPI name space.\r
211 ///\r
959ccb23 212 UINT32 UID;\r
213} ACPI_HID_DEVICE_PATH;\r
214\r
f1004231 215///\r
af2dc6a7 216/// Expanded ACPI Device Path SubType.\r
f1004231 217///\r
959ccb23 218#define ACPI_EXTENDED_DP 0x02\r
219typedef struct {\r
220 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231
LG
221 ///\r
222 /// Device's PnP hardware ID stored in a numeric 32-bit\r
223 /// compressed EISA-type ID. This value must match the\r
224 /// corresponding _HID in the ACPI name space.\r
225 ///\r
959ccb23 226 UINT32 HID;\r
f1004231
LG
227 ///\r
228 /// Unique ID that is required by ACPI if two devices have the\r
229 /// same _HID. This value must also match the corresponding\r
230 /// _UID/_HID pair in the ACPI name space.\r
231 ///\r
959ccb23 232 UINT32 UID;\r
f1004231 233 ///\r
cd2ed84a 234 /// Device's compatible PnP hardware ID stored in a numeric\r
f1004231
LG
235 /// 32-bit compressed EISA-type ID. This value must match at\r
236 /// least one of the compatible device IDs returned by the\r
237 /// corresponding _CID in the ACPI name space.\r
238 ///\r
959ccb23 239 UINT32 CID;\r
99e8ed21 240 ///\r
af2dc6a7 241 /// Optional variable length _HIDSTR.\r
242 /// Optional variable length _UIDSTR.\r
243 /// Optional variable length _CIDSTR.\r
99e8ed21 244 ///\r
959ccb23 245} ACPI_EXTENDED_HID_DEVICE_PATH;\r
246\r
247//\r
248// EISA ID Macro\r
249// EISA ID Definition 32-bits\r
250// bits[15:0] - three character compressed ASCII EISA ID.\r
251// bits[31:16] - binary number\r
252// Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'\r
253//\r
254#define PNP_EISA_ID_CONST 0x41d0\r
8b13229b 255#define EISA_ID(_Name, _Num) ((UINT32)((_Name) | (_Num) << 16))\r
959ccb23 256#define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))\r
257#define EFI_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))\r
258\r
259#define PNP_EISA_ID_MASK 0xffff\r
260#define EISA_ID_TO_NUM(_Id) ((_Id) >> 16)\r
261\r
9319d2c2 262///\r
af2dc6a7 263/// ACPI _ADR Device Path SubType.\r
9319d2c2
LG
264///\r
265#define ACPI_ADR_DP 0x03\r
959ccb23 266\r
f1004231
LG
267///\r
268/// The _ADR device path is used to contain video output device attributes to support the Graphics\r
269/// Output Protocol. The device path can contain multiple _ADR entries if multiple video output\r
270/// devices are displaying the same output.\r
271///\r
959ccb23 272typedef struct {\r
273 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231
LG
274 ///\r
275 /// _ADR value. For video output devices the value of this\r
af2dc6a7 276 /// field comes from Table B-2 of the ACPI 3.0 specification. At\r
f1004231
LG
277 /// least one _ADR value is required.\r
278 ///\r
959ccb23 279 UINT32 ADR;\r
9319d2c2
LG
280 //\r
281 // This device path may optionally contain more than one _ADR entry.\r
282 //\r
959ccb23 283} ACPI_ADR_DEVICE_PATH;\r
284\r
8f39da71
ZL
285///\r
286/// ACPI NVDIMM Device Path SubType.\r
287///\r
288#define ACPI_NVDIMM_DP 0x04\r
289///\r
290///\r
291typedef struct {\r
292 EFI_DEVICE_PATH_PROTOCOL Header;\r
293 ///\r
294 /// NFIT Device Handle, the _ADR of the NVDIMM device.\r
295 /// The value of this field comes from Section 9.20.3 of the ACPI 6.2A specification.\r
296 ///\r
297 UINT32 NFITDeviceHandle;\r
298} ACPI_NVDIMM_DEVICE_PATH;\r
299\r
fbbe00ad 300#define ACPI_ADR_DISPLAY_TYPE_OTHER 0\r
301#define ACPI_ADR_DISPLAY_TYPE_VGA 1\r
302#define ACPI_ADR_DISPLAY_TYPE_TV 2\r
303#define ACPI_ADR_DISPLAY_TYPE_EXTERNAL_DIGITAL 3\r
304#define ACPI_ADR_DISPLAY_TYPE_INTERNAL_DIGITAL 4\r
305\r
306#define ACPI_DISPLAY_ADR(_DeviceIdScheme, _HeadId, _NonVgaOutput, _BiosCanDetect, _VendorInfo, _Type, _Port, _Index) \\r
d3938cc8
MK
307 ((UINT32)( ((UINT32)((_DeviceIdScheme) & 0x1) << 31) | \\r
308 (((_HeadId) & 0x7) << 18) | \\r
309 (((_NonVgaOutput) & 0x1) << 17) | \\r
310 (((_BiosCanDetect) & 0x1) << 16) | \\r
311 (((_VendorInfo) & 0xf) << 12) | \\r
312 (((_Type) & 0xf) << 8) | \\r
313 (((_Port) & 0xf) << 4) | \\r
314 ((_Index) & 0xf) ))\r
959ccb23 315\r
99e8ed21 316///\r
af2dc6a7 317/// Messaging Device Paths.\r
f1004231
LG
318/// This Device Path is used to describe the connection of devices outside the resource domain of the\r
319/// system. This Device Path can describe physical messaging information like SCSI ID, or abstract\r
320/// information like networking protocol IP addresses.\r
99e8ed21 321///\r
959ccb23 322#define MESSAGING_DEVICE_PATH 0x03\r
323\r
f1004231 324///\r
9319d2c2 325/// ATAPI Device Path SubType\r
f1004231 326///\r
959ccb23 327#define MSG_ATAPI_DP 0x01\r
328typedef struct {\r
329 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231 330 ///\r
af2dc6a7 331 /// Set to zero for primary, or one for secondary.\r
f1004231 332 ///\r
959ccb23 333 UINT8 PrimarySecondary;\r
f1004231 334 ///\r
af2dc6a7 335 /// Set to zero for master, or one for slave mode.\r
f1004231 336 ///\r
959ccb23 337 UINT8 SlaveMaster;\r
f1004231 338 ///\r
af2dc6a7 339 /// Logical Unit Number.\r
f1004231 340 ///\r
959ccb23 341 UINT16 Lun;\r
342} ATAPI_DEVICE_PATH;\r
343\r
f1004231 344///\r
af2dc6a7 345/// SCSI Device Path SubType.\r
f1004231 346///\r
959ccb23 347#define MSG_SCSI_DP 0x02\r
348typedef struct {\r
349 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231 350 ///\r
af2dc6a7 351 /// Target ID on the SCSI bus (PUN).\r
f1004231 352 ///\r
959ccb23 353 UINT16 Pun;\r
f1004231 354 ///\r
af2dc6a7 355 /// Logical Unit Number (LUN).\r
f1004231 356 ///\r
959ccb23 357 UINT16 Lun;\r
358} SCSI_DEVICE_PATH;\r
359\r
f1004231 360///\r
af2dc6a7 361/// Fibre Channel SubType.\r
f1004231 362///\r
959ccb23 363#define MSG_FIBRECHANNEL_DP 0x03\r
364typedef struct {\r
365 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231
LG
366 ///\r
367 /// Reserved for the future.\r
368 ///\r
959ccb23 369 UINT32 Reserved;\r
f1004231
LG
370 ///\r
371 /// Fibre Channel World Wide Number.\r
372 ///\r
959ccb23 373 UINT64 WWN;\r
f1004231
LG
374 ///\r
375 /// Fibre Channel Logical Unit Number.\r
376 ///\r
959ccb23 377 UINT64 Lun;\r
378} FIBRECHANNEL_DEVICE_PATH;\r
379\r
09e19629
RN
380///\r
381/// Fibre Channel Ex SubType.\r
382///\r
383#define MSG_FIBRECHANNELEX_DP 0x15\r
384typedef struct {\r
385 EFI_DEVICE_PATH_PROTOCOL Header;\r
386 ///\r
387 /// Reserved for the future.\r
388 ///\r
389 UINT32 Reserved;\r
390 ///\r
391 /// 8 byte array containing Fibre Channel End Device Port Name.\r
392 ///\r
393 UINT8 WWN[8];\r
394 ///\r
395 /// 8 byte array containing Fibre Channel Logical Unit Number.\r
396 ///\r
397 UINT8 Lun[8];\r
398} FIBRECHANNELEX_DEVICE_PATH;\r
399\r
f1004231 400///\r
9319d2c2 401/// 1394 Device Path SubType\r
f1004231 402///\r
959ccb23 403#define MSG_1394_DP 0x04\r
404typedef struct {\r
405 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231
LG
406 ///\r
407 /// Reserved for the future.\r
408 ///\r
959ccb23 409 UINT32 Reserved;\r
f1004231
LG
410 ///\r
411 /// 1394 Global Unique ID (GUID).\r
412 ///\r
959ccb23 413 UINT64 Guid;\r
414} F1394_DEVICE_PATH;\r
415\r
f1004231 416///\r
af2dc6a7 417/// USB Device Path SubType.\r
f1004231 418///\r
959ccb23 419#define MSG_USB_DP 0x05\r
420typedef struct {\r
f1004231
LG
421 EFI_DEVICE_PATH_PROTOCOL Header;\r
422 ///\r
af2dc6a7 423 /// USB Parent Port Number.\r
f1004231
LG
424 ///\r
425 UINT8 ParentPortNumber;\r
426 ///\r
af2dc6a7 427 /// USB Interface Number.\r
f1004231
LG
428 ///\r
429 UINT8 InterfaceNumber;\r
959ccb23 430} USB_DEVICE_PATH;\r
431\r
f1004231 432///\r
af2dc6a7 433/// USB Class Device Path SubType.\r
f1004231 434///\r
959ccb23 435#define MSG_USB_CLASS_DP 0x0f\r
436typedef struct {\r
f1004231
LG
437 EFI_DEVICE_PATH_PROTOCOL Header;\r
438 ///\r
439 /// Vendor ID assigned by USB-IF. A value of 0xFFFF will\r
440 /// match any Vendor ID.\r
441 ///\r
442 UINT16 VendorId;\r
443 ///\r
444 /// Product ID assigned by USB-IF. A value of 0xFFFF will\r
445 /// match any Product ID.\r
446 ///\r
447 UINT16 ProductId;\r
448 ///\r
449 /// The class code assigned by the USB-IF. A value of 0xFF\r
450 /// will match any class code.\r
451 ///\r
452 UINT8 DeviceClass;\r
453 ///\r
454 /// The subclass code assigned by the USB-IF. A value of\r
455 /// 0xFF will match any subclass code.\r
456 ///\r
457 UINT8 DeviceSubClass;\r
458 ///\r
459 /// The protocol code assigned by the USB-IF. A value of\r
460 /// 0xFF will match any protocol code.\r
461 ///\r
462 UINT8 DeviceProtocol;\r
959ccb23 463} USB_CLASS_DEVICE_PATH;\r
464\r
f1004231 465///\r
af2dc6a7 466/// USB WWID Device Path SubType.\r
f1004231 467///\r
959ccb23 468#define MSG_USB_WWID_DP 0x10\r
9319d2c2
LG
469\r
470///\r
471/// This device path describes a USB device using its serial number.\r
472///\r
959ccb23 473typedef struct {\r
f1004231
LG
474 EFI_DEVICE_PATH_PROTOCOL Header;\r
475 ///\r
af2dc6a7 476 /// USB interface number.\r
f1004231
LG
477 ///\r
478 UINT16 InterfaceNumber;\r
479 ///\r
af2dc6a7 480 /// USB vendor id of the device.\r
f1004231
LG
481 ///\r
482 UINT16 VendorId;\r
483 ///\r
af2dc6a7 484 /// USB product id of the device.\r
f1004231
LG
485 ///\r
486 UINT16 ProductId;\r
487 ///\r
488 /// Last 64-or-fewer UTF-16 characters of the USB\r
489 /// serial number. The length of the string is\r
490 /// determined by the Length field less the offset of the\r
491 /// Serial Number field (10)\r
492 ///\r
493 /// CHAR16 SerialNumber[...];\r
959ccb23 494} USB_WWID_DEVICE_PATH;\r
495\r
f1004231 496///\r
af2dc6a7 497/// Device Logical Unit SubType.\r
f1004231 498///\r
959ccb23 499#define MSG_DEVICE_LOGICAL_UNIT_DP 0x11\r
500typedef struct {\r
f1004231
LG
501 EFI_DEVICE_PATH_PROTOCOL Header;\r
502 ///\r
af2dc6a7 503 /// Logical Unit Number for the interface.\r
f1004231
LG
504 ///\r
505 UINT8 Lun;\r
959ccb23 506} DEVICE_LOGICAL_UNIT_DEVICE_PATH;\r
507\r
f1004231 508///\r
af2dc6a7 509/// SATA Device Path SubType.\r
f1004231 510///\r
00edb218 511#define MSG_SATA_DP 0x12\r
959ccb23 512typedef struct {\r
00edb218 513 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231
LG
514 ///\r
515 /// The HBA port number that facilitates the connection to the\r
516 /// device or a port multiplier. The value 0xFFFF is reserved.\r
517 ///\r
7d582d6b 518 UINT16 HBAPortNumber;\r
f1004231
LG
519 ///\r
520 /// The Port multiplier port number that facilitates the connection\r
b87031be 521 /// to the device. Must be set to 0xFFFF if the device is directly\r
f1004231
LG
522 /// connected to the HBA.\r
523 ///\r
7d582d6b 524 UINT16 PortMultiplierPortNumber;\r
f1004231
LG
525 ///\r
526 /// Logical Unit Number.\r
527 ///\r
7d582d6b 528 UINT16 Lun;\r
959ccb23 529} SATA_DEVICE_PATH;\r
530\r
efb86b3a 531///\r
532/// Flag for if the device is directly connected to the HBA.\r
533///\r
534#define SATA_HBA_DIRECT_CONNECT_FLAG 0x8000\r
535\r
f1004231 536///\r
af2dc6a7 537/// I2O Device Path SubType.\r
f1004231 538///\r
959ccb23 539#define MSG_I2O_DP 0x06\r
540typedef struct {\r
541 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231 542 ///\r
af2dc6a7 543 /// Target ID (TID) for a device.\r
f1004231 544 ///\r
959ccb23 545 UINT32 Tid;\r
546} I2O_DEVICE_PATH;\r
547\r
f1004231 548///\r
af2dc6a7 549/// MAC Address Device Path SubType.\r
f1004231 550///\r
959ccb23 551#define MSG_MAC_ADDR_DP 0x0b\r
552typedef struct {\r
553 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231 554 ///\r
af2dc6a7 555 /// The MAC address for a network interface padded with 0s.\r
f1004231 556 ///\r
959ccb23 557 EFI_MAC_ADDRESS MacAddress;\r
f1004231
LG
558 ///\r
559 /// Network interface type(i.e. 802.3, FDDI).\r
560 ///\r
959ccb23 561 UINT8 IfType;\r
562} MAC_ADDR_DEVICE_PATH;\r
563\r
f1004231 564///\r
9319d2c2 565/// IPv4 Device Path SubType\r
f1004231 566///\r
959ccb23 567#define MSG_IPv4_DP 0x0c\r
568typedef struct {\r
569 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231 570 ///\r
af2dc6a7 571 /// The local IPv4 address.\r
f1004231 572 ///\r
959ccb23 573 EFI_IPv4_ADDRESS LocalIpAddress;\r
f1004231 574 ///\r
af2dc6a7 575 /// The remote IPv4 address.\r
f1004231 576 ///\r
959ccb23 577 EFI_IPv4_ADDRESS RemoteIpAddress;\r
f1004231 578 ///\r
af2dc6a7 579 /// The local port number.\r
f1004231 580 ///\r
959ccb23 581 UINT16 LocalPort;\r
f1004231 582 ///\r
af2dc6a7 583 /// The remote port number.\r
f1004231 584 ///\r
959ccb23 585 UINT16 RemotePort;\r
f1004231
LG
586 ///\r
587 /// The network protocol(i.e. UDP, TCP).\r
588 ///\r
959ccb23 589 UINT16 Protocol;\r
f1004231 590 ///\r
af2dc6a7 591 /// 0x00 - The Source IP Address was assigned though DHCP.\r
592 /// 0x01 - The Source IP Address is statically bound.\r
f1004231 593 ///\r
959ccb23 594 BOOLEAN StaticIpAddress;\r
09e19629
RN
595 ///\r
596 /// The gateway IP address\r
597 ///\r
598 EFI_IPv4_ADDRESS GatewayIpAddress;\r
599 ///\r
600 /// The subnet mask\r
601 ///\r
602 EFI_IPv4_ADDRESS SubnetMask;\r
959ccb23 603} IPv4_DEVICE_PATH;\r
604\r
f1004231 605///\r
af2dc6a7 606/// IPv6 Device Path SubType.\r
f1004231 607///\r
959ccb23 608#define MSG_IPv6_DP 0x0d\r
609typedef struct {\r
610 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231 611 ///\r
af2dc6a7 612 /// The local IPv6 address.\r
f1004231 613 ///\r
959ccb23 614 EFI_IPv6_ADDRESS LocalIpAddress;\r
f1004231 615 ///\r
af2dc6a7 616 /// The remote IPv6 address.\r
f1004231 617 ///\r
959ccb23 618 EFI_IPv6_ADDRESS RemoteIpAddress;\r
f1004231 619 ///\r
af2dc6a7 620 /// The local port number.\r
f1004231 621 ///\r
959ccb23 622 UINT16 LocalPort;\r
f1004231 623 ///\r
af2dc6a7 624 /// The remote port number.\r
f1004231 625 ///\r
959ccb23 626 UINT16 RemotePort;\r
f1004231
LG
627 ///\r
628 /// The network protocol(i.e. UDP, TCP).\r
629 ///\r
959ccb23 630 UINT16 Protocol;\r
f1004231 631 ///\r
501793fa
RN
632 /// 0x00 - The Local IP Address was manually configured.\r
633 /// 0x01 - The Local IP Address is assigned through IPv6\r
634 /// stateless auto-configuration.\r
635 /// 0x02 - The Local IP Address is assigned through IPv6\r
636 /// stateful configuration.\r
f1004231 637 ///\r
501793fa
RN
638 UINT8 IpAddressOrigin;\r
639 ///\r
640 /// The prefix length\r
641 ///\r
642 UINT8 PrefixLength;\r
643 ///\r
644 /// The gateway IP address\r
645 ///\r
646 EFI_IPv6_ADDRESS GatewayIpAddress;\r
959ccb23 647} IPv6_DEVICE_PATH;\r
648\r
f1004231 649///\r
af2dc6a7 650/// InfiniBand Device Path SubType.\r
f1004231 651///\r
959ccb23 652#define MSG_INFINIBAND_DP 0x09\r
653typedef struct {\r
654 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231
LG
655 ///\r
656 /// Flags to help identify/manage InfiniBand device path elements:\r
af2dc6a7 657 /// Bit 0 - IOC/Service (0b = IOC, 1b = Service).\r
658 /// Bit 1 - Extend Boot Environment.\r
659 /// Bit 2 - Console Protocol.\r
660 /// Bit 3 - Storage Protocol.\r
661 /// Bit 4 - Network Protocol.\r
f1004231
LG
662 /// All other bits are reserved.\r
663 ///\r
959ccb23 664 UINT32 ResourceFlags;\r
f1004231 665 ///\r
af2dc6a7 666 /// 128-bit Global Identifier for remote fabric port.\r
f1004231 667 ///\r
959ccb23 668 UINT8 PortGid[16];\r
f1004231
LG
669 ///\r
670 /// 64-bit unique identifier to remote IOC or server process.\r
af2dc6a7 671 /// Interpretation of field specified by Resource Flags (bit 0).\r
f1004231 672 ///\r
959ccb23 673 UINT64 ServiceId;\r
f1004231 674 ///\r
af2dc6a7 675 /// 64-bit persistent ID of remote IOC port.\r
f1004231 676 ///\r
959ccb23 677 UINT64 TargetPortId;\r
f1004231 678 ///\r
af2dc6a7 679 /// 64-bit persistent ID of remote device.\r
f1004231 680 ///\r
959ccb23 681 UINT64 DeviceId;\r
682} INFINIBAND_DEVICE_PATH;\r
683\r
684#define INFINIBAND_RESOURCE_FLAG_IOC_SERVICE 0x01\r
685#define INFINIBAND_RESOURCE_FLAG_EXTENDED_BOOT_ENVIRONMENT 0x02\r
686#define INFINIBAND_RESOURCE_FLAG_CONSOLE_PROTOCOL 0x04\r
687#define INFINIBAND_RESOURCE_FLAG_STORAGE_PROTOCOL 0x08\r
688#define INFINIBAND_RESOURCE_FLAG_NETWORK_PROTOCOL 0x10\r
689\r
f1004231 690///\r
af2dc6a7 691/// UART Device Path SubType.\r
f1004231 692///\r
959ccb23 693#define MSG_UART_DP 0x0e\r
694typedef struct {\r
695 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231 696 ///\r
af2dc6a7 697 /// Reserved.\r
f1004231 698 ///\r
959ccb23 699 UINT32 Reserved;\r
f1004231
LG
700 ///\r
701 /// The baud rate setting for the UART style device. A value of 0\r
702 /// means that the device's default baud rate will be used.\r
703 ///\r
959ccb23 704 UINT64 BaudRate;\r
f1004231
LG
705 ///\r
706 /// The number of data bits for the UART style device. A value\r
707 /// of 0 means that the device's default number of data bits will be used.\r
708 ///\r
959ccb23 709 UINT8 DataBits;\r
f1004231
LG
710 ///\r
711 /// The parity setting for the UART style device.\r
af2dc6a7 712 /// Parity 0x00 - Default Parity.\r
713 /// Parity 0x01 - No Parity.\r
714 /// Parity 0x02 - Even Parity.\r
715 /// Parity 0x03 - Odd Parity.\r
716 /// Parity 0x04 - Mark Parity.\r
717 /// Parity 0x05 - Space Parity.\r
f1004231 718 ///\r
959ccb23 719 UINT8 Parity;\r
f1004231
LG
720 ///\r
721 /// The number of stop bits for the UART style device.\r
af2dc6a7 722 /// Stop Bits 0x00 - Default Stop Bits.\r
723 /// Stop Bits 0x01 - 1 Stop Bit.\r
724 /// Stop Bits 0x02 - 1.5 Stop Bits.\r
725 /// Stop Bits 0x03 - 2 Stop Bits.\r
f1004231 726 ///\r
959ccb23 727 UINT8 StopBits;\r
728} UART_DEVICE_PATH;\r
729\r
f8edb7e9
OY
730///\r
731/// NVDIMM Namespace Device Path SubType.\r
732///\r
733#define NVDIMM_NAMESPACE_DP 0x20\r
734typedef struct {\r
735 EFI_DEVICE_PATH_PROTOCOL Header;\r
736 ///\r
737 /// Namespace unique label identifier UUID.\r
738 ///\r
739 EFI_GUID Uuid;\r
740} NVDIMM_NAMESPACE_DEVICE_PATH;\r
741\r
959ccb23 742//\r
743// Use VENDOR_DEVICE_PATH struct\r
744//\r
745#define MSG_VENDOR_DP 0x0a\r
00edb218 746typedef VENDOR_DEVICE_PATH VENDOR_DEFINED_DEVICE_PATH;\r
959ccb23 747\r
748#define DEVICE_PATH_MESSAGING_PC_ANSI EFI_PC_ANSI_GUID\r
749#define DEVICE_PATH_MESSAGING_VT_100 EFI_VT_100_GUID\r
750#define DEVICE_PATH_MESSAGING_VT_100_PLUS EFI_VT_100_PLUS_GUID\r
751#define DEVICE_PATH_MESSAGING_VT_UTF8 EFI_VT_UTF8_GUID\r
752\r
f1004231
LG
753///\r
754/// A new device path node is defined to declare flow control characteristics.\r
755/// UART Flow Control Messaging Device Path\r
756///\r
959ccb23 757typedef struct {\r
758 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231 759 ///\r
af2dc6a7 760 /// DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL GUID.\r
f1004231 761 ///\r
959ccb23 762 EFI_GUID Guid;\r
f1004231
LG
763 ///\r
764 /// Bitmap of supported flow control types.\r
765 /// Bit 0 set indicates hardware flow control.\r
766 /// Bit 1 set indicates Xon/Xoff flow control.\r
767 /// All other bits are reserved and are clear.\r
768 ///\r
959ccb23 769 UINT32 FlowControlMap;\r
770} UART_FLOW_CONTROL_DEVICE_PATH;\r
771\r
a58cc068
RN
772#define UART_FLOW_CONTROL_HARDWARE 0x00000001\r
773#define UART_FLOW_CONTROL_XON_XOFF 0x00000010\r
774\r
960212a3 775#define DEVICE_PATH_MESSAGING_SAS EFI_SAS_DEVICE_PATH_GUID\r
f1004231 776///\r
960212a3 777/// Serial Attached SCSI (SAS) Device Path.\r
f1004231 778///\r
959ccb23 779typedef struct {\r
780 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231 781 ///\r
af2dc6a7 782 /// DEVICE_PATH_MESSAGING_SAS GUID.\r
f1004231 783 ///\r
959ccb23 784 EFI_GUID Guid;\r
f1004231
LG
785 ///\r
786 /// Reserved for future use.\r
787 ///\r
959ccb23 788 UINT32 Reserved;\r
f1004231
LG
789 ///\r
790 /// SAS Address for Serial Attached SCSI Target.\r
791 ///\r
959ccb23 792 UINT64 SasAddress;\r
f1004231
LG
793 ///\r
794 /// SAS Logical Unit Number.\r
795 ///\r
959ccb23 796 UINT64 Lun;\r
f1004231 797 ///\r
af2dc6a7 798 /// More Information about the device and its interconnect.\r
f1004231 799 ///\r
959ccb23 800 UINT16 DeviceTopology;\r
f1004231 801 ///\r
af2dc6a7 802 /// Relative Target Port (RTP).\r
f1004231 803 ///\r
959ccb23 804 UINT16 RelativeTargetPort;\r
805} SAS_DEVICE_PATH;\r
806\r
501793fa
RN
807///\r
808/// Serial Attached SCSI (SAS) Ex Device Path SubType\r
809///\r
810#define MSG_SASEX_DP 0x16\r
811typedef struct {\r
812 EFI_DEVICE_PATH_PROTOCOL Header;\r
813 ///\r
814 /// 8-byte array of the SAS Address for Serial Attached SCSI Target Port.\r
815 ///\r
816 UINT8 SasAddress[8];\r
817 ///\r
818 /// 8-byte array of the SAS Logical Unit Number.\r
819 ///\r
820 UINT8 Lun[8];\r
821 ///\r
822 /// More Information about the device and its interconnect.\r
823 ///\r
824 UINT16 DeviceTopology;\r
825 ///\r
826 /// Relative Target Port (RTP).\r
827 ///\r
828 UINT16 RelativeTargetPort;\r
829} SASEX_DEVICE_PATH;\r
830\r
17625930
FT
831///\r
832/// NvmExpress Namespace Device Path SubType.\r
833///\r
834#define MSG_NVME_NAMESPACE_DP 0x17\r
835typedef struct {\r
836 EFI_DEVICE_PATH_PROTOCOL Header;\r
837 UINT32 NamespaceId;\r
838 UINT64 NamespaceUuid;\r
839} NVME_NAMESPACE_DEVICE_PATH;\r
840\r
ecbabb7f
JW
841///\r
842/// DNS Device Path SubType\r
843///\r
844#define MSG_DNS_DP 0x1F\r
845typedef struct {\r
846 EFI_DEVICE_PATH_PROTOCOL Header;\r
847 ///\r
848 /// Indicates the DNS server address is IPv4 or IPv6 address.\r
849 ///\r
850 UINT8 IsIPv6;\r
851 ///\r
852 /// Instance of the DNS server address.\r
853 ///\r
854 EFI_IP_ADDRESS DnsServerIp[];\r
855} DNS_DEVICE_PATH;\r
856\r
4128acd9
RN
857///\r
858/// Uniform Resource Identifiers (URI) Device Path SubType\r
859///\r
860#define MSG_URI_DP 0x18\r
861typedef struct {\r
862 EFI_DEVICE_PATH_PROTOCOL Header;\r
863 ///\r
864 /// Instance of the URI pursuant to RFC 3986.\r
865 ///\r
866 CHAR8 Uri[];\r
867} URI_DEVICE_PATH;\r
868\r
52306166
FT
869///\r
870/// Universal Flash Storage (UFS) Device Path SubType.\r
871///\r
872#define MSG_UFS_DP 0x19\r
873typedef struct {\r
874 EFI_DEVICE_PATH_PROTOCOL Header;\r
875 ///\r
876 /// Target ID on the UFS bus (PUN).\r
877 ///\r
878 UINT8 Pun;\r
879 ///\r
880 /// Logical Unit Number (LUN).\r
881 ///\r
882 UINT8 Lun;\r
883} UFS_DEVICE_PATH;\r
884\r
ab8686b8
FT
885///\r
886/// SD (Secure Digital) Device Path SubType.\r
887///\r
888#define MSG_SD_DP 0x1A\r
889typedef struct {\r
890 EFI_DEVICE_PATH_PROTOCOL Header;\r
891 UINT8 SlotNumber;\r
892} SD_DEVICE_PATH;\r
893\r
5c67fb2f
FT
894///\r
895/// EMMC (Embedded MMC) Device Path SubType.\r
896///\r
897#define MSG_EMMC_DP 0x1D\r
898typedef struct {\r
899 EFI_DEVICE_PATH_PROTOCOL Header;\r
900 UINT8 SlotNumber;\r
901} EMMC_DEVICE_PATH;\r
902\r
f1004231 903///\r
9319d2c2 904/// iSCSI Device Path SubType\r
f1004231 905///\r
959ccb23 906#define MSG_ISCSI_DP 0x13\r
907typedef struct {\r
908 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231 909 ///\r
af2dc6a7 910 /// Network Protocol (0 = TCP, 1+ = reserved).\r
f1004231 911 ///\r
959ccb23 912 UINT16 NetworkProtocol;\r
f1004231 913 ///\r
af2dc6a7 914 /// iSCSI Login Options.\r
f1004231 915 ///\r
959ccb23 916 UINT16 LoginOption;\r
f1004231 917 ///\r
af2dc6a7 918 /// iSCSI Logical Unit Number.\r
f1004231 919 ///\r
ab2abe4c 920 UINT64 Lun;\r
f1004231
LG
921 ///\r
922 /// iSCSI Target Portal group tag the initiator intends\r
923 /// to establish a session with.\r
924 ///\r
959ccb23 925 UINT16 TargetPortalGroupTag;\r
f1004231
LG
926 ///\r
927 /// iSCSI NodeTarget Name. The length of the name\r
928 /// is determined by subtracting the offset of this field from Length.\r
929 ///\r
af2dc6a7 930 /// CHAR8 iSCSI Target Name.\r
959ccb23 931} ISCSI_DEVICE_PATH;\r
932\r
933#define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST 0x0000\r
934#define ISCSI_LOGIN_OPTION_HEADER_DIGEST_USING_CRC32C 0x0002\r
935#define ISCSI_LOGIN_OPTION_NO_DATA_DIGEST 0x0000\r
936#define ISCSI_LOGIN_OPTION_DATA_DIGEST_USING_CRC32C 0x0008\r
937#define ISCSI_LOGIN_OPTION_AUTHMETHOD_CHAP 0x0000\r
938#define ISCSI_LOGIN_OPTION_AUTHMETHOD_NON 0x1000\r
939#define ISCSI_LOGIN_OPTION_CHAP_BI 0x0000\r
940#define ISCSI_LOGIN_OPTION_CHAP_UNI 0x2000\r
941\r
8f97f911 942///\r
af2dc6a7 943/// VLAN Device Path SubType.\r
8f97f911 944///\r
945#define MSG_VLAN_DP 0x14\r
946typedef struct {\r
947 EFI_DEVICE_PATH_PROTOCOL Header;\r
948 ///\r
af2dc6a7 949 /// VLAN identifier (0-4094).\r
8f97f911 950 ///\r
951 UINT16 VlanId;\r
952} VLAN_DEVICE_PATH;\r
953\r
362c355c
QS
954///\r
955/// Bluetooth Device Path SubType.\r
956///\r
957#define MSG_BLUETOOTH_DP 0x1b\r
958typedef struct {\r
959 EFI_DEVICE_PATH_PROTOCOL Header;\r
960 ///\r
961 /// 48bit Bluetooth device address.\r
962 ///\r
963 BLUETOOTH_ADDRESS BD_ADDR;\r
964} BLUETOOTH_DEVICE_PATH;\r
965\r
3bafd562
HW
966///\r
967/// Wi-Fi Device Path SubType.\r
968///\r
969#define MSG_WIFI_DP 0x1C\r
970typedef struct {\r
971 EFI_DEVICE_PATH_PROTOCOL Header;\r
972 ///\r
973 /// Service set identifier. A 32-byte octets string.\r
974 ///\r
975 UINT8 SSId[32];\r
976} WIFI_DEVICE_PATH;\r
977\r
ff5623e9
RN
978///\r
979/// Bluetooth LE Device Path SubType.\r
980///\r
981#define MSG_BLUETOOTH_LE_DP 0x1E\r
982typedef struct {\r
983 EFI_DEVICE_PATH_PROTOCOL Header;\r
984 BLUETOOTH_LE_ADDRESS Address;\r
985} BLUETOOTH_LE_DEVICE_PATH;\r
986\r
959ccb23 987//\r
988// Media Device Path\r
989//\r
990#define MEDIA_DEVICE_PATH 0x04\r
991\r
f1004231 992///\r
af2dc6a7 993/// Hard Drive Media Device Path SubType.\r
f1004231 994///\r
959ccb23 995#define MEDIA_HARDDRIVE_DP 0x01\r
9319d2c2
LG
996\r
997///\r
998/// The Hard Drive Media Device Path is used to represent a partition on a hard drive.\r
999///\r
959ccb23 1000typedef struct {\r
1001 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231
LG
1002 ///\r
1003 /// Describes the entry in a partition table, starting with entry 1.\r
1004 /// Partition number zero represents the entire device. Valid\r
1005 /// partition numbers for a MBR partition are [1, 4]. Valid\r
8e7b8fb4 1006 /// partition numbers for a GPT partition are [1, NumberOfPartitionEntries].\r
f1004231 1007 ///\r
959ccb23 1008 UINT32 PartitionNumber;\r
f1004231 1009 ///\r
af2dc6a7 1010 /// Starting LBA of the partition on the hard drive.\r
f1004231 1011 ///\r
959ccb23 1012 UINT64 PartitionStart;\r
f1004231 1013 ///\r
af2dc6a7 1014 /// Size of the partition in units of Logical Blocks.\r
f1004231 1015 ///\r
959ccb23 1016 UINT64 PartitionSize;\r
f1004231 1017 ///\r
8e7b8fb4 1018 /// Signature unique to this partition:\r
1019 /// If SignatureType is 0, this field has to be initialized with 16 zeros.\r
1020 /// If SignatureType is 1, the MBR signature is stored in the first 4 bytes of this field.\r
1021 /// The other 12 bytes are initialized with zeros.\r
1022 /// If SignatureType is 2, this field contains a 16 byte signature.\r
f1004231 1023 ///\r
959ccb23 1024 UINT8 Signature[16];\r
f1004231 1025 ///\r
af2dc6a7 1026 /// Partition Format: (Unused values reserved).\r
1027 /// 0x01 - PC-AT compatible legacy MBR.\r
1028 /// 0x02 - GUID Partition Table.\r
f1004231 1029 ///\r
959ccb23 1030 UINT8 MBRType;\r
f1004231 1031 ///\r
af2dc6a7 1032 /// Type of Disk Signature: (Unused values reserved).\r
cd2ed84a 1033 /// 0x00 - No Disk Signature.\r
1034 /// 0x01 - 32-bit signature from address 0x1b8 of the type 0x01 MBR.\r
1035 /// 0x02 - GUID signature.\r
f1004231 1036 ///\r
959ccb23 1037 UINT8 SignatureType;\r
1038} HARDDRIVE_DEVICE_PATH;\r
1039\r
1040#define MBR_TYPE_PCAT 0x01\r
1041#define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02\r
1042\r
f1004231 1043#define NO_DISK_SIGNATURE 0x00\r
959ccb23 1044#define SIGNATURE_TYPE_MBR 0x01\r
1045#define SIGNATURE_TYPE_GUID 0x02\r
1046\r
f1004231 1047///\r
af2dc6a7 1048/// CD-ROM Media Device Path SubType.\r
f1004231 1049///\r
959ccb23 1050#define MEDIA_CDROM_DP 0x02\r
9319d2c2
LG
1051\r
1052///\r
1053/// The CD-ROM Media Device Path is used to define a system partition that exists on a CD-ROM.\r
1054///\r
959ccb23 1055typedef struct {\r
1056 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231
LG
1057 ///\r
1058 /// Boot Entry number from the Boot Catalog. The Initial/Default entry is defined as zero.\r
1059 ///\r
959ccb23 1060 UINT32 BootEntry;\r
f1004231
LG
1061 ///\r
1062 /// Starting RBA of the partition on the medium. CD-ROMs use Relative logical Block Addressing.\r
1063 ///\r
959ccb23 1064 UINT64 PartitionStart;\r
f1004231
LG
1065 ///\r
1066 /// Size of the partition in units of Blocks, also called Sectors.\r
1067 ///\r
959ccb23 1068 UINT64 PartitionSize;\r
1069} CDROM_DEVICE_PATH;\r
1070\r
9319d2c2
LG
1071//\r
1072// Use VENDOR_DEVICE_PATH struct\r
1073//\r
af2dc6a7 1074#define MEDIA_VENDOR_DP 0x03 ///< Media vendor device path subtype.\r
959ccb23 1075\r
f1004231 1076///\r
9319d2c2 1077/// File Path Media Device Path SubType\r
f1004231 1078///\r
959ccb23 1079#define MEDIA_FILEPATH_DP 0x04\r
1080typedef struct {\r
1081 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231 1082 ///\r
fbf926ad 1083 /// A NULL-terminated Path string including directory and file names.\r
f1004231 1084 ///\r
959ccb23 1085 CHAR16 PathName[1];\r
1086} FILEPATH_DEVICE_PATH;\r
1087\r
07636730 1088#define SIZE_OF_FILEPATH_DEVICE_PATH OFFSET_OF(FILEPATH_DEVICE_PATH,PathName)\r
959ccb23 1089\r
9319d2c2 1090///\r
af2dc6a7 1091/// Media Protocol Device Path SubType.\r
9319d2c2
LG
1092///\r
1093#define MEDIA_PROTOCOL_DP 0x05\r
1094\r
f1004231 1095///\r
9095d37b
LG
1096/// The Media Protocol Device Path is used to denote the protocol that is being\r
1097/// used in a device path at the location of the path specified.\r
f1004231
LG
1098/// Many protocols are inherent to the style of device path.\r
1099///\r
959ccb23 1100typedef struct {\r
1101 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231
LG
1102 ///\r
1103 /// The ID of the protocol.\r
1104 ///\r
959ccb23 1105 EFI_GUID Protocol;\r
1106} MEDIA_PROTOCOL_DEVICE_PATH;\r
1107\r
f1004231 1108///\r
960212a3 1109/// PIWG Firmware File SubType.\r
f1004231 1110///\r
56bed2f4 1111#define MEDIA_PIWG_FW_FILE_DP 0x06\r
9319d2c2
LG
1112\r
1113///\r
56bed2f4 1114/// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware file.\r
9319d2c2 1115///\r
146332ae 1116typedef struct {\r
1117 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231 1118 ///\r
56bed2f4 1119 /// Firmware file name\r
f1004231 1120 ///\r
56bed2f4 1121 EFI_GUID FvFileName;\r
1122} MEDIA_FW_VOL_FILEPATH_DEVICE_PATH;\r
959ccb23 1123\r
f1004231 1124///\r
af2dc6a7 1125/// PIWG Firmware Volume Device Path SubType.\r
f1004231 1126///\r
56bed2f4 1127#define MEDIA_PIWG_FW_VOL_DP 0x07\r
9319d2c2
LG
1128\r
1129///\r
56bed2f4 1130/// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware volume.\r
9319d2c2 1131///\r
146332ae 1132typedef struct {\r
1133 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231 1134 ///\r
56bed2f4 1135 /// Firmware volume name.\r
f1004231 1136 ///\r
56bed2f4 1137 EFI_GUID FvName;\r
1138} MEDIA_FW_VOL_DEVICE_PATH;\r
959ccb23 1139\r
deb7f094 1140///\r
af2dc6a7 1141/// Media relative offset range device path.\r
deb7f094 1142///\r
1143#define MEDIA_RELATIVE_OFFSET_RANGE_DP 0x08\r
1144\r
1145///\r
1146/// Used to describe the offset range of media relative.\r
1147///\r
1148typedef struct {\r
1149 EFI_DEVICE_PATH_PROTOCOL Header;\r
56bed2f4 1150 UINT32 Reserved;\r
deb7f094 1151 UINT64 StartingOffset;\r
1152 UINT64 EndingOffset;\r
1153} MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH;\r
1154\r
6a46c1a2
FT
1155///\r
1156/// This GUID defines a RAM Disk supporting a raw disk format in volatile memory.\r
1157///\r
1158#define EFI_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE\r
1159\r
1160extern EFI_GUID gEfiVirtualDiskGuid;\r
1161\r
1162///\r
1163/// This GUID defines a RAM Disk supporting an ISO image in volatile memory.\r
1164///\r
1165#define EFI_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE\r
1166\r
1167extern EFI_GUID gEfiVirtualCdGuid;\r
1168\r
1169///\r
1170/// This GUID defines a RAM Disk supporting a raw disk format in persistent memory.\r
1171///\r
1172#define EFI_PERSISTENT_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT\r
1173\r
1174extern EFI_GUID gEfiPersistentVirtualDiskGuid;\r
1175\r
1176///\r
1177/// This GUID defines a RAM Disk supporting an ISO image in persistent memory.\r
1178///\r
1179#define EFI_PERSISTENT_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT\r
1180\r
1181extern EFI_GUID gEfiPersistentVirtualCdGuid;\r
1182\r
1183///\r
1184/// Media ram disk device path.\r
1185///\r
1186#define MEDIA_RAM_DISK_DP 0x09\r
1187\r
1188///\r
1189/// Used to describe the ram disk device path.\r
1190///\r
1191typedef struct {\r
1192 EFI_DEVICE_PATH_PROTOCOL Header;\r
1193 ///\r
1194 /// Starting Memory Address.\r
1195 ///\r
1196 UINT32 StartingAddr[2];\r
1197 ///\r
1198 /// Ending Memory Address.\r
1199 ///\r
1200 UINT32 EndingAddr[2];\r
1201 ///\r
1202 /// GUID that defines the type of the RAM Disk.\r
1203 ///\r
1204 EFI_GUID TypeGuid;\r
1205 ///\r
1206 /// RAM Diskinstance number, if supported. The default value is zero.\r
1207 ///\r
1208 UINT16 Instance;\r
1209} MEDIA_RAM_DISK_DEVICE_PATH;\r
1210\r
f1004231 1211///\r
af2dc6a7 1212/// BIOS Boot Specification Device Path.\r
f1004231 1213///\r
959ccb23 1214#define BBS_DEVICE_PATH 0x05\r
9319d2c2
LG
1215\r
1216///\r
af2dc6a7 1217/// BIOS Boot Specification Device Path SubType.\r
9319d2c2 1218///\r
959ccb23 1219#define BBS_BBS_DP 0x01\r
9319d2c2
LG
1220\r
1221///\r
1222/// This Device Path is used to describe the booting of non-EFI-aware operating systems.\r
1223///\r
959ccb23 1224typedef struct {\r
1225 EFI_DEVICE_PATH_PROTOCOL Header;\r
f1004231
LG
1226 ///\r
1227 /// Device Type as defined by the BIOS Boot Specification.\r
1228 ///\r
959ccb23 1229 UINT16 DeviceType;\r
f1004231 1230 ///\r
af2dc6a7 1231 /// Status Flags as defined by the BIOS Boot Specification.\r
f1004231 1232 ///\r
959ccb23 1233 UINT16 StatusFlag;\r
f1004231 1234 ///\r
4f077902 1235 /// Null-terminated ASCII string that describes the boot device to a user.\r
f1004231 1236 ///\r
959ccb23 1237 CHAR8 String[1];\r
1238} BBS_BBS_DEVICE_PATH;\r
1239\r
1240//\r
1241// DeviceType definitions - from BBS specification\r
1242//\r
1243#define BBS_TYPE_FLOPPY 0x01\r
1244#define BBS_TYPE_HARDDRIVE 0x02\r
1245#define BBS_TYPE_CDROM 0x03\r
1246#define BBS_TYPE_PCMCIA 0x04\r
1247#define BBS_TYPE_USB 0x05\r
1248#define BBS_TYPE_EMBEDDED_NETWORK 0x06\r
1249#define BBS_TYPE_BEV 0x80\r
1250#define BBS_TYPE_UNKNOWN 0xFF\r
1251\r
1252\r
99e8ed21 1253///\r
af2dc6a7 1254/// Union of all possible Device Paths and pointers to Device Paths.\r
99e8ed21 1255///\r
959ccb23 1256typedef union {\r
960212a3 1257 EFI_DEVICE_PATH_PROTOCOL DevPath;\r
1258 PCI_DEVICE_PATH Pci;\r
1259 PCCARD_DEVICE_PATH PcCard;\r
1260 MEMMAP_DEVICE_PATH MemMap;\r
1261 VENDOR_DEVICE_PATH Vendor;\r
1262\r
1263 CONTROLLER_DEVICE_PATH Controller;\r
624f017e 1264 BMC_DEVICE_PATH Bmc;\r
960212a3 1265 ACPI_HID_DEVICE_PATH Acpi;\r
1266 ACPI_EXTENDED_HID_DEVICE_PATH ExtendedAcpi;\r
1267 ACPI_ADR_DEVICE_PATH AcpiAdr;\r
1268\r
1269 ATAPI_DEVICE_PATH Atapi;\r
1270 SCSI_DEVICE_PATH Scsi;\r
1271 ISCSI_DEVICE_PATH Iscsi;\r
1272 FIBRECHANNEL_DEVICE_PATH FibreChannel;\r
09e19629 1273 FIBRECHANNELEX_DEVICE_PATH FibreChannelEx;\r
960212a3 1274\r
1275 F1394_DEVICE_PATH F1394;\r
1276 USB_DEVICE_PATH Usb;\r
1277 SATA_DEVICE_PATH Sata;\r
1278 USB_CLASS_DEVICE_PATH UsbClass;\r
1279 USB_WWID_DEVICE_PATH UsbWwid;\r
1280 DEVICE_LOGICAL_UNIT_DEVICE_PATH LogicUnit;\r
1281 I2O_DEVICE_PATH I2O;\r
1282 MAC_ADDR_DEVICE_PATH MacAddr;\r
1283 IPv4_DEVICE_PATH Ipv4;\r
1284 IPv6_DEVICE_PATH Ipv6;\r
1285 VLAN_DEVICE_PATH Vlan;\r
1286 INFINIBAND_DEVICE_PATH InfiniBand;\r
1287 UART_DEVICE_PATH Uart;\r
1288 UART_FLOW_CONTROL_DEVICE_PATH UartFlowControl;\r
1289 SAS_DEVICE_PATH Sas;\r
501793fa 1290 SASEX_DEVICE_PATH SasEx;\r
17625930 1291 NVME_NAMESPACE_DEVICE_PATH NvmeNamespace;\r
9095d37b 1292 DNS_DEVICE_PATH Dns;\r
4128acd9 1293 URI_DEVICE_PATH Uri;\r
362c355c 1294 BLUETOOTH_DEVICE_PATH Bluetooth;\r
3bafd562 1295 WIFI_DEVICE_PATH WiFi;\r
52306166 1296 UFS_DEVICE_PATH Ufs;\r
ab8686b8 1297 SD_DEVICE_PATH Sd;\r
5c67fb2f 1298 EMMC_DEVICE_PATH Emmc;\r
960212a3 1299 HARDDRIVE_DEVICE_PATH HardDrive;\r
1300 CDROM_DEVICE_PATH CD;\r
1301\r
1302 FILEPATH_DEVICE_PATH FilePath;\r
1303 MEDIA_PROTOCOL_DEVICE_PATH MediaProtocol;\r
1304\r
1305 MEDIA_FW_VOL_DEVICE_PATH FirmwareVolume;\r
1306 MEDIA_FW_VOL_FILEPATH_DEVICE_PATH FirmwareFile;\r
1307 MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH Offset;\r
6a46c1a2 1308 MEDIA_RAM_DISK_DEVICE_PATH RamDisk;\r
960212a3 1309 BBS_BBS_DEVICE_PATH Bbs;\r
959ccb23 1310} EFI_DEV_PATH;\r
1311\r
1312\r
1313\r
1314typedef union {\r
960212a3 1315 EFI_DEVICE_PATH_PROTOCOL *DevPath;\r
1316 PCI_DEVICE_PATH *Pci;\r
1317 PCCARD_DEVICE_PATH *PcCard;\r
1318 MEMMAP_DEVICE_PATH *MemMap;\r
1319 VENDOR_DEVICE_PATH *Vendor;\r
1320\r
1321 CONTROLLER_DEVICE_PATH *Controller;\r
624f017e 1322 BMC_DEVICE_PATH *Bmc;\r
960212a3 1323 ACPI_HID_DEVICE_PATH *Acpi;\r
1324 ACPI_EXTENDED_HID_DEVICE_PATH *ExtendedAcpi;\r
1325 ACPI_ADR_DEVICE_PATH *AcpiAdr;\r
1326\r
1327 ATAPI_DEVICE_PATH *Atapi;\r
1328 SCSI_DEVICE_PATH *Scsi;\r
1329 ISCSI_DEVICE_PATH *Iscsi;\r
1330 FIBRECHANNEL_DEVICE_PATH *FibreChannel;\r
09e19629 1331 FIBRECHANNELEX_DEVICE_PATH *FibreChannelEx;\r
960212a3 1332\r
1333 F1394_DEVICE_PATH *F1394;\r
1334 USB_DEVICE_PATH *Usb;\r
1335 SATA_DEVICE_PATH *Sata;\r
1336 USB_CLASS_DEVICE_PATH *UsbClass;\r
1337 USB_WWID_DEVICE_PATH *UsbWwid;\r
1338 DEVICE_LOGICAL_UNIT_DEVICE_PATH *LogicUnit;\r
1339 I2O_DEVICE_PATH *I2O;\r
1340 MAC_ADDR_DEVICE_PATH *MacAddr;\r
1341 IPv4_DEVICE_PATH *Ipv4;\r
1342 IPv6_DEVICE_PATH *Ipv6;\r
1343 VLAN_DEVICE_PATH *Vlan;\r
1344 INFINIBAND_DEVICE_PATH *InfiniBand;\r
1345 UART_DEVICE_PATH *Uart;\r
1346 UART_FLOW_CONTROL_DEVICE_PATH *UartFlowControl;\r
1347 SAS_DEVICE_PATH *Sas;\r
501793fa 1348 SASEX_DEVICE_PATH *SasEx;\r
17625930 1349 NVME_NAMESPACE_DEVICE_PATH *NvmeNamespace;\r
ecbabb7f 1350 DNS_DEVICE_PATH *Dns;\r
4128acd9 1351 URI_DEVICE_PATH *Uri;\r
362c355c 1352 BLUETOOTH_DEVICE_PATH *Bluetooth;\r
3bafd562 1353 WIFI_DEVICE_PATH *WiFi;\r
52306166 1354 UFS_DEVICE_PATH *Ufs;\r
ab8686b8 1355 SD_DEVICE_PATH *Sd;\r
5c67fb2f 1356 EMMC_DEVICE_PATH *Emmc;\r
960212a3 1357 HARDDRIVE_DEVICE_PATH *HardDrive;\r
1358 CDROM_DEVICE_PATH *CD;\r
1359\r
1360 FILEPATH_DEVICE_PATH *FilePath;\r
1361 MEDIA_PROTOCOL_DEVICE_PATH *MediaProtocol;\r
1362\r
1363 MEDIA_FW_VOL_DEVICE_PATH *FirmwareVolume;\r
1364 MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FirmwareFile;\r
1365 MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *Offset;\r
6a46c1a2 1366 MEDIA_RAM_DISK_DEVICE_PATH *RamDisk;\r
960212a3 1367 BBS_BBS_DEVICE_PATH *Bbs;\r
1368 UINT8 *Raw;\r
959ccb23 1369} EFI_DEV_PATH_PTR;\r
1370\r
1371#pragma pack()\r
9095d37b 1372\r
d1f95000 1373#define END_DEVICE_PATH_TYPE 0x7f\r
e5dab016 1374#define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xFF\r
1375#define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01\r
d1f95000 1376\r
1377extern EFI_GUID gEfiDevicePathProtocolGuid;\r
959ccb23 1378\r
1379#endif\r