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