]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OptionRomPkg/AtapiPassThruDxe/AtapiPassThru.h
BaseTools/Capsule: Do not support -o with --dump-info
[mirror_edk2.git] / OptionRomPkg / AtapiPassThruDxe / AtapiPassThru.h
index 2187580bb6e59ea1d5c16aabcf2cb1ab2baf8c02..8ae654293b3eaeaa45242bd66f7768856461e18e 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
-  Copyright (c) 2006, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  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
   http://opensource.org/licenses/bsd-license.php\r
@@ -22,6 +22,7 @@
 #include <Protocol/ScsiPassThru.h>\r
 #include <Protocol/ScsiPassThruExt.h>\r
 #include <Protocol/PciIo.h>\r
+#include <Protocol/DriverSupportedEfiVersion.h>\r
 \r
 #include <Library/DebugLib.h>\r
 #include <Library/UefiDriverEntryPoint.h>\r
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/PcdLib.h>\r
-#include <IndustryStandard/pci22.h>\r
+#include <Library/DevicePathLib.h>\r
 \r
-///\r
-/// bit definition\r
-///\r
-#define bit(a)        (1 << (a))\r
+#include <IndustryStandard/Pci.h>\r
 \r
 #define MAX_TARGET_ID 4\r
 \r
@@ -96,7 +94,7 @@ typedef struct {
   UINT16                          DriveAddress;\r
 } IDE_BASE_REGISTERS;\r
 \r
-#define ATAPI_SCSI_PASS_THRU_DEV_SIGNATURE  EFI_SIGNATURE_32 ('a', 's', 'p', 't')\r
+#define ATAPI_SCSI_PASS_THRU_DEV_SIGNATURE  SIGNATURE_32 ('a', 's', 'p', 't')\r
 \r
 typedef struct {\r
   UINTN                            Signature;\r
@@ -139,9 +137,10 @@ typedef struct {
 //\r
 // Global Variables\r
 //\r
-extern EFI_DRIVER_BINDING_PROTOCOL   gAtapiScsiPassThruDriverBinding;\r
-extern EFI_COMPONENT_NAME_PROTOCOL   gAtapiScsiPassThruComponentName;\r
-extern EFI_COMPONENT_NAME2_PROTOCOL  gAtapiScsiPassThruComponentName2;\r
+extern EFI_DRIVER_BINDING_PROTOCOL                gAtapiScsiPassThruDriverBinding;\r
+extern EFI_COMPONENT_NAME_PROTOCOL                gAtapiScsiPassThruComponentName;\r
+extern EFI_COMPONENT_NAME2_PROTOCOL               gAtapiScsiPassThruComponentName2;\r
+extern EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL  gAtapiScsiPassThruDriverSupportedEfiVersion;\r
 \r
 //\r
 // ATAPI Command op code\r
@@ -207,31 +206,31 @@ typedef struct {
 //\r
 // ATA Err Reg bitmap\r
 //\r
-#define BBK_ERR   bit (7) ///< Bad block detected\r
-#define UNC_ERR   bit (6) ///< Uncorrectable Data\r
-#define MC_ERR    bit (5) ///< Media Change\r
-#define IDNF_ERR  bit (4) ///< ID Not Found\r
-#define MCR_ERR   bit (3) ///< Media Change Requested\r
-#define ABRT_ERR  bit (2) ///< Aborted Command\r
-#define TK0NF_ERR bit (1) ///< Track 0 Not Found\r
-#define AMNF_ERR  bit (0) ///< Address Mark Not Found\r
+#define BBK_ERR   BIT7 ///< Bad block detected\r
+#define UNC_ERR   BIT6 ///< Uncorrectable Data\r
+#define MC_ERR    BIT5 ///< Media Change\r
+#define IDNF_ERR  BIT4 ///< ID Not Found\r
+#define MCR_ERR   BIT3 ///< Media Change Requested\r
+#define ABRT_ERR  BIT2 ///< Aborted Command\r
+#define TK0NF_ERR BIT1 ///< Track 0 Not Found\r
+#define AMNF_ERR  BIT0 ///< Address Mark Not Found\r
 \r
 //\r
 // ATAPI Err Reg bitmap\r
 //\r
-#define SENSE_KEY_ERR (bit (7) | bit (6) | bit (5) | bit (4))\r
-#define EOM_ERR bit (1) ///< End of Media Detected\r
-#define ILI_ERR bit (0) ///< Illegal Length Indication\r
+#define SENSE_KEY_ERR (BIT7 | BIT6 | BIT5 | BIT4)\r
+#define EOM_ERR BIT1 ///< End of Media Detected\r
+#define ILI_ERR BIT0 ///< Illegal Length Indication\r
 \r
 //\r
 // Device/Head Reg\r
 //\r
-#define LBA_MODE  bit (6)\r
-#define DEV       bit (4)\r
-#define HS3       bit (3)\r
-#define HS2       bit (2)\r
-#define HS1       bit (1)\r
-#define HS0       bit (0)\r
+#define LBA_MODE  BIT6\r
+#define DEV       BIT4\r
+#define HS3       BIT3\r
+#define HS2       BIT2\r
+#define HS1       BIT1\r
+#define HS0       BIT0\r
 #define CHS_MODE  (0)\r
 #define DRV0      (0)\r
 #define DRV1      (1)\r
@@ -241,34 +240,34 @@ typedef struct {
 //\r
 // Status Reg\r
 //\r
-#define BSY   bit (7) ///< Controller Busy\r
-#define DRDY  bit (6) ///< Drive Ready\r
-#define DWF   bit (5) ///< Drive Write Fault\r
-#define DSC   bit (4) ///< Disk Seek Complete\r
-#define DRQ   bit (3) ///< Data Request\r
-#define CORR  bit (2) ///< Corrected Data\r
-#define IDX   bit (1) ///< Index\r
-#define ERR   bit (0) ///< Error\r
-#define CHECK bit (0) ///< Check bit for ATAPI Status Reg\r
+#define BSY   BIT7 ///< Controller Busy\r
+#define DRDY  BIT6 ///< Drive Ready\r
+#define DWF   BIT5 ///< Drive Write Fault\r
+#define DSC   BIT4 ///< Disk Seek Complete\r
+#define DRQ   BIT3 ///< Data Request\r
+#define CORR  BIT2 ///< Corrected Data\r
+#define IDX   BIT1 ///< Index\r
+#define ERR   BIT0 ///< Error\r
+#define CHECK BIT0 ///< Check bit for ATAPI Status Reg\r
 \r
 //\r
 // Device Control Reg\r
 //\r
-#define SRST  bit (2) ///< Software Reset\r
-#define IEN_L bit (1) ///< Interrupt Enable\r
+#define SRST  BIT2 ///< Software Reset\r
+#define IEN_L BIT1 ///< Interrupt Enable\r
 \r
 //\r
 // ATAPI Feature Register\r
 //\r
-#define OVERLAP bit (1)\r
-#define DMA     bit (0)\r
+#define OVERLAP BIT1\r
+#define DMA     BIT0\r
 \r
 //\r
 // ATAPI Interrupt Reason Reson Reg (ATA Sector Count Register)\r
 //\r
-#define RELEASE     bit (2)\r
-#define IO          bit (1)\r
-#define CoD         bit (0)\r
+#define RELEASE     BIT2\r
+#define IO          BIT1\r
+#define CoD         BIT0\r
 \r
 #define PACKET_CMD  0xA0\r
 \r
@@ -331,7 +330,7 @@ AtapiScsiPassThruDriverBindingStop (
                                 languages specified in SupportedLanguages. The\r
                                 number of languages supported by a driver is up\r
                                 to the driver writer. Language is specified\r
-                                in RFC 3066 or ISO 639-2 language code format.\r
+                                in RFC 4646 or ISO 639-2 language code format.\r
 \r
   @param  DriverName[out]       A pointer to the Unicode string to return.\r
                                 This Unicode string is the name of the\r
@@ -396,7 +395,7 @@ AtapiScsiPassThruComponentNameGetDriverName (
                                 languages specified in SupportedLanguages. The\r
                                 number of languages supported by a driver is up\r
                                 to the driver writer. Language is specified in\r
-                                RFC 3066 or ISO 639-2 language code format.\r
+                                RFC 4646 or ISO 639-2 language code format.\r
 \r
   @param  ControllerName[out]   A pointer to the Unicode string to return.\r
                                 This Unicode string is the name of the\r
@@ -410,7 +409,7 @@ AtapiScsiPassThruComponentNameGetDriverName (
                                 driver specified by This was returned in\r
                                 DriverName.\r
 \r
-  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
+  @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r
 \r
   @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
                                 EFI_HANDLE.\r
@@ -1120,11 +1119,11 @@ RequestSenseCommand (
 \r
 Routine Description:\r
 \r
-  Sumbit request sense command\r
+  Submit request sense command\r
 \r
 Arguments:\r
 \r
-  AtapiScsiPrivate  - The pionter of ATAPI_SCSI_PASS_THRU_DEV\r
+  AtapiScsiPrivate  - The pointer of ATAPI_SCSI_PASS_THRU_DEV\r
   Target            - The target ID\r
   Timeout           - The time to complete the command\r
   SenseData         - The buffer to fill in sense data\r