iPXE
DevicePath.h
Go to the documentation of this file.
00001 /** @file
00002   The device path protocol as defined in UEFI 2.0.
00003 
00004   The device path represents a programmatic path to a device,
00005   from a software point of view. The path must persist from boot to boot, so
00006   it can not contain things like PCI bus numbers that change from boot to boot.
00007 
00008 Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
00009 This program and the accompanying materials are licensed and made available under
00010 the terms and conditions of the BSD License that accompanies this distribution.
00011 The full text of the license may be found at
00012 http://opensource.org/licenses/bsd-license.php.
00013 
00014 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
00015 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
00016 
00017 **/
00018 
00019 #ifndef __EFI_DEVICE_PATH_PROTOCOL_H__
00020 #define __EFI_DEVICE_PATH_PROTOCOL_H__
00021 
00022 FILE_LICENCE ( BSD3 );
00023 
00024 #include <ipxe/efi/Guid/PcAnsi.h>
00025 #include <ipxe/efi/IndustryStandard/Bluetooth.h>
00026 #include <ipxe/efi/IndustryStandard/Acpi60.h>
00027 
00028 ///
00029 /// Device Path protocol.
00030 ///
00031 #define EFI_DEVICE_PATH_PROTOCOL_GUID \
00032   { \
00033     0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
00034   }
00035 
00036 ///
00037 /// Device Path guid definition for backward-compatible with EFI1.1.
00038 ///
00039 #define DEVICE_PATH_PROTOCOL  EFI_DEVICE_PATH_PROTOCOL_GUID
00040 
00041 #pragma pack(1)
00042 
00043 /**
00044   This protocol can be used on any device handle to obtain generic path/location
00045   information concerning the physical device or logical device. If the handle does
00046   not logically map to a physical device, the handle may not necessarily support
00047   the device path protocol. The device path describes the location of the device
00048   the handle is for. The size of the Device Path can be determined from the structures
00049   that make up the Device Path.
00050 **/
00051 typedef struct {
00052   UINT8 Type;       ///< 0x01 Hardware Device Path.
00053                     ///< 0x02 ACPI Device Path.
00054                     ///< 0x03 Messaging Device Path.
00055                     ///< 0x04 Media Device Path.
00056                     ///< 0x05 BIOS Boot Specification Device Path.
00057                     ///< 0x7F End of Hardware Device Path.
00058 
00059   UINT8 SubType;    ///< Varies by Type
00060                     ///< 0xFF End Entire Device Path, or
00061                     ///< 0x01 End This Instance of a Device Path and start a new
00062                     ///< Device Path.
00063 
00064   UINT8 Length[2];  ///< Specific Device Path data. Type and Sub-Type define
00065                     ///< type of data. Size of data is included in Length.
00066 
00067 } EFI_DEVICE_PATH_PROTOCOL;
00068 
00069 ///
00070 /// Device Path protocol definition for backward-compatible with EFI1.1.
00071 ///
00072 typedef EFI_DEVICE_PATH_PROTOCOL  EFI_DEVICE_PATH;
00073 
00074 ///
00075 /// Hardware Device Paths.
00076 ///
00077 #define HARDWARE_DEVICE_PATH      0x01
00078 
00079 ///
00080 /// PCI Device Path SubType.
00081 ///
00082 #define HW_PCI_DP                 0x01
00083 
00084 ///
00085 /// PCI Device Path.
00086 ///
00087 typedef struct {
00088   EFI_DEVICE_PATH_PROTOCOL        Header;
00089   ///
00090   /// PCI Function Number.
00091   ///
00092   UINT8                           Function;
00093   ///
00094   /// PCI Device Number.
00095   ///
00096   UINT8                           Device;
00097 } PCI_DEVICE_PATH;
00098 
00099 ///
00100 /// PCCARD Device Path SubType.
00101 ///
00102 #define HW_PCCARD_DP              0x02
00103 
00104 ///
00105 /// PCCARD Device Path.
00106 ///
00107 typedef struct {
00108   EFI_DEVICE_PATH_PROTOCOL        Header;
00109   ///
00110   /// Function Number (0 = First Function).
00111   ///
00112   UINT8                           FunctionNumber;
00113 } PCCARD_DEVICE_PATH;
00114 
00115 ///
00116 /// Memory Mapped Device Path SubType.
00117 ///
00118 #define HW_MEMMAP_DP              0x03
00119 
00120 ///
00121 /// Memory Mapped Device Path.
00122 ///
00123 typedef struct {
00124   EFI_DEVICE_PATH_PROTOCOL        Header;
00125   ///
00126   /// EFI_MEMORY_TYPE
00127   ///
00128   UINT32                          MemoryType;
00129   ///
00130   /// Starting Memory Address.
00131   ///
00132   EFI_PHYSICAL_ADDRESS            StartingAddress;
00133   ///
00134   /// Ending Memory Address.
00135   ///
00136   EFI_PHYSICAL_ADDRESS            EndingAddress;
00137 } MEMMAP_DEVICE_PATH;
00138 
00139 ///
00140 /// Hardware Vendor Device Path SubType.
00141 ///
00142 #define HW_VENDOR_DP              0x04
00143 
00144 ///
00145 /// The Vendor Device Path allows the creation of vendor-defined Device Paths. A vendor must
00146 /// allocate a Vendor GUID for a Device Path. The Vendor GUID can then be used to define the
00147 /// contents on the n bytes that follow in the Vendor Device Path node.
00148 ///
00149 typedef struct {
00150   EFI_DEVICE_PATH_PROTOCOL        Header;
00151   ///
00152   /// Vendor-assigned GUID that defines the data that follows.
00153   ///
00154   EFI_GUID                        Guid;
00155   ///
00156   /// Vendor-defined variable size data.
00157   ///
00158 } VENDOR_DEVICE_PATH;
00159 
00160 ///
00161 /// Controller Device Path SubType.
00162 ///
00163 #define HW_CONTROLLER_DP          0x05
00164 
00165 ///
00166 /// Controller Device Path.
00167 ///
00168 typedef struct {
00169   EFI_DEVICE_PATH_PROTOCOL        Header;
00170   ///
00171   /// Controller number.
00172   ///
00173   UINT32                          ControllerNumber;
00174 } CONTROLLER_DEVICE_PATH;
00175 
00176 ///
00177 /// BMC Device Path SubType.
00178 ///
00179 #define HW_BMC_DP                 0x06
00180 
00181 ///
00182 /// BMC Device Path.
00183 ///
00184 typedef struct {
00185   EFI_DEVICE_PATH_PROTOCOL        Header;
00186   ///
00187   /// Interface Type.
00188   ///
00189   UINT8                           InterfaceType;
00190   ///
00191   /// Base Address.
00192   ///
00193   UINT8                           BaseAddress[8];
00194 } BMC_DEVICE_PATH;
00195 
00196 ///
00197 /// ACPI Device Paths.
00198 ///
00199 #define ACPI_DEVICE_PATH          0x02
00200 
00201 ///
00202 /// ACPI Device Path SubType.
00203 ///
00204 #define ACPI_DP                   0x01
00205 typedef struct {
00206   EFI_DEVICE_PATH_PROTOCOL        Header;
00207   ///
00208   /// Device's PnP hardware ID stored in a numeric 32-bit
00209   /// compressed EISA-type ID. This value must match the
00210   /// corresponding _HID in the ACPI name space.
00211   ///
00212   UINT32                          HID;
00213   ///
00214   /// Unique ID that is required by ACPI if two devices have the
00215   /// same _HID. This value must also match the corresponding
00216   /// _UID/_HID pair in the ACPI name space. Only the 32-bit
00217   /// numeric value type of _UID is supported. Thus, strings must
00218   /// not be used for the _UID in the ACPI name space.
00219   ///
00220   UINT32                          UID;
00221 } ACPI_HID_DEVICE_PATH;
00222 
00223 ///
00224 /// Expanded ACPI Device Path SubType.
00225 ///
00226 #define ACPI_EXTENDED_DP          0x02
00227 typedef struct {
00228   EFI_DEVICE_PATH_PROTOCOL        Header;
00229   ///
00230   /// Device's PnP hardware ID stored in a numeric 32-bit
00231   /// compressed EISA-type ID. This value must match the
00232   /// corresponding _HID in the ACPI name space.
00233   ///
00234   UINT32                          HID;
00235   ///
00236   /// Unique ID that is required by ACPI if two devices have the
00237   /// same _HID. This value must also match the corresponding
00238   /// _UID/_HID pair in the ACPI name space.
00239   ///
00240   UINT32                          UID;
00241   ///
00242   /// Device's compatible PnP hardware ID stored in a numeric
00243   /// 32-bit compressed EISA-type ID. This value must match at
00244   /// least one of the compatible device IDs returned by the
00245   /// corresponding _CID in the ACPI name space.
00246   ///
00247   UINT32                          CID;
00248   ///
00249   /// Optional variable length _HIDSTR.
00250   /// Optional variable length _UIDSTR.
00251   /// Optional variable length _CIDSTR.
00252   ///
00253 } ACPI_EXTENDED_HID_DEVICE_PATH;
00254 
00255 //
00256 //  EISA ID Macro
00257 //  EISA ID Definition 32-bits
00258 //   bits[15:0] - three character compressed ASCII EISA ID.
00259 //   bits[31:16] - binary number
00260 //    Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'
00261 //
00262 #define PNP_EISA_ID_CONST         0x41d0
00263 #define EISA_ID(_Name, _Num)      ((UINT32)((_Name) | (_Num) << 16))
00264 #define EISA_PNP_ID(_PNPId)       (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
00265 #define EFI_PNP_ID(_PNPId)        (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
00266 
00267 #define PNP_EISA_ID_MASK          0xffff
00268 #define EISA_ID_TO_NUM(_Id)       ((_Id) >> 16)
00269 
00270 ///
00271 /// ACPI _ADR Device Path SubType.
00272 ///
00273 #define ACPI_ADR_DP               0x03
00274 
00275 ///
00276 /// The _ADR device path is used to contain video output device attributes to support the Graphics
00277 /// Output Protocol. The device path can contain multiple _ADR entries if multiple video output
00278 /// devices are displaying the same output.
00279 ///
00280 typedef struct {
00281   EFI_DEVICE_PATH_PROTOCOL        Header;
00282   ///
00283   /// _ADR value. For video output devices the value of this
00284   /// field comes from Table B-2 of the ACPI 3.0 specification. At
00285   /// least one _ADR value is required.
00286   ///
00287   UINT32                          ADR;
00288   //
00289   // This device path may optionally contain more than one _ADR entry.
00290   //
00291 } ACPI_ADR_DEVICE_PATH;
00292 
00293 #define ACPI_ADR_DISPLAY_TYPE_OTHER             0
00294 #define ACPI_ADR_DISPLAY_TYPE_VGA               1
00295 #define ACPI_ADR_DISPLAY_TYPE_TV                2
00296 #define ACPI_ADR_DISPLAY_TYPE_EXTERNAL_DIGITAL  3
00297 #define ACPI_ADR_DISPLAY_TYPE_INTERNAL_DIGITAL  4
00298 
00299 #define ACPI_DISPLAY_ADR(_DeviceIdScheme, _HeadId, _NonVgaOutput, _BiosCanDetect, _VendorInfo, _Type, _Port, _Index) \
00300           ((UINT32)(  ((UINT32)((_DeviceIdScheme) & 0x1) << 31) |  \
00301                       (((_HeadId)                 & 0x7) << 18) |  \
00302                       (((_NonVgaOutput)           & 0x1) << 17) |  \
00303                       (((_BiosCanDetect)          & 0x1) << 16) |  \
00304                       (((_VendorInfo)             & 0xf) << 12) |  \
00305                       (((_Type)                   & 0xf) << 8)  |  \
00306                       (((_Port)                   & 0xf) << 4)  |  \
00307                        ((_Index)                  & 0xf) ))
00308 
00309 ///
00310 /// Messaging Device Paths.
00311 /// This Device Path is used to describe the connection of devices outside the resource domain of the
00312 /// system. This Device Path can describe physical messaging information like SCSI ID, or abstract
00313 /// information like networking protocol IP addresses.
00314 ///
00315 #define MESSAGING_DEVICE_PATH     0x03
00316 
00317 ///
00318 /// ATAPI Device Path SubType
00319 ///
00320 #define MSG_ATAPI_DP              0x01
00321 typedef struct {
00322   EFI_DEVICE_PATH_PROTOCOL        Header;
00323   ///
00324   /// Set to zero for primary, or one for secondary.
00325   ///
00326   UINT8                           PrimarySecondary;
00327   ///
00328   /// Set to zero for master, or one for slave mode.
00329   ///
00330   UINT8                           SlaveMaster;
00331   ///
00332   /// Logical Unit Number.
00333   ///
00334   UINT16                          Lun;
00335 } ATAPI_DEVICE_PATH;
00336 
00337 ///
00338 /// SCSI Device Path SubType.
00339 ///
00340 #define MSG_SCSI_DP               0x02
00341 typedef struct {
00342   EFI_DEVICE_PATH_PROTOCOL        Header;
00343   ///
00344   /// Target ID on the SCSI bus (PUN).
00345   ///
00346   UINT16                          Pun;
00347   ///
00348   /// Logical Unit Number (LUN).
00349   ///
00350   UINT16                          Lun;
00351 } SCSI_DEVICE_PATH;
00352 
00353 ///
00354 /// Fibre Channel SubType.
00355 ///
00356 #define MSG_FIBRECHANNEL_DP       0x03
00357 typedef struct {
00358   EFI_DEVICE_PATH_PROTOCOL        Header;
00359   ///
00360   /// Reserved for the future.
00361   ///
00362   UINT32                          Reserved;
00363   ///
00364   /// Fibre Channel World Wide Number.
00365   ///
00366   UINT64                          WWN;
00367   ///
00368   /// Fibre Channel Logical Unit Number.
00369   ///
00370   UINT64                          Lun;
00371 } FIBRECHANNEL_DEVICE_PATH;
00372 
00373 ///
00374 /// Fibre Channel Ex SubType.
00375 ///
00376 #define MSG_FIBRECHANNELEX_DP     0x15
00377 typedef struct {
00378   EFI_DEVICE_PATH_PROTOCOL        Header;
00379   ///
00380   /// Reserved for the future.
00381   ///
00382   UINT32                          Reserved;
00383   ///
00384   /// 8 byte array containing Fibre Channel End Device Port Name.
00385   ///
00386   UINT8                           WWN[8];
00387   ///
00388   /// 8 byte array containing Fibre Channel Logical Unit Number.
00389   ///
00390   UINT8                           Lun[8];
00391 } FIBRECHANNELEX_DEVICE_PATH;
00392 
00393 ///
00394 /// 1394 Device Path SubType
00395 ///
00396 #define MSG_1394_DP               0x04
00397 typedef struct {
00398   EFI_DEVICE_PATH_PROTOCOL        Header;
00399   ///
00400   /// Reserved for the future.
00401   ///
00402   UINT32                          Reserved;
00403   ///
00404   /// 1394 Global Unique ID (GUID).
00405   ///
00406   UINT64                          Guid;
00407 } F1394_DEVICE_PATH;
00408 
00409 ///
00410 /// USB Device Path SubType.
00411 ///
00412 #define MSG_USB_DP                0x05
00413 typedef struct {
00414   EFI_DEVICE_PATH_PROTOCOL      Header;
00415   ///
00416   /// USB Parent Port Number.
00417   ///
00418   UINT8                         ParentPortNumber;
00419   ///
00420   /// USB Interface Number.
00421   ///
00422   UINT8                         InterfaceNumber;
00423 } USB_DEVICE_PATH;
00424 
00425 ///
00426 /// USB Class Device Path SubType.
00427 ///
00428 #define MSG_USB_CLASS_DP          0x0f
00429 typedef struct {
00430   EFI_DEVICE_PATH_PROTOCOL      Header;
00431   ///
00432   /// Vendor ID assigned by USB-IF. A value of 0xFFFF will
00433   /// match any Vendor ID.
00434   ///
00435   UINT16                        VendorId;
00436   ///
00437   /// Product ID assigned by USB-IF. A value of 0xFFFF will
00438   /// match any Product ID.
00439   ///
00440   UINT16                        ProductId;
00441   ///
00442   /// The class code assigned by the USB-IF. A value of 0xFF
00443   /// will match any class code.
00444   ///
00445   UINT8                         DeviceClass;
00446   ///
00447   /// The subclass code assigned by the USB-IF. A value of
00448   /// 0xFF will match any subclass code.
00449   ///
00450   UINT8                         DeviceSubClass;
00451   ///
00452   /// The protocol code assigned by the USB-IF. A value of
00453   /// 0xFF will match any protocol code.
00454   ///
00455   UINT8                         DeviceProtocol;
00456 } USB_CLASS_DEVICE_PATH;
00457 
00458 ///
00459 /// USB WWID Device Path SubType.
00460 ///
00461 #define MSG_USB_WWID_DP           0x10
00462 
00463 ///
00464 /// This device path describes a USB device using its serial number.
00465 ///
00466 typedef struct {
00467   EFI_DEVICE_PATH_PROTOCOL      Header;
00468   ///
00469   /// USB interface number.
00470   ///
00471   UINT16                        InterfaceNumber;
00472   ///
00473   /// USB vendor id of the device.
00474   ///
00475   UINT16                        VendorId;
00476   ///
00477   /// USB product id of the device.
00478   ///
00479   UINT16                        ProductId;
00480   ///
00481   /// Last 64-or-fewer UTF-16 characters of the USB
00482   /// serial number. The length of the string is
00483   /// determined by the Length field less the offset of the
00484   /// Serial Number field (10)
00485   ///
00486   /// CHAR16                     SerialNumber[...];
00487 } USB_WWID_DEVICE_PATH;
00488 
00489 ///
00490 /// Device Logical Unit SubType.
00491 ///
00492 #define MSG_DEVICE_LOGICAL_UNIT_DP  0x11
00493 typedef struct {
00494   EFI_DEVICE_PATH_PROTOCOL      Header;
00495   ///
00496   /// Logical Unit Number for the interface.
00497   ///
00498   UINT8                         Lun;
00499 } DEVICE_LOGICAL_UNIT_DEVICE_PATH;
00500 
00501 ///
00502 /// SATA Device Path SubType.
00503 ///
00504 #define MSG_SATA_DP               0x12
00505 typedef struct {
00506   EFI_DEVICE_PATH_PROTOCOL        Header;
00507   ///
00508   /// The HBA port number that facilitates the connection to the
00509   /// device or a port multiplier. The value 0xFFFF is reserved.
00510   ///
00511   UINT16                          HBAPortNumber;
00512   ///
00513   /// The Port multiplier port number that facilitates the connection
00514   /// to the device. Must be set to 0xFFFF if the device is directly
00515   /// connected to the HBA.
00516   ///
00517   UINT16                          PortMultiplierPortNumber;
00518   ///
00519   /// Logical Unit Number.
00520   ///
00521   UINT16                          Lun;
00522 } SATA_DEVICE_PATH;
00523 
00524 ///
00525 /// Flag for if the device is directly connected to the HBA.
00526 ///
00527 #define SATA_HBA_DIRECT_CONNECT_FLAG 0x8000
00528 
00529 ///
00530 /// I2O Device Path SubType.
00531 ///
00532 #define MSG_I2O_DP                0x06
00533 typedef struct {
00534   EFI_DEVICE_PATH_PROTOCOL        Header;
00535   ///
00536   /// Target ID (TID) for a device.
00537   ///
00538   UINT32                          Tid;
00539 } I2O_DEVICE_PATH;
00540 
00541 ///
00542 /// MAC Address Device Path SubType.
00543 ///
00544 #define MSG_MAC_ADDR_DP           0x0b
00545 typedef struct {
00546   EFI_DEVICE_PATH_PROTOCOL        Header;
00547   ///
00548   /// The MAC address for a network interface padded with 0s.
00549   ///
00550   EFI_MAC_ADDRESS                 MacAddress;
00551   ///
00552   /// Network interface type(i.e. 802.3, FDDI).
00553   ///
00554   UINT8                           IfType;
00555 } MAC_ADDR_DEVICE_PATH;
00556 
00557 ///
00558 /// IPv4 Device Path SubType
00559 ///
00560 #define MSG_IPv4_DP               0x0c
00561 typedef struct {
00562   EFI_DEVICE_PATH_PROTOCOL        Header;
00563   ///
00564   /// The local IPv4 address.
00565   ///
00566   EFI_IPv4_ADDRESS                LocalIpAddress;
00567   ///
00568   /// The remote IPv4 address.
00569   ///
00570   EFI_IPv4_ADDRESS                RemoteIpAddress;
00571   ///
00572   /// The local port number.
00573   ///
00574   UINT16                          LocalPort;
00575   ///
00576   /// The remote port number.
00577   ///
00578   UINT16                          RemotePort;
00579   ///
00580   /// The network protocol(i.e. UDP, TCP).
00581   ///
00582   UINT16                          Protocol;
00583   ///
00584   /// 0x00 - The Source IP Address was assigned though DHCP.
00585   /// 0x01 - The Source IP Address is statically bound.
00586   ///
00587   BOOLEAN                         StaticIpAddress;
00588   ///
00589   /// The gateway IP address
00590   ///
00591   EFI_IPv4_ADDRESS                GatewayIpAddress;
00592   ///
00593   /// The subnet mask
00594   ///
00595   EFI_IPv4_ADDRESS                SubnetMask;
00596 } IPv4_DEVICE_PATH;
00597 
00598 ///
00599 /// IPv6 Device Path SubType.
00600 ///
00601 #define MSG_IPv6_DP               0x0d
00602 typedef struct {
00603   EFI_DEVICE_PATH_PROTOCOL        Header;
00604   ///
00605   /// The local IPv6 address.
00606   ///
00607   EFI_IPv6_ADDRESS                LocalIpAddress;
00608   ///
00609   /// The remote IPv6 address.
00610   ///
00611   EFI_IPv6_ADDRESS                RemoteIpAddress;
00612   ///
00613   /// The local port number.
00614   ///
00615   UINT16                          LocalPort;
00616   ///
00617   /// The remote port number.
00618   ///
00619   UINT16                          RemotePort;
00620   ///
00621   /// The network protocol(i.e. UDP, TCP).
00622   ///
00623   UINT16                          Protocol;
00624   ///
00625   /// 0x00 - The Local IP Address was manually configured.
00626   /// 0x01 - The Local IP Address is assigned through IPv6
00627   /// stateless auto-configuration.
00628   /// 0x02 - The Local IP Address is assigned through IPv6
00629   /// stateful configuration.
00630   ///
00631   UINT8                           IpAddressOrigin;
00632   ///
00633   /// The prefix length
00634   ///
00635   UINT8                           PrefixLength;
00636   ///
00637   /// The gateway IP address
00638   ///
00639   EFI_IPv6_ADDRESS                GatewayIpAddress;
00640 } IPv6_DEVICE_PATH;
00641 
00642 ///
00643 /// InfiniBand Device Path SubType.
00644 ///
00645 #define MSG_INFINIBAND_DP         0x09
00646 typedef struct {
00647   EFI_DEVICE_PATH_PROTOCOL        Header;
00648   ///
00649   /// Flags to help identify/manage InfiniBand device path elements:
00650   /// Bit 0 - IOC/Service (0b = IOC, 1b = Service).
00651   /// Bit 1 - Extend Boot Environment.
00652   /// Bit 2 - Console Protocol.
00653   /// Bit 3 - Storage Protocol.
00654   /// Bit 4 - Network Protocol.
00655   /// All other bits are reserved.
00656   ///
00657   UINT32                          ResourceFlags;
00658   ///
00659   /// 128-bit Global Identifier for remote fabric port.
00660   ///
00661   UINT8                           PortGid[16];
00662   ///
00663   /// 64-bit unique identifier to remote IOC or server process.
00664   /// Interpretation of field specified by Resource Flags (bit 0).
00665   ///
00666   UINT64                          ServiceId;
00667   ///
00668   /// 64-bit persistent ID of remote IOC port.
00669   ///
00670   UINT64                          TargetPortId;
00671   ///
00672   /// 64-bit persistent ID of remote device.
00673   ///
00674   UINT64                          DeviceId;
00675 } INFINIBAND_DEVICE_PATH;
00676 
00677 #define INFINIBAND_RESOURCE_FLAG_IOC_SERVICE                0x01
00678 #define INFINIBAND_RESOURCE_FLAG_EXTENDED_BOOT_ENVIRONMENT  0x02
00679 #define INFINIBAND_RESOURCE_FLAG_CONSOLE_PROTOCOL           0x04
00680 #define INFINIBAND_RESOURCE_FLAG_STORAGE_PROTOCOL           0x08
00681 #define INFINIBAND_RESOURCE_FLAG_NETWORK_PROTOCOL           0x10
00682 
00683 ///
00684 /// UART Device Path SubType.
00685 ///
00686 #define MSG_UART_DP               0x0e
00687 typedef struct {
00688   EFI_DEVICE_PATH_PROTOCOL        Header;
00689   ///
00690   /// Reserved.
00691   ///
00692   UINT32                          Reserved;
00693   ///
00694   /// The baud rate setting for the UART style device. A value of 0
00695   /// means that the device's default baud rate will be used.
00696   ///
00697   UINT64                          BaudRate;
00698   ///
00699   /// The number of data bits for the UART style device. A value
00700   /// of 0 means that the device's default number of data bits will be used.
00701   ///
00702   UINT8                           DataBits;
00703   ///
00704   /// The parity setting for the UART style device.
00705   /// Parity 0x00 - Default Parity.
00706   /// Parity 0x01 - No Parity.
00707   /// Parity 0x02 - Even Parity.
00708   /// Parity 0x03 - Odd Parity.
00709   /// Parity 0x04 - Mark Parity.
00710   /// Parity 0x05 - Space Parity.
00711   ///
00712   UINT8                           Parity;
00713   ///
00714   /// The number of stop bits for the UART style device.
00715   /// Stop Bits 0x00 - Default Stop Bits.
00716   /// Stop Bits 0x01 - 1 Stop Bit.
00717   /// Stop Bits 0x02 - 1.5 Stop Bits.
00718   /// Stop Bits 0x03 - 2 Stop Bits.
00719   ///
00720   UINT8                           StopBits;
00721 } UART_DEVICE_PATH;
00722 
00723 //
00724 // Use VENDOR_DEVICE_PATH struct
00725 //
00726 #define MSG_VENDOR_DP             0x0a
00727 typedef VENDOR_DEVICE_PATH        VENDOR_DEFINED_DEVICE_PATH;
00728 
00729 #define DEVICE_PATH_MESSAGING_PC_ANSI     EFI_PC_ANSI_GUID
00730 #define DEVICE_PATH_MESSAGING_VT_100      EFI_VT_100_GUID
00731 #define DEVICE_PATH_MESSAGING_VT_100_PLUS EFI_VT_100_PLUS_GUID
00732 #define DEVICE_PATH_MESSAGING_VT_UTF8     EFI_VT_UTF8_GUID
00733 
00734 ///
00735 /// A new device path node is defined to declare flow control characteristics.
00736 /// UART Flow Control Messaging Device Path
00737 ///
00738 typedef struct {
00739   EFI_DEVICE_PATH_PROTOCOL        Header;
00740   ///
00741   /// DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL GUID.
00742   ///
00743   EFI_GUID                        Guid;
00744   ///
00745   /// Bitmap of supported flow control types.
00746   /// Bit 0 set indicates hardware flow control.
00747   /// Bit 1 set indicates Xon/Xoff flow control.
00748   /// All other bits are reserved and are clear.
00749   ///
00750   UINT32                          FlowControlMap;
00751 } UART_FLOW_CONTROL_DEVICE_PATH;
00752 
00753 #define UART_FLOW_CONTROL_HARDWARE         0x00000001
00754 #define UART_FLOW_CONTROL_XON_XOFF         0x00000010
00755 
00756 #define DEVICE_PATH_MESSAGING_SAS          EFI_SAS_DEVICE_PATH_GUID
00757 ///
00758 /// Serial Attached SCSI (SAS) Device Path.
00759 ///
00760 typedef struct {
00761   EFI_DEVICE_PATH_PROTOCOL        Header;
00762   ///
00763   /// DEVICE_PATH_MESSAGING_SAS GUID.
00764   ///
00765   EFI_GUID                        Guid;
00766   ///
00767   /// Reserved for future use.
00768   ///
00769   UINT32                          Reserved;
00770   ///
00771   /// SAS Address for Serial Attached SCSI Target.
00772   ///
00773   UINT64                          SasAddress;
00774   ///
00775   /// SAS Logical Unit Number.
00776   ///
00777   UINT64                          Lun;
00778   ///
00779   /// More Information about the device and its interconnect.
00780   ///
00781   UINT16                          DeviceTopology;
00782   ///
00783   /// Relative Target Port (RTP).
00784   ///
00785   UINT16                          RelativeTargetPort;
00786 } SAS_DEVICE_PATH;
00787 
00788 ///
00789 /// Serial Attached SCSI (SAS) Ex Device Path SubType
00790 ///
00791 #define MSG_SASEX_DP              0x16
00792 typedef struct {
00793   EFI_DEVICE_PATH_PROTOCOL        Header;
00794   ///
00795   /// 8-byte array of the SAS Address for Serial Attached SCSI Target Port.
00796   ///
00797   UINT8                           SasAddress[8];
00798   ///
00799   /// 8-byte array of the SAS Logical Unit Number.
00800   ///
00801   UINT8                           Lun[8];
00802   ///
00803   /// More Information about the device and its interconnect.
00804   ///
00805   UINT16                          DeviceTopology;
00806   ///
00807   /// Relative Target Port (RTP).
00808   ///
00809   UINT16                          RelativeTargetPort;
00810 } SASEX_DEVICE_PATH;
00811 
00812 ///
00813 /// NvmExpress Namespace Device Path SubType.
00814 ///
00815 #define MSG_NVME_NAMESPACE_DP     0x17
00816 typedef struct {
00817   EFI_DEVICE_PATH_PROTOCOL        Header;
00818   UINT32                          NamespaceId;
00819   UINT64                          NamespaceUuid;
00820 } NVME_NAMESPACE_DEVICE_PATH;
00821 
00822 ///
00823 /// Uniform Resource Identifiers (URI) Device Path SubType
00824 ///
00825 #define MSG_URI_DP                0x18
00826 typedef struct {
00827   EFI_DEVICE_PATH_PROTOCOL        Header;
00828   ///
00829   /// Instance of the URI pursuant to RFC 3986.
00830   ///
00831   CHAR8                           Uri[];
00832 } URI_DEVICE_PATH;
00833 
00834 ///
00835 /// Universal Flash Storage (UFS) Device Path SubType.
00836 ///
00837 #define MSG_UFS_DP                0x19
00838 typedef struct {
00839   EFI_DEVICE_PATH_PROTOCOL        Header;
00840   ///
00841   /// Target ID on the UFS bus (PUN).
00842   ///
00843   UINT8                           Pun;
00844   ///
00845   /// Logical Unit Number (LUN).
00846   ///
00847   UINT8                           Lun;
00848 } UFS_DEVICE_PATH;
00849 
00850 ///
00851 /// SD (Secure Digital) Device Path SubType.
00852 ///
00853 #define MSG_SD_DP                 0x1A
00854 typedef struct {
00855   EFI_DEVICE_PATH_PROTOCOL        Header;
00856   UINT8                           SlotNumber;
00857 } SD_DEVICE_PATH;
00858 
00859 ///
00860 /// EMMC (Embedded MMC) Device Path SubType.
00861 ///
00862 #define MSG_EMMC_DP                 0x1D
00863 typedef struct {
00864   EFI_DEVICE_PATH_PROTOCOL        Header;
00865   UINT8                           SlotNumber;
00866 } EMMC_DEVICE_PATH;
00867 
00868 ///
00869 /// iSCSI Device Path SubType
00870 ///
00871 #define MSG_ISCSI_DP              0x13
00872 typedef struct {
00873   EFI_DEVICE_PATH_PROTOCOL        Header;
00874   ///
00875   /// Network Protocol (0 = TCP, 1+ = reserved).
00876   ///
00877   UINT16                          NetworkProtocol;
00878   ///
00879   /// iSCSI Login Options.
00880   ///
00881   UINT16                          LoginOption;
00882   ///
00883   /// iSCSI Logical Unit Number.
00884   ///
00885   UINT64                          Lun;
00886   ///
00887   /// iSCSI Target Portal group tag the initiator intends
00888   /// to establish a session with.
00889   ///
00890   UINT16                          TargetPortalGroupTag;
00891   ///
00892   /// iSCSI NodeTarget Name. The length of the name
00893   /// is determined by subtracting the offset of this field from Length.
00894   ///
00895   /// CHAR8                        iSCSI Target Name.
00896 } ISCSI_DEVICE_PATH;
00897 
00898 #define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST             0x0000
00899 #define ISCSI_LOGIN_OPTION_HEADER_DIGEST_USING_CRC32C   0x0002
00900 #define ISCSI_LOGIN_OPTION_NO_DATA_DIGEST               0x0000
00901 #define ISCSI_LOGIN_OPTION_DATA_DIGEST_USING_CRC32C     0x0008
00902 #define ISCSI_LOGIN_OPTION_AUTHMETHOD_CHAP              0x0000
00903 #define ISCSI_LOGIN_OPTION_AUTHMETHOD_NON               0x1000
00904 #define ISCSI_LOGIN_OPTION_CHAP_BI                      0x0000
00905 #define ISCSI_LOGIN_OPTION_CHAP_UNI                     0x2000
00906 
00907 ///
00908 /// VLAN Device Path SubType.
00909 ///
00910 #define MSG_VLAN_DP               0x14
00911 typedef struct {
00912   EFI_DEVICE_PATH_PROTOCOL        Header;
00913   ///
00914   /// VLAN identifier (0-4094).
00915   ///
00916   UINT16                          VlanId;
00917 } VLAN_DEVICE_PATH;
00918 
00919 ///
00920 /// Bluetooth Device Path SubType.
00921 ///
00922 #define MSG_BLUETOOTH_DP     0x1b
00923 typedef struct {
00924   EFI_DEVICE_PATH_PROTOCOL        Header;
00925   ///
00926   /// 48bit Bluetooth device address.
00927   ///
00928   BLUETOOTH_ADDRESS               BD_ADDR;
00929 } BLUETOOTH_DEVICE_PATH;
00930 
00931 ///
00932 /// Wi-Fi Device Path SubType.
00933 ///
00934 #define MSG_WIFI_DP               0x1C
00935 typedef struct {
00936   EFI_DEVICE_PATH_PROTOCOL        Header;
00937   ///
00938   /// Service set identifier. A 32-byte octets string.
00939   ///
00940   UINT8                           SSId[32];
00941 } WIFI_DEVICE_PATH;
00942 
00943 //
00944 // Media Device Path
00945 //
00946 #define MEDIA_DEVICE_PATH         0x04
00947 
00948 ///
00949 /// Hard Drive Media Device Path SubType.
00950 ///
00951 #define MEDIA_HARDDRIVE_DP        0x01
00952 
00953 ///
00954 /// The Hard Drive Media Device Path is used to represent a partition on a hard drive.
00955 ///
00956 typedef struct {
00957   EFI_DEVICE_PATH_PROTOCOL        Header;
00958   ///
00959   /// Describes the entry in a partition table, starting with entry 1.
00960   /// Partition number zero represents the entire device. Valid
00961   /// partition numbers for a MBR partition are [1, 4]. Valid
00962   /// partition numbers for a GPT partition are [1, NumberOfPartitionEntries].
00963   ///
00964   UINT32                          PartitionNumber;
00965   ///
00966   /// Starting LBA of the partition on the hard drive.
00967   ///
00968   UINT64                          PartitionStart;
00969   ///
00970   /// Size of the partition in units of Logical Blocks.
00971   ///
00972   UINT64                          PartitionSize;
00973   ///
00974   /// Signature unique to this partition:
00975   /// If SignatureType is 0, this field has to be initialized with 16 zeros.
00976   /// If SignatureType is 1, the MBR signature is stored in the first 4 bytes of this field.
00977   /// The other 12 bytes are initialized with zeros.
00978   /// If SignatureType is 2, this field contains a 16 byte signature.
00979   ///
00980   UINT8                           Signature[16];
00981   ///
00982   /// Partition Format: (Unused values reserved).
00983   /// 0x01 - PC-AT compatible legacy MBR.
00984   /// 0x02 - GUID Partition Table.
00985   ///
00986   UINT8                           MBRType;
00987   ///
00988   /// Type of Disk Signature: (Unused values reserved).
00989   /// 0x00 - No Disk Signature.
00990   /// 0x01 - 32-bit signature from address 0x1b8 of the type 0x01 MBR.
00991   /// 0x02 - GUID signature.
00992   ///
00993   UINT8                           SignatureType;
00994 } HARDDRIVE_DEVICE_PATH;
00995 
00996 #define MBR_TYPE_PCAT             0x01
00997 #define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02
00998 
00999 #define NO_DISK_SIGNATURE         0x00
01000 #define SIGNATURE_TYPE_MBR        0x01
01001 #define SIGNATURE_TYPE_GUID       0x02
01002 
01003 ///
01004 /// CD-ROM Media Device Path SubType.
01005 ///
01006 #define MEDIA_CDROM_DP            0x02
01007 
01008 ///
01009 /// The CD-ROM Media Device Path is used to define a system partition that exists on a CD-ROM.
01010 ///
01011 typedef struct {
01012   EFI_DEVICE_PATH_PROTOCOL        Header;
01013   ///
01014   /// Boot Entry number from the Boot Catalog. The Initial/Default entry is defined as zero.
01015   ///
01016   UINT32                          BootEntry;
01017   ///
01018   /// Starting RBA of the partition on the medium. CD-ROMs use Relative logical Block Addressing.
01019   ///
01020   UINT64                          PartitionStart;
01021   ///
01022   /// Size of the partition in units of Blocks, also called Sectors.
01023   ///
01024   UINT64                          PartitionSize;
01025 } CDROM_DEVICE_PATH;
01026 
01027 //
01028 // Use VENDOR_DEVICE_PATH struct
01029 //
01030 #define MEDIA_VENDOR_DP           0x03  ///< Media vendor device path subtype.
01031 
01032 ///
01033 /// File Path Media Device Path SubType
01034 ///
01035 #define MEDIA_FILEPATH_DP         0x04
01036 typedef struct {
01037   EFI_DEVICE_PATH_PROTOCOL        Header;
01038   ///
01039   /// A NULL-terminated Path string including directory and file names.
01040   ///
01041   CHAR16                          PathName[1];
01042 } FILEPATH_DEVICE_PATH;
01043 
01044 #define SIZE_OF_FILEPATH_DEVICE_PATH  OFFSET_OF(FILEPATH_DEVICE_PATH,PathName)
01045 
01046 ///
01047 /// Media Protocol Device Path SubType.
01048 ///
01049 #define MEDIA_PROTOCOL_DP         0x05
01050 
01051 ///
01052 /// The Media Protocol Device Path is used to denote the protocol that is being
01053 /// used in a device path at the location of the path specified.
01054 /// Many protocols are inherent to the style of device path.
01055 ///
01056 typedef struct {
01057   EFI_DEVICE_PATH_PROTOCOL        Header;
01058   ///
01059   /// The ID of the protocol.
01060   ///
01061   EFI_GUID                        Protocol;
01062 } MEDIA_PROTOCOL_DEVICE_PATH;
01063 
01064 ///
01065 /// PIWG Firmware File SubType.
01066 ///
01067 #define MEDIA_PIWG_FW_FILE_DP     0x06
01068 
01069 ///
01070 /// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware file.
01071 ///
01072 typedef struct {
01073   EFI_DEVICE_PATH_PROTOCOL        Header;
01074   ///
01075   /// Firmware file name
01076   ///
01077   EFI_GUID                        FvFileName;
01078 } MEDIA_FW_VOL_FILEPATH_DEVICE_PATH;
01079 
01080 ///
01081 /// PIWG Firmware Volume Device Path SubType.
01082 ///
01083 #define MEDIA_PIWG_FW_VOL_DP      0x07
01084 
01085 ///
01086 /// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware volume.
01087 ///
01088 typedef struct {
01089   EFI_DEVICE_PATH_PROTOCOL        Header;
01090   ///
01091   /// Firmware volume name.
01092   ///
01093   EFI_GUID                        FvName;
01094 } MEDIA_FW_VOL_DEVICE_PATH;
01095 
01096 ///
01097 /// Media relative offset range device path.
01098 ///
01099 #define MEDIA_RELATIVE_OFFSET_RANGE_DP 0x08
01100 
01101 ///
01102 /// Used to describe the offset range of media relative.
01103 ///
01104 typedef struct {
01105   EFI_DEVICE_PATH_PROTOCOL  Header;
01106   UINT32                    Reserved;
01107   UINT64                    StartingOffset;
01108   UINT64                    EndingOffset;
01109 } MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH;
01110 
01111 ///
01112 /// This GUID defines a RAM Disk supporting a raw disk format in volatile memory.
01113 ///
01114 #define EFI_VIRTUAL_DISK_GUID               EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE
01115 
01116 extern  EFI_GUID                            gEfiVirtualDiskGuid;
01117 
01118 ///
01119 /// This GUID defines a RAM Disk supporting an ISO image in volatile memory.
01120 ///
01121 #define EFI_VIRTUAL_CD_GUID                 EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE
01122 
01123 extern  EFI_GUID                            gEfiVirtualCdGuid;
01124 
01125 ///
01126 /// This GUID defines a RAM Disk supporting a raw disk format in persistent memory.
01127 ///
01128 #define EFI_PERSISTENT_VIRTUAL_DISK_GUID    EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT
01129 
01130 extern  EFI_GUID                            gEfiPersistentVirtualDiskGuid;
01131 
01132 ///
01133 /// This GUID defines a RAM Disk supporting an ISO image in persistent memory.
01134 ///
01135 #define EFI_PERSISTENT_VIRTUAL_CD_GUID      EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT
01136 
01137 extern  EFI_GUID                            gEfiPersistentVirtualCdGuid;
01138 
01139 ///
01140 /// Media ram disk device path.
01141 ///
01142 #define MEDIA_RAM_DISK_DP         0x09
01143 
01144 ///
01145 /// Used to describe the ram disk device path.
01146 ///
01147 typedef struct {
01148   EFI_DEVICE_PATH_PROTOCOL        Header;
01149   ///
01150   /// Starting Memory Address.
01151   ///
01152   UINT32                          StartingAddr[2];
01153   ///
01154   /// Ending Memory Address.
01155   ///
01156   UINT32                          EndingAddr[2];
01157   ///
01158   /// GUID that defines the type of the RAM Disk.
01159   ///
01160   EFI_GUID                        TypeGuid;
01161   ///
01162   /// RAM Diskinstance number, if supported. The default value is zero.
01163   ///
01164   UINT16                          Instance;
01165 } MEDIA_RAM_DISK_DEVICE_PATH;
01166 
01167 ///
01168 /// BIOS Boot Specification Device Path.
01169 ///
01170 #define BBS_DEVICE_PATH           0x05
01171 
01172 ///
01173 /// BIOS Boot Specification Device Path SubType.
01174 ///
01175 #define BBS_BBS_DP                0x01
01176 
01177 ///
01178 /// This Device Path is used to describe the booting of non-EFI-aware operating systems.
01179 ///
01180 typedef struct {
01181   EFI_DEVICE_PATH_PROTOCOL        Header;
01182   ///
01183   /// Device Type as defined by the BIOS Boot Specification.
01184   ///
01185   UINT16                          DeviceType;
01186   ///
01187   /// Status Flags as defined by the BIOS Boot Specification.
01188   ///
01189   UINT16                          StatusFlag;
01190   ///
01191   /// Null-terminated ASCII string that describes the boot device to a user.
01192   ///
01193   CHAR8                           String[1];
01194 } BBS_BBS_DEVICE_PATH;
01195 
01196 //
01197 // DeviceType definitions - from BBS specification
01198 //
01199 #define BBS_TYPE_FLOPPY           0x01
01200 #define BBS_TYPE_HARDDRIVE        0x02
01201 #define BBS_TYPE_CDROM            0x03
01202 #define BBS_TYPE_PCMCIA           0x04
01203 #define BBS_TYPE_USB              0x05
01204 #define BBS_TYPE_EMBEDDED_NETWORK 0x06
01205 #define BBS_TYPE_BEV              0x80
01206 #define BBS_TYPE_UNKNOWN          0xFF
01207 
01208 
01209 ///
01210 /// Union of all possible Device Paths and pointers to Device Paths.
01211 ///
01212 typedef union {
01213   EFI_DEVICE_PATH_PROTOCOL                   DevPath;
01214   PCI_DEVICE_PATH                            Pci;
01215   PCCARD_DEVICE_PATH                         PcCard;
01216   MEMMAP_DEVICE_PATH                         MemMap;
01217   VENDOR_DEVICE_PATH                         Vendor;
01218 
01219   CONTROLLER_DEVICE_PATH                     Controller;
01220   BMC_DEVICE_PATH                            Bmc;
01221   ACPI_HID_DEVICE_PATH                       Acpi;
01222   ACPI_EXTENDED_HID_DEVICE_PATH              ExtendedAcpi;
01223   ACPI_ADR_DEVICE_PATH                       AcpiAdr;
01224 
01225   ATAPI_DEVICE_PATH                          Atapi;
01226   SCSI_DEVICE_PATH                           Scsi;
01227   ISCSI_DEVICE_PATH                          Iscsi;
01228   FIBRECHANNEL_DEVICE_PATH                   FibreChannel;
01229   FIBRECHANNELEX_DEVICE_PATH                 FibreChannelEx;
01230 
01231   F1394_DEVICE_PATH                          F1394;
01232   USB_DEVICE_PATH                            Usb;
01233   SATA_DEVICE_PATH                           Sata;
01234   USB_CLASS_DEVICE_PATH                      UsbClass;
01235   USB_WWID_DEVICE_PATH                       UsbWwid;
01236   DEVICE_LOGICAL_UNIT_DEVICE_PATH            LogicUnit;
01237   I2O_DEVICE_PATH                            I2O;
01238   MAC_ADDR_DEVICE_PATH                       MacAddr;
01239   IPv4_DEVICE_PATH                           Ipv4;
01240   IPv6_DEVICE_PATH                           Ipv6;
01241   VLAN_DEVICE_PATH                           Vlan;
01242   INFINIBAND_DEVICE_PATH                     InfiniBand;
01243   UART_DEVICE_PATH                           Uart;
01244   UART_FLOW_CONTROL_DEVICE_PATH              UartFlowControl;
01245   SAS_DEVICE_PATH                            Sas;
01246   SASEX_DEVICE_PATH                          SasEx;
01247   NVME_NAMESPACE_DEVICE_PATH                 NvmeNamespace;
01248   URI_DEVICE_PATH                            Uri;
01249   BLUETOOTH_DEVICE_PATH                      Bluetooth;
01250   WIFI_DEVICE_PATH                           WiFi;
01251   UFS_DEVICE_PATH                            Ufs;
01252   SD_DEVICE_PATH                             Sd;
01253   EMMC_DEVICE_PATH                           Emmc;
01254   HARDDRIVE_DEVICE_PATH                      HardDrive;
01255   CDROM_DEVICE_PATH                          CD;
01256 
01257   FILEPATH_DEVICE_PATH                       FilePath;
01258   MEDIA_PROTOCOL_DEVICE_PATH                 MediaProtocol;
01259 
01260   MEDIA_FW_VOL_DEVICE_PATH                   FirmwareVolume;
01261   MEDIA_FW_VOL_FILEPATH_DEVICE_PATH          FirmwareFile;
01262   MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH    Offset;
01263   MEDIA_RAM_DISK_DEVICE_PATH                 RamDisk;
01264   BBS_BBS_DEVICE_PATH                        Bbs;
01265 } EFI_DEV_PATH;
01266 
01267 
01268 
01269 typedef union {
01270   EFI_DEVICE_PATH_PROTOCOL                   *DevPath;
01271   PCI_DEVICE_PATH                            *Pci;
01272   PCCARD_DEVICE_PATH                         *PcCard;
01273   MEMMAP_DEVICE_PATH                         *MemMap;
01274   VENDOR_DEVICE_PATH                         *Vendor;
01275 
01276   CONTROLLER_DEVICE_PATH                     *Controller;
01277   BMC_DEVICE_PATH                            *Bmc;
01278   ACPI_HID_DEVICE_PATH                       *Acpi;
01279   ACPI_EXTENDED_HID_DEVICE_PATH              *ExtendedAcpi;
01280   ACPI_ADR_DEVICE_PATH                       *AcpiAdr;
01281 
01282   ATAPI_DEVICE_PATH                          *Atapi;
01283   SCSI_DEVICE_PATH                           *Scsi;
01284   ISCSI_DEVICE_PATH                          *Iscsi;
01285   FIBRECHANNEL_DEVICE_PATH                   *FibreChannel;
01286   FIBRECHANNELEX_DEVICE_PATH                 *FibreChannelEx;
01287 
01288   F1394_DEVICE_PATH                          *F1394;
01289   USB_DEVICE_PATH                            *Usb;
01290   SATA_DEVICE_PATH                           *Sata;
01291   USB_CLASS_DEVICE_PATH                      *UsbClass;
01292   USB_WWID_DEVICE_PATH                       *UsbWwid;
01293   DEVICE_LOGICAL_UNIT_DEVICE_PATH            *LogicUnit;
01294   I2O_DEVICE_PATH                            *I2O;
01295   MAC_ADDR_DEVICE_PATH                       *MacAddr;
01296   IPv4_DEVICE_PATH                           *Ipv4;
01297   IPv6_DEVICE_PATH                           *Ipv6;
01298   VLAN_DEVICE_PATH                           *Vlan;
01299   INFINIBAND_DEVICE_PATH                     *InfiniBand;
01300   UART_DEVICE_PATH                           *Uart;
01301   UART_FLOW_CONTROL_DEVICE_PATH              *UartFlowControl;
01302   SAS_DEVICE_PATH                            *Sas;
01303   SASEX_DEVICE_PATH                          *SasEx;
01304   NVME_NAMESPACE_DEVICE_PATH                 *NvmeNamespace;
01305   URI_DEVICE_PATH                            *Uri;
01306   BLUETOOTH_DEVICE_PATH                      *Bluetooth;
01307   WIFI_DEVICE_PATH                           *WiFi;
01308   UFS_DEVICE_PATH                            *Ufs;
01309   SD_DEVICE_PATH                             *Sd;
01310   EMMC_DEVICE_PATH                           *Emmc;
01311   HARDDRIVE_DEVICE_PATH                      *HardDrive;
01312   CDROM_DEVICE_PATH                          *CD;
01313 
01314   FILEPATH_DEVICE_PATH                       *FilePath;
01315   MEDIA_PROTOCOL_DEVICE_PATH                 *MediaProtocol;
01316 
01317   MEDIA_FW_VOL_DEVICE_PATH                   *FirmwareVolume;
01318   MEDIA_FW_VOL_FILEPATH_DEVICE_PATH          *FirmwareFile;
01319   MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH    *Offset;
01320   MEDIA_RAM_DISK_DEVICE_PATH                 *RamDisk;
01321   BBS_BBS_DEVICE_PATH                        *Bbs;
01322   UINT8                                      *Raw;
01323 } EFI_DEV_PATH_PTR;
01324 
01325 #pragma pack()
01326 
01327 #define END_DEVICE_PATH_TYPE                 0x7f
01328 #define END_ENTIRE_DEVICE_PATH_SUBTYPE       0xFF
01329 #define END_INSTANCE_DEVICE_PATH_SUBTYPE     0x01
01330 
01331 extern EFI_GUID gEfiDevicePathProtocolGuid;
01332 
01333 #endif