]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/ScsiLib.h
Update prototype of DxeLoadCore().
[mirror_edk2.git] / MdePkg / Include / Library / ScsiLib.h
index 54fb281f1d4667fca2b169c137a25f6d5dd21a76..e8b33a08ef745159b8730d505227c34cb3993749 100644 (file)
@@ -12,8 +12,8 @@
 \r
 **/\r
 \r
-#ifndef _SCSI_LIB_H\r
-#define _SCSI_LIB_H\r
+#ifndef _SCSI_LIB_H_\r
+#define _SCSI_LIB_H_\r
 \r
 #include <Protocol/ScsiIo.h>\r
 \r
 #define EFI_SCSI_STALL_1_MILLISECOND  10000\r
 #define EFI_SCSI_STALL_1_SECOND       10000000\r
 \r
-//\r
-// this macro cannot be directly used by the gBS->Stall(),\r
-// since the value output by this macro is in 100ns unit,\r
-// not 1us unit (1us = 1000ns)\r
-//\r
-#define EfiScsiStallSeconds(a)  (a) * EFI_SCSI_STALL_1_SECOND\r
+///\r
+/// this macro cannot be directly used by the gBS->Stall(),\r
+/// since the value output by this macro is in 100ns unit,\r
+/// not 1us unit (1us = 1000ns)\r
+///\r
+#define EfiScsiStallSeconds(a)  ((a) * EFI_SCSI_STALL_1_SECOND)\r
 \r
 \r
-/**
+/**\r
   Function test the ready status of the SCSI unit.\r
-
-  @param[in]     ScsiIo             A pointer to SCSI IO protocol.
-  @param[in]     Timeout            The length of timeout period.
-  @param[out]    SenseData          A pointer to output sense data.
-  @param[out]    SenseDataLength    The length of output sense data.
-  @param[out]    HostAdapterStatus  The status of Host Adapter.
-  @param[out]    TargetStatus       The status of the target.
-
+\r
+  @param[in]     ScsiIo             A pointer to SCSI IO protocol.\r
+  @param[in]     Timeout            The length of timeout period.\r
+  @param[out]    SenseData          A pointer to output sense data.\r
+  @param[out]    SenseDataLength    The length of output sense data.\r
+  @param[out]    HostAdapterStatus  The status of Host Adapter.\r
+  @param[out]    TargetStatus       The status of the target.\r
+\r
   @retval EFI_SUCCESS           The status of the unit is tested successfully.\r
   @retval EFI_BAD_BUFFER_SIZE   The SCSI Request Packet was executed, \r
                                 but the entire DataBuffer could not be transferred.\r
                                 Host Controller).\r
   @retval EFI_TIMEOUT           A timeout occurred while waiting for the SCSI \r
                                 Request Packet to execute.\r
-
+\r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 ScsiTestUnitReadyCommand (\r
   IN  EFI_SCSI_IO_PROTOCOL  *ScsiIo,\r
   IN  UINT64                Timeout,\r
@@ -71,19 +72,19 @@ ScsiTestUnitReadyCommand (
   );\r
 \r
 \r
-/**
+/**\r
   Function to submit SCSI inquiry command.\r
-
-  @param[in]     ScsiIo             SCSI IO Protocol to use
-  @param[in]     Timeout            The length of timeout period.
-  @param[out]    SenseData          A pointer to output sense data.
-  @param[in,out] SenseDataLength    The length of output sense data.
-  @param[out]    HostAdapterStatus  The status of Host Adapter.
-  @param[out]    TargetStatus       The status of the target.
-  @param[in,out] InquirydataBuffer  A pointer to inquiry data buffer.
-  @param[in,out] InquiryDataLength  The length of inquiry data buffer.
-  @param[in]     EnableVitalProductData  Boolean to enable Vital Product Data.
-
+\r
+  @param[in]     ScsiIo             SCSI IO Protocol to use\r
+  @param[in]     Timeout            The length of timeout period.\r
+  @param[in]     SenseData          A pointer to output sense data.\r
+  @param[in out] SenseDataLength    The length of output sense data.\r
+  @param[out]    HostAdapterStatus  The status of Host Adapter.\r
+  @param[out]    TargetStatus       The status of the target.\r
+  @param[in out] InquirydataBuffer  A pointer to inquiry data buffer.\r
+  @param[in out] InquiryDataLength  The length of inquiry data buffer.\r
+  @param[in]     EnableVitalProductData  Boolean to enable Vital Product Data.\r
+\r
   @retval EFI_SUCCESS         The status of the unit is tested successfully.\r
   @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, \r
                               but the entire DataBuffer could not be transferred.\r
@@ -100,9 +101,10 @@ ScsiTestUnitReadyCommand (
                           Host Controller).\r
   @retval EFI_TIMEOUT     A timeout occurred while waiting for the SCSI \r
                           Request Packet to execute.\r
-
+\r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 ScsiInquiryCommand (\r
   IN  EFI_SCSI_IO_PROTOCOL  *ScsiIo,\r
   IN  UINT64                Timeout,\r
@@ -116,21 +118,21 @@ ScsiInquiryCommand (
   );\r
 \r
 \r
-/**
+/**\r
   Function to submit SCSI mode sense 10 command.\r
-
-  @param[in]     ScsiIo             A pointer to SCSI IO protocol.
-  @param[in]     Timeout            The length of timeout period.
-  @param[out]    SenseData          A pointer to output sense data.
-  @param[in,out] SenseDataLength    The length of output sense data.
-  @param[out]    HostAdapterStatus  The status of Host Adapter.
-  @param[out]    TargetStatus       The status of the target.
-  @param[in]     DataBuffer         A pointer to input data buffer.
-  @param[in,out] DataLength         The length of input data buffer.
-  @param[in]     DBDField           The DBD Field (Optional).
-  @param[in]     PageControl        Page Control.
-  @param[in]     PageCode           Page code.
-
+\r
+  @param[in]     ScsiIo             A pointer to SCSI IO protocol.\r
+  @param[in]     Timeout            The length of timeout period.\r
+  @param[in]    SenseData          A pointer to output sense data.\r
+  @param[in out] SenseDataLength    The length of output sense data.\r
+  @param[out]    HostAdapterStatus  The status of Host Adapter.\r
+  @param[out]    TargetStatus       The status of the target.\r
+  @param[in]     DataBuffer         A pointer to input data buffer.\r
+  @param[in out] DataLength         The length of input data buffer.\r
+  @param[in]     DBDField           The DBD Field (Optional).\r
+  @param[in]     PageControl        Page Control.\r
+  @param[in]     PageCode           Page code.\r
+\r
   @retval EFI_SUCCESS               The status of the unit is tested successfully.\r
   @retval EFI_BAD_BUFFER_SIZE       The SCSI Request Packet was executed, \r
                                     but the entire DataBuffer could not be transferred.\r
@@ -147,9 +149,10 @@ ScsiInquiryCommand (
                                     Host Controller).\r
   @retval EFI_TIMEOUT               A timeout occurred while waiting for the SCSI \r
                                     Request Packet to execute.\r
-
+\r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 ScsiModeSense10Command (\r
   IN  EFI_SCSI_IO_PROTOCOL    *ScsiIo,\r
   IN  UINT64                  Timeout,\r
@@ -166,7 +169,7 @@ ScsiModeSense10Command (
 \r
 \r
 \r
-/**
+/**\r
   Function to submit SCSI request sense command.\r
   ScsiIo               - A pointer to SCSI IO protocol.\r
   Timeout              - The length of timeout period.\r
@@ -174,15 +177,15 @@ ScsiModeSense10Command (
   SenseDataLength      - The length of output sense data.\r
   HostAdapterStatus    - The status of Host Adapter.\r
   TargetStatus         - The status of the target.\r
-
-  @param[in]     ScsiIo             SCSI IO Protocol to use
-  @param[in]     Timeout            TODO:
-  @param[out]    SenseData          TODO:
-  @param[in,out] SenseDataLength    TODO:
-  @param[out]    HostAdapterStatus  TODO:
-  @param[out]    TargetStatus       TODO:
-
-  @retval EFI_SUCCESS        Valid data returned
+\r
+  @param[in]     ScsiIo             SCSI IO Protocol to use\r
+  @param[in]     Timeout            TODO:\r
+  @param[in]     SenseData          TODO:\r
+  @param[in out] SenseDataLength    TODO:\r
+  @param[out]    HostAdapterStatus  TODO:\r
+  @param[out]    TargetStatus       TODO:\r
+\r
+  @retval EFI_SUCCESS        Valid data returned\r
   @retval EFI_SUCCESS        The status of the unit is tested successfully.\r
   @retval EFI_BAD_BUFFER_SIZE       The SCSI Request Packet was executed, \r
                                     but the entire DataBuffer could not be transferred.\r
@@ -199,9 +202,10 @@ ScsiModeSense10Command (
                                     Host Controller).\r
   @retval EFI_TIMEOUT               A timeout occurred while waiting for the SCSI \r
                                     Request Packet to execute.\r
-
+\r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 ScsiRequestSenseCommand (\r
   IN  EFI_SCSI_IO_PROTOCOL  *ScsiIo,\r
   IN  UINT64                Timeout,\r
@@ -212,19 +216,19 @@ ScsiRequestSenseCommand (
   );\r
 \r
 \r
-/**
+/**\r
   Function to submit read capacity command.\r
 \r
-  @param[in]     ScsiIo             A pointer to SCSI IO protocol.
-  @param[in]     Timeout            The length of timeout period.
-  @param[out]    SenseData          A pointer to output sense data.
-  @param[in,out] SenseDataLength    The length of output sense data.
-  @param[out]    HostAdapterStatus  The status of Host Adapter.
-  @param[out]    TargetStatus       The status of the target.
-  @param[out]    DataBuffer         A pointer to a data buffer.
-  @param[in,out] DataLength         The length of data buffer.
-  @param[in]     PMI                Partial medium indicator.
-
+  @param[in]     ScsiIo             A pointer to SCSI IO protocol.\r
+  @param[in]     Timeout            The length of timeout period.\r
+  @param[in]    SenseData          A pointer to output sense data.\r
+  @param[in out] SenseDataLength    The length of output sense data.\r
+  @param[out]    HostAdapterStatus  The status of Host Adapter.\r
+  @param[out]    TargetStatus       The status of the target.\r
+  @param[out]    DataBuffer         A pointer to a data buffer.\r
+  @param[in out] DataLength         The length of data buffer.\r
+  @param[in]     PMI                Partial medium indicator.\r
+\r
   @retval  EFI_SUCCESS                The status of the unit is tested successfully.\r
   @retval  EFI_BAD_BUFFER_SIZE        The SCSI Request Packet was executed, \r
                                       but the entire DataBuffer could not be transferred.\r
@@ -241,9 +245,10 @@ ScsiRequestSenseCommand (
                                       Host Controller).\r
   @retval  EFI_TIMEOUT                A timeout occurred while waiting for the SCSI \r
                                       Request Packet to execute.\r
-
+\r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 ScsiReadCapacityCommand (\r
   IN  EFI_SCSI_IO_PROTOCOL  *ScsiIo,\r
   IN  UINT64                Timeout,\r
@@ -257,20 +262,20 @@ ScsiReadCapacityCommand (
   );\r
 \r
 \r
-/**
+/**\r
   Function to submit read 10 command.\r
-
-  @param[in]     ScsiIo             A pointer to SCSI IO protocol.
-  @param[in]     Timeout            The length of timeout period.
-  @param[out]    SenseData          A pointer to output sense data.
-  @param[in,out] SenseDataLength    The length of output sense data.
-  @param[out]    HostAdapterStatus  The status of Host Adapter.
-  @param[out]    TargetStatus       The status of the target.
-  @param[out]    DataBuffer         Read 10 command data.
-  @param[in,out] DataLength         The length of data buffer.
-  @param[in]     StartLba           The start address of LBA.
-  @param[in]     SectorSize         The sector size.
-
+\r
+  @param[in]     ScsiIo             A pointer to SCSI IO protocol.\r
+  @param[in]     Timeout            The length of timeout period.\r
+  @param[in]    SenseData          A pointer to output sense data.\r
+  @param[in out] SenseDataLength    The length of output sense data.\r
+  @param[out]    HostAdapterStatus  The status of Host Adapter.\r
+  @param[out]    TargetStatus       The status of the target.\r
+  @param[out]    DataBuffer         Read 10 command data.\r
+  @param[in out] DataLength         The length of data buffer.\r
+  @param[in]     StartLba           The start address of LBA.\r
+  @param[in]     SectorSize         The sector size.\r
+\r
   @retval EFI_SUCCESS               The status of the unit is tested successfully.\r
   @retval EFI_BAD_BUFFER_SIZE       The SCSI Request Packet was executed, \r
                                     but the entire DataBuffer could not be transferred.\r
@@ -287,9 +292,10 @@ ScsiReadCapacityCommand (
                                     Host Controller).\r
   @retval EFI_TIMEOUT               A timeout occurred while waiting for the SCSI \r
                                     Request Packet to execute.\r
-
+\r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 ScsiRead10Command (\r
   IN  EFI_SCSI_IO_PROTOCOL  *ScsiIo,\r
   IN  UINT64                Timeout,\r
@@ -304,20 +310,20 @@ ScsiRead10Command (
   );\r
 \r
 \r
-/**
+/**\r
   Function to submit SCSI write 10 command.\r
-
-  @param[in]     ScsiIo             SCSI IO Protocol to use
-  @param[in]     Timeout            The length of timeout period.
-  @param[out]    SenseData          A pointer to output sense data.
-  @param[in,out] SenseDataLength    The length of output sense data.
-  @param[out]    HostAdapterStatus  The status of Host Adapter.
-  @param[out]    TargetStatus       The status of the target.
-  @param[out]    DataBuffer         A pointer to a data buffer.
-  @param[in,out] DataLength         The length of data buffer.
-  @param[in]     StartLba           The start address of LBA.
-  @param[in]     SectorSize         The sector size.
-
+\r
+  @param[in]     ScsiIo             SCSI IO Protocol to use\r
+  @param[in]     Timeout            The length of timeout period.\r
+  @param[in]    SenseData          A pointer to output sense data.\r
+  @param[in out] SenseDataLength    The length of output sense data.\r
+  @param[out]    HostAdapterStatus  The status of Host Adapter.\r
+  @param[out]    TargetStatus       The status of the target.\r
+  @param[out]    DataBuffer         A pointer to a data buffer.\r
+  @param[in out] DataLength         The length of data buffer.\r
+  @param[in]     StartLba           The start address of LBA.\r
+  @param[in]     SectorSize         The sector size.\r
+\r
   @retval EFI_SUCCESS               The status of the unit is tested successfully.\r
   @retval EFI_BAD_BUFFER_SIZE       The SCSI Request Packet was executed, \r
                                     but the entire DataBuffer could not be transferred.\r
@@ -334,9 +340,10 @@ ScsiRead10Command (
                                     Host Controller).\r
   @retval EFI_TIMEOUT               A timeout occurred while waiting for the SCSI \r
                                     Request Packet to execute.\r
-
+\r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 ScsiWrite10Command (\r
   IN  EFI_SCSI_IO_PROTOCOL  *ScsiIo,\r
   IN  UINT64                Timeout,\r