]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/DevicePath.h
typedef
[mirror_edk2.git] / MdePkg / Include / Protocol / DevicePath.h
index b5ce7378cfc0b936f9259b318fc32121987ea853..1968f48b8d5f4159f5bb5513dd6b9bb38969e6d0 100644 (file)
@@ -1,11 +1,11 @@
 /** @file\r
   The device path protocol as defined in UEFI 2.0.\r
 \r
-  The device path represents a programatic path to a device. It's the view\r
-  from a software point of view. It also must persist from boot to boot, so \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
   it can not contain things like PCI bus numbers that change from boot to boot.\r
 \r
-  Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
+  Copyright (c) 2006 - 2009, Intel Corporation                                                         \r
   All rights reserved. This program and the accompanying materials                          \r
   are licensed and made available under the terms and conditions of the BSD License         \r
   which accompanies this distribution.  The full text of the license may be found at        \r
@@ -477,6 +477,11 @@ typedef struct {
   UINT16                          Lun;\r
 } SATA_DEVICE_PATH;\r
 \r
+///\r
+/// Flag for if the device is directly connected to the HBA.\r
+///\r
+#define SATA_HBA_DIRECT_CONNECT_FLAG 0x8000\r
+\r
 ///\r
 /// I2O Device Path SubType\r
 ///\r
@@ -663,8 +668,6 @@ typedef VENDOR_DEVICE_PATH        VENDOR_DEFINED_DEVICE_PATH;
 #define DEVICE_PATH_MESSAGING_VT_100_PLUS EFI_VT_100_PLUS_GUID\r
 #define DEVICE_PATH_MESSAGING_VT_UTF8     EFI_VT_UTF8_GUID\r
 \r
-#define DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL   EFI_UART_DEVICE_PATH_GUID\r
-\r
 ///\r
 /// A new device path node is defined to declare flow control characteristics.\r
 /// UART Flow Control Messaging Device Path\r
@@ -755,6 +758,18 @@ typedef struct {
 #define ISCSI_LOGIN_OPTION_CHAP_BI                      0x0000\r
 #define ISCSI_LOGIN_OPTION_CHAP_UNI                     0x2000\r
 \r
+///\r
+/// VLAN Device Path SubType\r
+///\r
+#define MSG_VLAN_DP               0x14\r
+typedef struct {\r
+  EFI_DEVICE_PATH_PROTOCOL        Header;\r
+  ///\r
+  /// VLAN identifier (0-4094)\r
+  ///\r
+  UINT16                          VlanId;\r
+} VLAN_DEVICE_PATH;\r
+\r
 //\r
 // Media Device Path\r
 //\r
@@ -774,8 +789,7 @@ typedef struct {
   /// Describes the entry in a partition table, starting with entry 1.\r
   /// Partition number zero represents the entire device. Valid\r
   /// partition numbers for a MBR partition are [1, 4]. Valid\r
-  /// partition numbers for a GPT partition are [1,\r
-  /// NumberOfPartitionEntries].\r
+  /// partition numbers for a GPT partition are [1, NumberOfPartitionEntries].\r
   ///\r
   UINT32                          PartitionNumber;\r
   ///\r
@@ -787,7 +801,11 @@ typedef struct {
   ///\r
   UINT64                          PartitionSize;\r
   ///\r
-  /// Signature unique to this partition\r
+  /// Signature unique to this partition:\r
+  /// If SignatureType is 0, this field has to be initialized with 16 zeros.\r
+  /// If SignatureType is 1, the MBR signature is stored in the first 4 bytes of this field.\r
+  /// The other 12 bytes are initialized with zeros.\r
+  /// If SignatureType is 2, this field contains a 16 byte signature.\r
   ///\r
   UINT8                           Signature[16];\r
   ///\r
@@ -839,7 +857,7 @@ typedef struct {
 //\r
 // Use VENDOR_DEVICE_PATH struct\r
 //\r
-#define MEDIA_VENDOR_DP           0x03  /// Media vendor device path subtype\r
+#define MEDIA_VENDOR_DP           0x03  ///< Media vendor device path subtype\r
 \r
 ///\r
 /// File Path Media Device Path SubType\r
@@ -848,12 +866,12 @@ typedef struct {
 typedef struct {\r
   EFI_DEVICE_PATH_PROTOCOL        Header;\r
   ///\r
-  /// A NULL-terminated Unicode Path string including directory and file names.\r
+  /// A NULL-terminated Path string including directory and file names.\r
   ///\r
   CHAR16                          PathName[1];\r
 } FILEPATH_DEVICE_PATH;\r
 \r
-#define SIZE_OF_FILEPATH_DEVICE_PATH  EFI_FIELD_OFFSET(FILEPATH_DEVICE_PATH,PathName)\r
+#define SIZE_OF_FILEPATH_DEVICE_PATH  OFFSET_OF(FILEPATH_DEVICE_PATH,PathName)\r
 \r
 ///\r
 /// Media Protocol Device Path SubType\r
@@ -876,34 +894,49 @@ typedef struct {
 ///\r
 /// PIWG Firmware Volume Device Path SubType\r
 ///\r
-#define MEDIA_PIWG_FW_VOL_DP      0x7\r
+#define MEDIA_PIWG_FW_FILE_DP     0x06\r
 \r
 ///\r
-/// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware volume.\r
+/// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware file.\r
 ///\r
 typedef struct {\r
   EFI_DEVICE_PATH_PROTOCOL        Header;\r
   ///\r
-  /// Firmware volume name.\r
+  /// Firmware file name\r
   ///\r
-  EFI_GUID                        FvName;\r
-} MEDIA_FW_VOL_DEVICE_PATH;\r
+  EFI_GUID                        FvFileName;\r
+} MEDIA_FW_VOL_FILEPATH_DEVICE_PATH;\r
 \r
 ///\r
 /// PIWG Firmware Volume Device Path SubType\r
 ///\r
-#define MEDIA_PIWG_FW_FILE_DP     0x6\r
+#define MEDIA_PIWG_FW_VOL_DP      0x07\r
 \r
 ///\r
-/// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware file.\r
+/// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware volume.\r
 ///\r
 typedef struct {\r
   EFI_DEVICE_PATH_PROTOCOL        Header;\r
   ///\r
-  /// Firmware file name\r
+  /// Firmware volume name.\r
   ///\r
-  EFI_GUID                        FvFileName;\r
-} MEDIA_FW_VOL_FILEPATH_DEVICE_PATH;\r
+  EFI_GUID                        FvName;\r
+} MEDIA_FW_VOL_DEVICE_PATH;\r
+\r
+///\r
+/// Media relative offset range device path\r
+///\r
+#define MEDIA_RELATIVE_OFFSET_RANGE_DP 0x08\r
+\r
+///\r
+/// Used to describe the offset range of media relative.\r
+///\r
+typedef struct {\r
+  EFI_DEVICE_PATH_PROTOCOL  Header;\r
+  UINT32                    Reserved;\r
+  UINT64                    StartingOffset;\r
+  UINT64                    EndingOffset;\r
+} MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH;\r
 \r
 ///\r
 /// BIOS Boot Specification Device Path\r
@@ -981,6 +1014,7 @@ typedef union {
 \r
   FILEPATH_DEVICE_PATH                 FilePath;\r
   MEDIA_PROTOCOL_DEVICE_PATH           MediaProtocol;\r
+  MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH Offset;\r
 \r
   BBS_BBS_DEVICE_PATH                  Bbs;\r
 } EFI_DEV_PATH;\r
@@ -1018,6 +1052,7 @@ typedef union {
 \r
   FILEPATH_DEVICE_PATH                 *FilePath;\r
   MEDIA_PROTOCOL_DEVICE_PATH           *MediaProtocol;\r
+  MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *Offset;\r
 \r
   BBS_BBS_DEVICE_PATH                  *Bbs;\r
   UINT8                                *Raw;\r