]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/DevicePath.h
MdePkg: Clean up source files
[mirror_edk2.git] / MdePkg / Include / Protocol / DevicePath.h
index 4d2f340035d282f31aa02bfc018d783b0b965cc5..4588f271663695b23f65841f09bea40f372123ae 100644 (file)
@@ -2,17 +2,17 @@
   The device path protocol as defined in UEFI 2.0.\r
 \r
   The device path represents a programmatic path to a device,\r
-  from a software point of view. The path must persist from boot to boot, so \r
+  from a software point of view. The path must persist from boot to boot, so\r
   it can not contain things like PCI bus numbers that change from boot to boot.\r
 \r
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under\r
+the terms and conditions of the BSD License that accompanies this distribution.\r
 The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                          \r
-    \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.              \r
+http://opensource.org/licenses/bsd-license.php.\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -21,6 +21,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include <Guid/PcAnsi.h>\r
 #include <IndustryStandard/Bluetooth.h>\r
+#include <IndustryStandard/Acpi60.h>\r
+\r
 ///\r
 /// Device Path protocol.\r
 ///\r
@@ -37,11 +39,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #pragma pack(1)\r
 \r
 /**\r
-  This protocol can be used on any device handle to obtain generic path/location \r
-  information concerning the physical device or logical device. If the handle does \r
-  not logically map to a physical device, the handle may not necessarily support \r
-  the device path protocol. The device path describes the location of the device \r
-  the handle is for. The size of the Device Path can be determined from the structures \r
+  This protocol can be used on any device handle to obtain generic path/location\r
+  information concerning the physical device or logical device. If the handle does\r
+  not logically map to a physical device, the handle may not necessarily support\r
+  the device path protocol. The device path describes the location of the device\r
+  the handle is for. The size of the Device Path can be determined from the structures\r
   that make up the Device Path.\r
 **/\r
 typedef struct {\r
@@ -51,20 +53,20 @@ typedef struct {
                     ///< 0x04 Media Device Path.\r
                     ///< 0x05 BIOS Boot Specification Device Path.\r
                     ///< 0x7F End of Hardware Device Path.\r
-                    \r
+\r
   UINT8 SubType;    ///< Varies by Type\r
                     ///< 0xFF End Entire Device Path, or\r
                     ///< 0x01 End This Instance of a Device Path and start a new\r
                     ///< Device Path.\r
-                    \r
+\r
   UINT8 Length[2];  ///< Specific Device Path data. Type and Sub-Type define\r
                     ///< type of data. Size of data is included in Length.\r
-                    \r
+\r
 } EFI_DEVICE_PATH_PROTOCOL;\r
 \r
 ///\r
 /// Device Path protocol definition for backward-compatible with EFI1.1.\r
-/// \r
+///\r
 typedef EFI_DEVICE_PATH_PROTOCOL  EFI_DEVICE_PATH;\r
 \r
 ///\r
@@ -169,6 +171,26 @@ typedef struct {
   UINT32                          ControllerNumber;\r
 } CONTROLLER_DEVICE_PATH;\r
 \r
+///\r
+/// BMC Device Path SubType.\r
+///\r
+#define HW_BMC_DP                 0x06\r
+\r
+///\r
+/// BMC Device Path.\r
+///\r
+typedef struct {\r
+  EFI_DEVICE_PATH_PROTOCOL        Header;\r
+  ///\r
+  /// Interface Type.\r
+  ///\r
+  UINT8                           InterfaceType;\r
+  ///\r
+  /// Base Address.\r
+  ///\r
+  UINT8                           BaseAddress[8];\r
+} BMC_DEVICE_PATH;\r
+\r
 ///\r
 /// ACPI Device Paths.\r
 ///\r
@@ -487,7 +509,7 @@ typedef struct {
   UINT16                          HBAPortNumber;\r
   ///\r
   /// The Port multiplier port number that facilitates the connection\r
-  /// to the device. Bit 15 should be set if the device is directly\r
+  /// to the device. Must be set to 0xFFFF if the device is directly\r
   /// connected to the HBA.\r
   ///\r
   UINT16                          PortMultiplierPortNumber;\r
@@ -795,6 +817,34 @@ typedef struct {
   UINT64                          NamespaceUuid;\r
 } NVME_NAMESPACE_DEVICE_PATH;\r
 \r
+///\r
+/// DNS Device Path SubType\r
+///\r
+#define MSG_DNS_DP                0x1F\r
+typedef struct {\r
+  EFI_DEVICE_PATH_PROTOCOL        Header;\r
+  ///\r
+  /// Indicates the DNS server address is IPv4 or IPv6 address.\r
+  ///\r
+  UINT8                           IsIPv6;\r
+  ///\r
+  /// Instance of the DNS server address.\r
+  ///\r
+  EFI_IP_ADDRESS                  DnsServerIp[];\r
+} DNS_DEVICE_PATH;\r
+\r
+///\r
+/// Uniform Resource Identifiers (URI) Device Path SubType\r
+///\r
+#define MSG_URI_DP                0x18\r
+typedef struct {\r
+  EFI_DEVICE_PATH_PROTOCOL        Header;\r
+  ///\r
+  /// Instance of the URI pursuant to RFC 3986.\r
+  ///\r
+  CHAR8                           Uri[];\r
+} URI_DEVICE_PATH;\r
+\r
 ///\r
 /// Universal Flash Storage (UFS) Device Path SubType.\r
 ///\r
@@ -811,6 +861,24 @@ typedef struct {
   UINT8                           Lun;\r
 } UFS_DEVICE_PATH;\r
 \r
+///\r
+/// SD (Secure Digital) Device Path SubType.\r
+///\r
+#define MSG_SD_DP                 0x1A\r
+typedef struct {\r
+  EFI_DEVICE_PATH_PROTOCOL        Header;\r
+  UINT8                           SlotNumber;\r
+} SD_DEVICE_PATH;\r
+\r
+///\r
+/// EMMC (Embedded MMC) Device Path SubType.\r
+///\r
+#define MSG_EMMC_DP                 0x1D\r
+typedef struct {\r
+  EFI_DEVICE_PATH_PROTOCOL        Header;\r
+  UINT8                           SlotNumber;\r
+} EMMC_DEVICE_PATH;\r
+\r
 ///\r
 /// iSCSI Device Path SubType\r
 ///\r
@@ -874,6 +942,27 @@ typedef struct {
   BLUETOOTH_ADDRESS               BD_ADDR;\r
 } BLUETOOTH_DEVICE_PATH;\r
 \r
+///\r
+/// Wi-Fi Device Path SubType.\r
+///\r
+#define MSG_WIFI_DP               0x1C\r
+typedef struct {\r
+  EFI_DEVICE_PATH_PROTOCOL        Header;\r
+  ///\r
+  /// Service set identifier. A 32-byte octets string.\r
+  ///\r
+  UINT8                           SSId[32];\r
+} WIFI_DEVICE_PATH;\r
+\r
+///\r
+/// Bluetooth LE Device Path SubType.\r
+///\r
+#define MSG_BLUETOOTH_LE_DP       0x1E\r
+typedef struct {\r
+  EFI_DEVICE_PATH_PROTOCOL        Header;\r
+  BLUETOOTH_LE_ADDRESS            Address;\r
+} BLUETOOTH_LE_DEVICE_PATH;\r
+\r
 //\r
 // Media Device Path\r
 //\r
@@ -983,8 +1072,8 @@ typedef struct {
 #define MEDIA_PROTOCOL_DP         0x05\r
 \r
 ///\r
-/// The Media Protocol Device Path is used to denote the protocol that is being \r
-/// used in a device path at the location of the path specified. \r
+/// The Media Protocol Device Path is used to denote the protocol that is being\r
+/// used in a device path at the location of the path specified.\r
 /// Many protocols are inherent to the style of device path.\r
 ///\r
 typedef struct {\r
@@ -1042,6 +1131,62 @@ typedef struct {
   UINT64                    EndingOffset;\r
 } MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH;\r
 \r
+///\r
+/// This GUID defines a RAM Disk supporting a raw disk format in volatile memory.\r
+///\r
+#define EFI_VIRTUAL_DISK_GUID               EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE\r
+\r
+extern  EFI_GUID                            gEfiVirtualDiskGuid;\r
+\r
+///\r
+/// This GUID defines a RAM Disk supporting an ISO image in volatile memory.\r
+///\r
+#define EFI_VIRTUAL_CD_GUID                 EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE\r
+\r
+extern  EFI_GUID                            gEfiVirtualCdGuid;\r
+\r
+///\r
+/// This GUID defines a RAM Disk supporting a raw disk format in persistent memory.\r
+///\r
+#define EFI_PERSISTENT_VIRTUAL_DISK_GUID    EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT\r
+\r
+extern  EFI_GUID                            gEfiPersistentVirtualDiskGuid;\r
+\r
+///\r
+/// This GUID defines a RAM Disk supporting an ISO image in persistent memory.\r
+///\r
+#define EFI_PERSISTENT_VIRTUAL_CD_GUID      EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT\r
+\r
+extern  EFI_GUID                            gEfiPersistentVirtualCdGuid;\r
+\r
+///\r
+/// Media ram disk device path.\r
+///\r
+#define MEDIA_RAM_DISK_DP         0x09\r
+\r
+///\r
+/// Used to describe the ram disk device path.\r
+///\r
+typedef struct {\r
+  EFI_DEVICE_PATH_PROTOCOL        Header;\r
+  ///\r
+  /// Starting Memory Address.\r
+  ///\r
+  UINT32                          StartingAddr[2];\r
+  ///\r
+  /// Ending Memory Address.\r
+  ///\r
+  UINT32                          EndingAddr[2];\r
+  ///\r
+  /// GUID that defines the type of the RAM Disk.\r
+  ///\r
+  EFI_GUID                        TypeGuid;\r
+  ///\r
+  /// RAM Diskinstance number, if supported. The default value is zero.\r
+  ///\r
+  UINT16                          Instance;\r
+} MEDIA_RAM_DISK_DEVICE_PATH;\r
+\r
 ///\r
 /// BIOS Boot Specification Device Path.\r
 ///\r
@@ -1095,6 +1240,7 @@ typedef union {
   VENDOR_DEVICE_PATH                         Vendor;\r
 \r
   CONTROLLER_DEVICE_PATH                     Controller;\r
+  BMC_DEVICE_PATH                            Bmc;\r
   ACPI_HID_DEVICE_PATH                       Acpi;\r
   ACPI_EXTENDED_HID_DEVICE_PATH              ExtendedAcpi;\r
   ACPI_ADR_DEVICE_PATH                       AcpiAdr;\r
@@ -1122,8 +1268,13 @@ typedef union {
   SAS_DEVICE_PATH                            Sas;\r
   SASEX_DEVICE_PATH                          SasEx;\r
   NVME_NAMESPACE_DEVICE_PATH                 NvmeNamespace;\r
+  DNS_DEVICE_PATH                            Dns;\r
+  URI_DEVICE_PATH                            Uri;\r
   BLUETOOTH_DEVICE_PATH                      Bluetooth;\r
+  WIFI_DEVICE_PATH                           WiFi;\r
   UFS_DEVICE_PATH                            Ufs;\r
+  SD_DEVICE_PATH                             Sd;\r
+  EMMC_DEVICE_PATH                           Emmc;\r
   HARDDRIVE_DEVICE_PATH                      HardDrive;\r
   CDROM_DEVICE_PATH                          CD;\r
 \r
@@ -1133,7 +1284,7 @@ typedef union {
   MEDIA_FW_VOL_DEVICE_PATH                   FirmwareVolume;\r
   MEDIA_FW_VOL_FILEPATH_DEVICE_PATH          FirmwareFile;\r
   MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH    Offset;\r
-\r
+  MEDIA_RAM_DISK_DEVICE_PATH                 RamDisk;\r
   BBS_BBS_DEVICE_PATH                        Bbs;\r
 } EFI_DEV_PATH;\r
 \r
@@ -1147,6 +1298,7 @@ typedef union {
   VENDOR_DEVICE_PATH                         *Vendor;\r
 \r
   CONTROLLER_DEVICE_PATH                     *Controller;\r
+  BMC_DEVICE_PATH                            *Bmc;\r
   ACPI_HID_DEVICE_PATH                       *Acpi;\r
   ACPI_EXTENDED_HID_DEVICE_PATH              *ExtendedAcpi;\r
   ACPI_ADR_DEVICE_PATH                       *AcpiAdr;\r
@@ -1174,8 +1326,13 @@ typedef union {
   SAS_DEVICE_PATH                            *Sas;\r
   SASEX_DEVICE_PATH                          *SasEx;\r
   NVME_NAMESPACE_DEVICE_PATH                 *NvmeNamespace;\r
+  DNS_DEVICE_PATH                            *Dns;\r
+  URI_DEVICE_PATH                            *Uri;\r
   BLUETOOTH_DEVICE_PATH                      *Bluetooth;\r
+  WIFI_DEVICE_PATH                           *WiFi;\r
   UFS_DEVICE_PATH                            *Ufs;\r
+  SD_DEVICE_PATH                             *Sd;\r
+  EMMC_DEVICE_PATH                           *Emmc;\r
   HARDDRIVE_DEVICE_PATH                      *HardDrive;\r
   CDROM_DEVICE_PATH                          *CD;\r
 \r
@@ -1185,13 +1342,13 @@ typedef union {
   MEDIA_FW_VOL_DEVICE_PATH                   *FirmwareVolume;\r
   MEDIA_FW_VOL_FILEPATH_DEVICE_PATH          *FirmwareFile;\r
   MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH    *Offset;\r
-\r
+  MEDIA_RAM_DISK_DEVICE_PATH                 *RamDisk;\r
   BBS_BBS_DEVICE_PATH                        *Bbs;\r
   UINT8                                      *Raw;\r
 } EFI_DEV_PATH_PTR;\r
 \r
 #pragma pack()\r
-                                             \r
+\r
 #define END_DEVICE_PATH_TYPE                 0x7f\r
 #define END_ENTIRE_DEVICE_PATH_SUBTYPE       0xFF\r
 #define END_INSTANCE_DEVICE_PATH_SUBTYPE     0x01\r