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