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