]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.h
MdeModulePkg/AtaAtapiPassThru: Revert patch to disable Bus Master
[mirror_edk2.git] / MdeModulePkg / Bus / Ata / AtaAtapiPassThru / AtaAtapiPassThru.h
index 0d93e5446752daeacb63d8ca2378c1c19ef9d79a..8d6eac706c0b7a4294d19b1a80e806ef0f07732e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Header file for ATA/ATAPI PASS THRU driver.\r
 \r
-  Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2016, 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
@@ -100,6 +100,7 @@ typedef struct {
   // The attached device list\r
   //\r
   LIST_ENTRY                        DeviceList;\r
+  UINT64                            EnabledPciAttributes;\r
   UINT64                            OriginalPciAttributes;\r
 \r
   //\r
@@ -120,6 +121,12 @@ typedef struct {
   //\r
   EFI_EVENT                         TimerEvent;\r
   LIST_ENTRY                        NonBlockingTaskList;\r
+\r
+  //\r
+  // For disabling the device (especially Bus Master DMA) at\r
+  // ExitBootServices().\r
+  //\r
+  EFI_EVENT                         ExitBootEvent;\r
 } ATA_ATAPI_PASS_THRU_INSTANCE;\r
 \r
 //\r
@@ -135,10 +142,11 @@ struct _ATA_NONBLOCK_TASK {
   BOOLEAN                           IsStart;\r
   EFI_EVENT                         Event;\r
   UINT64                            RetryTimes;\r
-  VOID                              *Map; // Pointer to map.\r
-  VOID                              *TableMap;// Pointer to PRD table map.\r
+  BOOLEAN                           InfiniteWait;\r
+  VOID                              *Map;            // Pointer to map.\r
+  VOID                              *TableMap;       // Pointer to PRD table map.\r
   EFI_ATA_DMA_PRD                   *MapBaseAddress; //  Pointer to range Base address for Map.\r
-  UINTN                             PageCount;      //  The page numbers used by PCIO freebuffer.\r
+  UINTN                             PageCount;       //  The page numbers used by PCIO freebuffer.\r
 };\r
 \r
 //\r
@@ -436,7 +444,7 @@ AtaAtapiPassThruStop (
   @param[in]  Instance            A pointer to the ATA_ATAPI_PASS_THRU_INSTANCE instance.\r
   @param[in]  Port                The port number of the ATA device to send the command.\r
   @param[in]  PortMultiplierPort  The port multiplier port number of the ATA device to send the command.\r
-                                  If there is no port multiplier, then specify 0.\r
+                                  If there is no port multiplier, then specify 0xFFFF.\r
   @param[in]  DeviceType          The device type of the ATA device.\r
 \r
   @retval     The pointer to the data structure of the device info to access.\r
@@ -458,7 +466,7 @@ SearchDeviceInfoList (
   @param[in]  Instance            A pointer to the ATA_ATAPI_PASS_THRU_INSTANCE instance.\r
   @param[in]  Port                The port number of the ATA device to send the command.\r
   @param[in]  PortMultiplierPort  The port multiplier port number of the ATA device to send the command.\r
-                                  If there is no port multiplier, then specify 0.\r
+                                  If there is no port multiplier, then specify 0xFFFF.\r
   @param[in]  DeviceType          The device type of the ATA device.\r
   @param[in]  IdentifyData        The data buffer to store the output of the IDENTIFY cmd.\r
 \r
@@ -543,7 +551,7 @@ AsyncNonBlockingTransferRoutine (
   @param[in]      This               A pointer to the EFI_ATA_PASS_THRU_PROTOCOL instance.\r
   @param[in]      Port               The port number of the ATA device to send the command.\r
   @param[in]      PortMultiplierPort The port multiplier port number of the ATA device to send the command.\r
-                                     If there is no port multiplier, then specify 0.\r
+                                     If there is no port multiplier, then specify 0xFFFF.\r
   @param[in, out] Packet             A pointer to the ATA command to send to the ATA device specified by Port\r
                                      and PortMultiplierPort.\r
   @param[in]      Event              If non-blocking I/O is not supported then Event is ignored, and blocking\r
@@ -680,7 +688,7 @@ AtaPassThruGetNextDevice (
                                      device path node is to be allocated and built.\r
   @param[in]      PortMultiplierPort The port multiplier port number of the ATA device for which a\r
                                      device path node is to be allocated and built. If there is no\r
-                                     port multiplier, then specify 0.\r
+                                     port multiplier, then specify 0xFFFF.\r
   @param[in, out] DevicePath         A pointer to a single device path node that describes the ATA\r
                                      device specified by Port and PortMultiplierPort. This function\r
                                      is responsible for allocating the buffer DevicePath with the\r
@@ -801,7 +809,7 @@ AtaPassThruResetPort (
   @param[in] This                A pointer to the EFI_ATA_PASS_THRU_PROTOCOL instance.\r
   @param[in] Port                Port represents the port number of the ATA device to be reset.\r
   @param[in] PortMultiplierPort  The port multiplier port number of the ATA device to reset.\r
-                                 If there is no port multiplier, then specify 0.\r
+                                 If there is no port multiplier, then specify 0xFFFF.\r
   @retval EFI_SUCCESS            The ATA device specified by Port and PortMultiplierPort was reset.\r
   @retval EFI_UNSUPPORTED        The ATA controller does not support a device reset operation.\r
   @retval EFI_INVALID_PARAMETER  Port or PortMultiplierPort are invalid.\r