]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/DevicePath.h
Use doxygen comment style for document entity such as struct, enum, variable that...
[mirror_edk2.git] / MdePkg / Include / Protocol / DevicePath.h
index 524a3912d2a2bd928cd23da653c990b9b8acdd0d..48c8f4b77bb05c42ca245c393f6b418e2ff015ea 100644 (file)
@@ -1,11 +1,11 @@
 /** @file\r
-  The device path protocol as defined in EFI 1.0.\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
   it can not contain things like PCI bus numbers that change from boot to boot.\r
 \r
-  Copyright (c) 2006, Intel Corporation                                                         \r
+  Copyright (c) 2006 - 2008, 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
@@ -21,9 +21,9 @@
 \r
 #include <Guid/PcAnsi.h>\r
 \r
-//\r
-// Device Path protocol\r
-//\r
+///\r
+/// Device Path protocol\r
+///\r
 #define EFI_DEVICE_PATH_PROTOCOL_GUID \\r
   { \\r
     0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \\r
@@ -33,9 +33,9 @@
 // Protocol GUID defined in EFI1.1.\r
 // \r
 \r
-//\r
-// Device Path information\r
-//\r
+///\r
+/// Device Path information\r
+///\r
 #define DEVICE_PATH_PROTOCOL  EFI_DEVICE_PATH_PROTOCOL_GUID\r
 \r
 #pragma pack(1)\r
@@ -46,14 +46,14 @@ typedef struct {
   UINT8 Length[2];\r
 } EFI_DEVICE_PATH_PROTOCOL;\r
 \r
-//\r
-// For backward-compatible with EFI1.1.\r
-// \r
+///\r
+/// For backward-compatible with EFI1.1.\r
+/// \r
 typedef EFI_DEVICE_PATH_PROTOCOL  EFI_DEVICE_PATH;\r
 \r
-//\r
-// Hardware Device Paths\r
-//\r
+///\r
+/// Hardware Device Paths\r
+///\r
 #define HARDWARE_DEVICE_PATH      0x01\r
 \r
 #define HW_PCI_DP                 0x01\r
@@ -89,9 +89,9 @@ typedef struct {
   UINT32                          ControllerNumber;\r
 } CONTROLLER_DEVICE_PATH;\r
 \r
-//\r
-// ACPI Device Paths\r
-//\r
+///\r
+/// ACPI Device Paths\r
+///\r
 #define ACPI_DEVICE_PATH          0x02\r
 \r
 #define ACPI_DP                   0x01\r
@@ -107,10 +107,10 @@ typedef struct {
   UINT32                          HID;\r
   UINT32                          UID;\r
   UINT32                          CID;\r
-  //\r
-  // Optional variable length _HIDSTR\r
-  // Optional variable length _UIDSTR\r
-  //\r
+  ///\r
+  /// Optional variable length _HIDSTR\r
+  /// Optional variable length _UIDSTR\r
+  ///\r
 } ACPI_EXTENDED_HID_DEVICE_PATH;\r
 \r
 //\r
@@ -121,7 +121,7 @@ typedef struct {
 //    Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'\r
 //\r
 #define PNP_EISA_ID_CONST         0x41d0\r
-#define EISA_ID(_Name, _Num)      ((UINT32) ((_Name) | (_Num) << 16))\r
+#define EISA_ID(_Name, _Num)      ((UINT32)((_Name) | (_Num) << 16))\r
 #define EISA_PNP_ID(_PNPId)       (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))\r
 #define EFI_PNP_ID(_PNPId)        (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))\r
 \r
@@ -135,10 +135,25 @@ typedef struct {
   UINT32                          ADR;\r
 } ACPI_ADR_DEVICE_PATH;\r
 \r
-\r
-//\r
-// Messaging Device Paths\r
-//\r
+#define ACPI_ADR_DISPLAY_TYPE_OTHER             0\r
+#define ACPI_ADR_DISPLAY_TYPE_VGA               1\r
+#define ACPI_ADR_DISPLAY_TYPE_TV                2\r
+#define ACPI_ADR_DISPLAY_TYPE_EXTERNAL_DIGITAL  3\r
+#define ACPI_ADR_DISPLAY_TYPE_INTERNAL_DIGITAL  4\r
+\r
+#define ACPI_DISPLAY_ADR(_DeviceIdScheme, _HeadId, _NonVgaOutput, _BiosCanDetect, _VendorInfo, _Type, _Port, _Index) \\r
+          ((UINT32)( (((_DeviceIdScheme) & 0x1) << 31) |  \\r
+                      (((_HeadId)         & 0x7) << 18) |  \\r
+                      (((_NonVgaOutput)   & 0x1) << 17) |  \\r
+                      (((_BiosCanDetect)  & 0x1) << 16) |  \\r
+                      (((_VendorInfo)     & 0xf) << 12) |  \\r
+                      (((_Type)           & 0xf) << 8)  |  \\r
+                      (((_Port)           & 0xf) << 4)  |  \\r
+                       ((_Index)          & 0xf) ))\r
+\r
+///\r
+/// Messaging Device Paths\r
+///\r
 #define MESSAGING_DEVICE_PATH     0x03\r
 \r
 #define MSG_ATAPI_DP              0x01\r
@@ -207,9 +222,9 @@ typedef struct {
 #define MSG_SATA_DP               0x12\r
 typedef struct {\r
   EFI_DEVICE_PATH_PROTOCOL        Header;\r
-  UINT16                          HbaPortNumber;\r
-  UINT16                          PortMultiplierPort;\r
-  UINT16                          LogicalUnitNumber;\r
+  UINT16                          HBAPortNumber;\r
+  UINT16                          PortMultiplierPortNumber;\r
+  UINT16                          Lun;\r
 } SATA_DEVICE_PATH;\r
 \r
 #define MSG_I2O_DP                0x06\r
@@ -373,14 +388,14 @@ typedef struct {
 } MEDIA_PROTOCOL_DEVICE_PATH;\r
 \r
 \r
-#define MEDIA_PIWG_FW_VOL_DP      0x6\r
+#define MEDIA_PIWG_FW_VOL_DP      0x7\r
 typedef struct {\r
   EFI_DEVICE_PATH_PROTOCOL        Header;\r
   EFI_GUID                        FvName;\r
 } MEDIA_FW_VOL_DEVICE_PATH;\r
 \r
 \r
-#define MEDIA_PIWG_FW_FILE_DP     0x7\r
+#define MEDIA_PIWG_FW_FILE_DP     0x6\r
 typedef struct {\r
   EFI_DEVICE_PATH_PROTOCOL        Header;\r
   EFI_GUID                        FvFileName;\r
@@ -411,9 +426,9 @@ typedef struct {
 #define BBS_TYPE_UNKNOWN          0xFF\r
 \r
 \r
-//\r
-// Union of all possible Device Paths and pointers to Device Paths\r
-//\r
+///\r
+/// Union of all possible Device Paths and pointers to Device Paths\r
+///\r
 \r
 typedef union {\r
   EFI_DEVICE_PATH_PROTOCOL             DevPath;\r
@@ -427,6 +442,7 @@ typedef union {
 \r
   ATAPI_DEVICE_PATH                    Atapi;\r
   SCSI_DEVICE_PATH                     Scsi;\r
+  ISCSI_DEVICE_PATH                    Iscsi;\r
   FIBRECHANNEL_DEVICE_PATH             FibreChannel;\r
 \r
   F1394_DEVICE_PATH                    F1394;\r