IN NVME_CONTEXT *Nvme\r
);\r
\r
-/**\r
- Check whether there are available command slots.\r
-\r
- @param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.\r
- @param[in] Qid - Queue index\r
-\r
- @retval EFI_SUCCESS - Available command slot is found\r
- @retval EFI_NOT_READY - No available command slot is found\r
- @retval EFI_DEVICE_ERROR - Error occurred on device side.\r
-\r
-**/\r
-EFI_STATUS\r
-NvmeHasFreeCmdSlot (\r
- IN NVME_CONTEXT *Nvme,\r
- IN UINT8 Qid\r
- );\r
-\r
-/**\r
- Check whether all command slots are clean.\r
-\r
- @param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.\r
- @param[in] Qid - Queue index\r
-\r
- @retval EFI_SUCCESS - All command slots are clean\r
- @retval EFI_NOT_READY - Not all command slots are clean\r
- @retval EFI_DEVICE_ERROR - Error occurred on device side.\r
-\r
-**/\r
-EFI_STATUS\r
-NvmeIsAllCmdSlotClean (\r
- IN NVME_CONTEXT *Nvme,\r
- IN UINT8 Qid\r
- );\r
-\r
-/**\r
- Read sector Data from the NVMe device.\r
-\r
- @param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.\r
- @param[in,out] Buffer - The Buffer used to store the Data read from the device.\r
- @param[in] Lba - The start block number.\r
- @param[in] Blocks - Total block number to be read.\r
-\r
- @retval EFI_SUCCESS - Datum are read from the device.\r
- @retval Others - Fail to read all the datum.\r
-\r
-**/\r
-EFI_STATUS\r
-NvmeReadSectors (\r
- IN NVME_CONTEXT *Nvme,\r
- IN OUT UINT64 Buffer,\r
- IN UINT64 Lba,\r
- IN UINT32 Blocks\r
- );\r
-\r
-/**\r
- Write sector Data to the NVMe device.\r
-\r
- @param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.\r
- @param[in] Buffer - The Buffer to be written into the device.\r
- @param[in] Lba - The start block number.\r
- @param[in] Blocks - Total block number to be written.\r
-\r
- @retval EFI_SUCCESS - Datum are written into the Buffer.\r
- @retval Others - Fail to write all the datum.\r
-\r
-**/\r
-EFI_STATUS\r
-NvmeWriteSectors (\r
- IN NVME_CONTEXT *Nvme,\r
- IN UINT64 Buffer,\r
- IN UINT64 Lba,\r
- IN UINT32 Blocks\r
- );\r
-\r
-/**\r
- Flushes all modified Data to the device.\r
-\r
- @param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.\r
-\r
- @retval EFI_SUCCESS - Datum are written into the Buffer.\r
- @retval Others - Fail to write all the datum.\r
-\r
-**/\r
-EFI_STATUS\r
-NvmeFlush (\r
- IN NVME_CONTEXT *Nvme\r
- );\r
-\r
-/**\r
- Read some blocks from the device.\r
-\r
- @param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.\r
- @param[out] Buffer - The Buffer used to store the Data read from the device.\r
- @param[in] Lba - The start block number.\r
- @param[in] Blocks - Total block number to be read.\r
-\r
- @retval EFI_SUCCESS - Datum are read from the device.\r
- @retval Others - Fail to read all the datum.\r
-\r
-**/\r
-EFI_STATUS\r
-NvmeRead (\r
- IN NVME_CONTEXT *Nvme,\r
- OUT UINT64 Buffer,\r
- IN UINT64 Lba,\r
- IN UINTN Blocks\r
- );\r
-\r
-/**\r
- Write some blocks to the device.\r
-\r
- @param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.\r
- @param[in] Buffer - The Buffer to be written into the device.\r
- @param[in] Lba - The start block number.\r
- @param[in] Blocks - Total block number to be written.\r
-\r
- @retval EFI_SUCCESS - Datum are written into the Buffer.\r
- @retval Others - Fail to write all the datum.\r
-\r
-**/\r
-EFI_STATUS\r
-NvmeWrite (\r
- IN NVME_CONTEXT *Nvme,\r
- IN UINT64 Buffer,\r
- IN UINT64 Lba,\r
- IN UINTN Blocks\r
- );\r
-\r
/**\r
Security send and receive commands.\r
\r