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