24 DEBUG ((DEBUG_VERBOSE,
"Dump NVMe Completion Entry Status from [0x%x]:\n", Cq));
26 DEBUG ((DEBUG_VERBOSE,
" SQ Identifier : [0x%x], Phase Tag : [%d], Cmd Identifier : [0x%x]\n", Cq->Sqid, Cq->Pt, Cq->Cid));
28 DEBUG ((DEBUG_VERBOSE,
" NVMe Cmd Execution Result - "));
34 DEBUG ((DEBUG_VERBOSE,
"Successful Completion\n"));
37 DEBUG ((DEBUG_VERBOSE,
"Invalid Command Opcode\n"));
40 DEBUG ((DEBUG_VERBOSE,
"Invalid Field in Command\n"));
43 DEBUG ((DEBUG_VERBOSE,
"Command ID Conflict\n"));
46 DEBUG ((DEBUG_VERBOSE,
"Data Transfer Error\n"));
49 DEBUG ((DEBUG_VERBOSE,
"Commands Aborted due to Power Loss Notification\n"));
52 DEBUG ((DEBUG_VERBOSE,
"Internal Device Error\n"));
55 DEBUG ((DEBUG_VERBOSE,
"Command Abort Requested\n"));
58 DEBUG ((DEBUG_VERBOSE,
"Command Aborted due to SQ Deletion\n"));
61 DEBUG ((DEBUG_VERBOSE,
"Command Aborted due to Failed Fused Command\n"));
64 DEBUG ((DEBUG_VERBOSE,
"Command Aborted due to Missing Fused Command\n"));
67 DEBUG ((DEBUG_VERBOSE,
"Invalid Namespace or Format\n"));
70 DEBUG ((DEBUG_VERBOSE,
"Command Sequence Error\n"));
73 DEBUG ((DEBUG_VERBOSE,
"Invalid SGL Last Segment Descriptor\n"));
76 DEBUG ((DEBUG_VERBOSE,
"Invalid Number of SGL Descriptors\n"));
79 DEBUG ((DEBUG_VERBOSE,
"Data SGL Length Invalid\n"));
82 DEBUG ((DEBUG_VERBOSE,
"Metadata SGL Length Invalid\n"));
85 DEBUG ((DEBUG_VERBOSE,
"SGL Descriptor Type Invalid\n"));
88 DEBUG ((DEBUG_VERBOSE,
"LBA Out of Range\n"));
91 DEBUG ((DEBUG_VERBOSE,
"Capacity Exceeded\n"));
94 DEBUG ((DEBUG_VERBOSE,
"Namespace Not Ready\n"));
97 DEBUG ((DEBUG_VERBOSE,
"Reservation Conflict\n"));
106 DEBUG ((DEBUG_VERBOSE,
"Completion Queue Invalid\n"));
109 DEBUG ((DEBUG_VERBOSE,
"Invalid Queue Identifier\n"));
112 DEBUG ((DEBUG_VERBOSE,
"Maximum Queue Size Exceeded\n"));
115 DEBUG ((DEBUG_VERBOSE,
"Abort Command Limit Exceeded\n"));
118 DEBUG ((DEBUG_VERBOSE,
"Asynchronous Event Request Limit Exceeded\n"));
121 DEBUG ((DEBUG_VERBOSE,
"Invalid Firmware Slot\n"));
124 DEBUG ((DEBUG_VERBOSE,
"Invalid Firmware Image\n"));
127 DEBUG ((DEBUG_VERBOSE,
"Invalid Interrupt Vector\n"));
130 DEBUG ((DEBUG_VERBOSE,
"Invalid Log Page\n"));
133 DEBUG ((DEBUG_VERBOSE,
"Invalid Format\n"));
136 DEBUG ((DEBUG_VERBOSE,
"Firmware Application Requires Conventional Reset\n"));
139 DEBUG ((DEBUG_VERBOSE,
"Invalid Queue Deletion\n"));
142 DEBUG ((DEBUG_VERBOSE,
"Feature Identifier Not Saveable\n"));
145 DEBUG ((DEBUG_VERBOSE,
"Feature Not Changeable\n"));
148 DEBUG ((DEBUG_VERBOSE,
"Feature Not Namespace Specific\n"));
151 DEBUG ((DEBUG_VERBOSE,
"Firmware Application Requires NVM Subsystem Reset\n"));
154 DEBUG ((DEBUG_VERBOSE,
"Conflicting Attributes\n"));
157 DEBUG ((DEBUG_VERBOSE,
"Invalid Protection Information\n"));
160 DEBUG ((DEBUG_VERBOSE,
"Attempted Write to Read Only Range\n"));
169 DEBUG ((DEBUG_VERBOSE,
"Write Fault\n"));
172 DEBUG ((DEBUG_VERBOSE,
"Unrecovered Read Error\n"));
175 DEBUG ((DEBUG_VERBOSE,
"End-to-end Guard Check Error\n"));
178 DEBUG ((DEBUG_VERBOSE,
"End-to-end Application Tag Check Error\n"));
181 DEBUG ((DEBUG_VERBOSE,
"End-to-end Reference Tag Check Error\n"));
184 DEBUG ((DEBUG_VERBOSE,
"Compare Failure\n"));
187 DEBUG ((DEBUG_VERBOSE,
"Access Denied\n"));
217 OUT VOID **PrpListHost,
234 PrpEntryNo = EFI_PAGE_SIZE /
sizeof (UINT64);
240 if (*PrpListNo == 0) {
242 }
else if ((Remainder != 0) && (Remainder != 1)) {
244 }
else if (Remainder == 1) {
245 Remainder = PrpEntryNo;
246 }
else if (Remainder == 0) {
247 Remainder = PrpEntryNo - 1;
250 Status = PciIo->AllocateBuffer (
259 if (EFI_ERROR (Status)) {
264 Status = PciIo->Map (
274 DEBUG ((DEBUG_ERROR,
"NvmeCreatePrpList: create PrpList failure!\n"));
282 for (PrpListIndex = 0; PrpListIndex < *PrpListNo - 1; ++PrpListIndex) {
283 PrpListBase = *(UINT64 *)PrpListHost + PrpListIndex * EFI_PAGE_SIZE;
285 for (PrpEntryIndex = 0; PrpEntryIndex < PrpEntryNo; ++PrpEntryIndex) {
286 if (PrpEntryIndex != PrpEntryNo - 1) {
290 *((UINT64 *)(
UINTN)PrpListBase + PrpEntryIndex) = PhysicalAddr;
291 PhysicalAddr += EFI_PAGE_SIZE;
296 *((UINT64 *)(
UINTN)PrpListBase + PrpEntryIndex) = PrpListPhyAddr + (PrpListIndex + 1) * EFI_PAGE_SIZE;
304 PrpListBase = *(UINT64 *)PrpListHost + PrpListIndex * EFI_PAGE_SIZE;
305 for (PrpEntryIndex = 0; PrpEntryIndex < Remainder; ++PrpEntryIndex) {
306 *((UINT64 *)(
UINTN)PrpListBase + PrpEntryIndex) = PhysicalAddr;
307 PhysicalAddr += EFI_PAGE_SIZE;
310 return (VOID *)(
UINTN)PrpListPhyAddr;
313 PciIo->FreeBuffer (PciIo, *PrpListNo, *PrpListHost);
342 PciIo = Private->PciIo;
343 OldTpl =
gBS->RaiseTPL (TPL_NOTIFY);
348 for (Link =
GetFirstNode (&Private->UnsubmittedSubtasks);
349 !
IsNull (&Private->UnsubmittedSubtasks, Link);
352 NextLink =
GetNextNode (&Private->UnsubmittedSubtasks, Link);
353 Subtask = NVME_BLKIO2_SUBTASK_FROM_LINK (Link);
354 BlkIo2Request = Subtask->BlockIo2Request;
355 Token = BlkIo2Request->Token;
357 BlkIo2Request->UnsubmittedSubtaskNum--;
358 if (Subtask->IsLast) {
359 BlkIo2Request->LastSubtaskSubmitted =
TRUE;
366 gBS->SignalEvent (Subtask->Event);
372 for (Link =
GetFirstNode (&Private->AsyncPassThruQueue);
373 !
IsNull (&Private->AsyncPassThruQueue, Link);
376 NextLink =
GetNextNode (&Private->AsyncPassThruQueue, Link);
377 AsyncRequest = NVME_PASS_THRU_ASYNC_REQ_FROM_THIS (Link);
379 if (AsyncRequest->MapData !=
NULL) {
380 PciIo->Unmap (PciIo, AsyncRequest->MapData);
383 if (AsyncRequest->MapMeta !=
NULL) {
384 PciIo->Unmap (PciIo, AsyncRequest->MapMeta);
387 if (AsyncRequest->MapPrpList !=
NULL) {
388 PciIo->Unmap (PciIo, AsyncRequest->MapPrpList);
391 if (AsyncRequest->PrpListHost !=
NULL) {
394 AsyncRequest->PrpListNo,
395 AsyncRequest->PrpListHost
400 gBS->SignalEvent (AsyncRequest->CallerEvent);
409 Status = EFI_DEVICE_ERROR;
412 gBS->RestoreTPL (OldTpl);
453 IN UINT32 NamespaceId,
488 if ((This ==
NULL) || (Packet ==
NULL)) {
489 return EFI_INVALID_PARAMETER;
492 if ((Packet->NvmeCmd ==
NULL) || (Packet->NvmeCompletion ==
NULL)) {
493 return EFI_INVALID_PARAMETER;
496 if ((Packet->QueueType != NVME_ADMIN_QUEUE) && (Packet->QueueType != NVME_IO_QUEUE)) {
497 return EFI_INVALID_PARAMETER;
505 Attributes = This->Mode->Attributes;
506 if ((Attributes & (EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_PHYSICAL |
507 EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_LOGICAL)) == 0)
509 return EFI_INVALID_PARAMETER;
515 IoAlign = This->Mode->IoAlign;
516 if ((IoAlign > 0) && (((
UINTN)Packet->TransferBuffer & (IoAlign - 1)) != 0)) {
517 return EFI_INVALID_PARAMETER;
520 if ((IoAlign > 0) && (((
UINTN)Packet->MetadataBuffer & (IoAlign - 1)) != 0)) {
521 return EFI_INVALID_PARAMETER;
524 Private = NVME_CONTROLLER_PRIVATE_DATA_FROM_PASS_THRU (This);
529 if ((NamespaceId > Private->ControllerData->Nn) &&
530 (NamespaceId != (UINT32)-1))
532 return EFI_INVALID_PARAMETER;
538 if (Private->ControllerData->Mdts != 0) {
539 MaxTransLen = (1 << (Private->ControllerData->Mdts)) *
540 (1 << (Private->Cap.Mpsmin + 12));
541 if (Packet->TransferLength > MaxTransLen) {
542 Packet->TransferLength = MaxTransLen;
543 return EFI_BAD_BUFFER_SIZE;
547 PciIo = Private->PciIo;
556 QueueSize =
MIN (NVME_ASYNC_CSQ_SIZE, Private->Cap.Mqes) + 1;
558 if (Packet->QueueType == NVME_ADMIN_QUEUE) {
569 if ((Private->SqTdbl[QueueId].Sqt + 1) % QueueSize ==
570 Private->AsyncSqHead)
572 return EFI_NOT_READY;
577 Sq = Private->SqBuffer[QueueId] + Private->SqTdbl[QueueId].Sqt;
578 Cq = Private->CqBuffer[QueueId] + Private->CqHdbl[QueueId].Cqh;
580 if (Packet->NvmeCmd->Nsid != NamespaceId) {
581 return EFI_INVALID_PARAMETER;
585 Sq->Opc = (UINT8)Packet->NvmeCmd->Cdw0.Opcode;
586 Sq->Fuse = (UINT8)Packet->NvmeCmd->Cdw0.FusedOperation;
587 Sq->Cid = Private->Cid[QueueId]++;
588 Sq->Nsid = Packet->NvmeCmd->Nsid;
593 ASSERT (Sq->Psdt == 0);
595 DEBUG ((DEBUG_ERROR,
"NvmExpressPassThru: doesn't support SGL mechanism\n"));
596 return EFI_UNSUPPORTED;
599 Sq->Prp[0] = (UINT64)(
UINTN)Packet->TransferBuffer;
600 if ((Packet->QueueType == NVME_ADMIN_QUEUE) &&
601 ((Sq->Opc == NVME_ADMIN_CRIOCQ_CMD) || (Sq->Opc == NVME_ADMIN_CRIOSQ_CMD)))
610 if (!Private->CreateIoQueue) {
611 DEBUG ((DEBUG_ERROR,
"NvmExpressPassThru: Does not support external IO queues creation request.\n"));
612 return EFI_UNSUPPORTED;
614 }
else if ((Sq->Opc & (BIT0 | BIT1)) != 0) {
618 if (((Packet->TransferLength != 0) && (Packet->TransferBuffer ==
NULL)) ||
619 ((Packet->TransferLength == 0) && (Packet->TransferBuffer !=
NULL)))
621 return EFI_INVALID_PARAMETER;
624 if ((Sq->Opc & BIT0) != 0) {
630 if ((Packet->TransferLength != 0) && (Packet->TransferBuffer !=
NULL)) {
631 MapLength = Packet->TransferLength;
632 Status = PciIo->Map (
635 Packet->TransferBuffer,
640 if (EFI_ERROR (Status) || (Packet->TransferLength != MapLength)) {
641 return EFI_OUT_OF_RESOURCES;
644 Sq->Prp[0] = PhyAddr;
648 if ((Packet->MetadataLength != 0) && (Packet->MetadataBuffer !=
NULL)) {
649 MapLength = Packet->MetadataLength;
650 Status = PciIo->Map (
653 Packet->MetadataBuffer,
658 if (EFI_ERROR (Status) || (Packet->MetadataLength != MapLength)) {
664 return EFI_OUT_OF_RESOURCES;
675 Offset = ((UINT16)Sq->Prp[0]) & (EFI_PAGE_SIZE - 1);
676 Bytes = Packet->TransferLength;
678 if ((Offset + Bytes) > (EFI_PAGE_SIZE * 2)) {
682 PhyAddr = (Sq->Prp[0] + EFI_PAGE_SIZE) & ~(EFI_PAGE_SIZE - 1);
685 Status = EFI_OUT_OF_RESOURCES;
689 Sq->Prp[1] = (UINT64)(
UINTN)Prp;
690 }
else if ((Offset + Bytes) > EFI_PAGE_SIZE) {
691 Sq->Prp[1] = (Sq->Prp[0] + EFI_PAGE_SIZE) & ~(EFI_PAGE_SIZE - 1);
694 if (Packet->NvmeCmd->Flags & CDW2_VALID) {
695 Sq->Rsvd2 = (UINT64)Packet->NvmeCmd->Cdw2;
698 if (Packet->NvmeCmd->Flags & CDW3_VALID) {
699 Sq->Rsvd2 |=
LShiftU64 ((UINT64)Packet->NvmeCmd->Cdw3, 32);
702 if (Packet->NvmeCmd->Flags & CDW10_VALID) {
703 Sq->Payload.Raw.Cdw10 = Packet->NvmeCmd->Cdw10;
706 if (Packet->NvmeCmd->Flags & CDW11_VALID) {
707 Sq->Payload.Raw.Cdw11 = Packet->NvmeCmd->Cdw11;
710 if (Packet->NvmeCmd->Flags & CDW12_VALID) {
711 Sq->Payload.Raw.Cdw12 = Packet->NvmeCmd->Cdw12;
714 if (Packet->NvmeCmd->Flags & CDW13_VALID) {
715 Sq->Payload.Raw.Cdw13 = Packet->NvmeCmd->Cdw13;
718 if (Packet->NvmeCmd->Flags & CDW14_VALID) {
719 Sq->Payload.Raw.Cdw14 = Packet->NvmeCmd->Cdw14;
722 if (Packet->NvmeCmd->Flags & CDW15_VALID) {
723 Sq->Payload.Raw.Cdw15 = Packet->NvmeCmd->Cdw15;
729 if ((Event !=
NULL) && (QueueId != 0)) {
730 Private->SqTdbl[QueueId].Sqt =
731 (Private->SqTdbl[QueueId].Sqt + 1) % QueueSize;
733 Private->SqTdbl[QueueId].Sqt ^= 1;
737 Status = PciIo->Mem.
Write (
741 NVME_SQTDBL_OFFSET (QueueId, Private->Cap.Dstrd),
746 if (EFI_ERROR (Status)) {
754 if ((Event !=
NULL) && (QueueId != 0)) {
756 if (AsyncRequest ==
NULL) {
757 Status = EFI_DEVICE_ERROR;
761 AsyncRequest->Signature = NVME_PASS_THRU_ASYNC_REQ_SIG;
762 AsyncRequest->Packet = Packet;
763 AsyncRequest->CommandId = Sq->Cid;
764 AsyncRequest->CallerEvent = Event;
765 AsyncRequest->MapData = MapData;
766 AsyncRequest->MapMeta = MapMeta;
767 AsyncRequest->MapPrpList = MapPrpList;
768 AsyncRequest->PrpListNo = PrpListNo;
769 AsyncRequest->PrpListHost = PrpListHost;
771 OldTpl =
gBS->RaiseTPL (TPL_NOTIFY);
772 InsertTailList (&Private->AsyncPassThruQueue, &AsyncRequest->Link);
773 gBS->RestoreTPL (OldTpl);
778 Status =
gBS->CreateEvent (
785 if (EFI_ERROR (Status)) {
791 if (EFI_ERROR (Status)) {
798 Status = EFI_TIMEOUT;
799 while (EFI_ERROR (
gBS->CheckEvent (TimerEvent))) {
800 if (Cq->Pt != Private->Pt[QueueId]) {
809 if (Status != EFI_TIMEOUT) {
810 if ((Cq->Sct == 0) && (Cq->Sc == 0)) {
813 Status = EFI_DEVICE_ERROR;
827 ReportStatusCode ((EFI_ERROR_MAJOR | EFI_ERROR_CODE), (EFI_IO_BUS_SCSI | EFI_IOB_EC_INTERFACE_ERROR));
833 DEBUG ((DEBUG_ERROR,
"NvmExpressPassThru: Timeout occurs for an NVMe command.\n"));
839 if (EFI_ERROR (Status)) {
847 if (!EFI_ERROR (Status)) {
849 if (!EFI_ERROR (Status)) {
853 Status =
gBS->SetTimer (Private->TimerEvent,
TimerPeriodic, NVME_HC_ASYNC_TIMER);
854 if (!EFI_ERROR (Status)) {
858 Status = EFI_TIMEOUT;
862 Status = EFI_DEVICE_ERROR;
868 if ((Private->CqHdbl[QueueId].Cqh ^= 1) == 0) {
869 Private->Pt[QueueId] ^= 1;
873 PreviousStatus = Status;
874 Status = PciIo->Mem.
Write (
878 NVME_CQHDBL_OFFSET (QueueId, Private->Cap.Dstrd),
884 Status = EFI_ERROR (PreviousStatus) ? PreviousStatus : Status;
891 ASSERT (QueueId == 0);
892 gBS->SignalEvent (Event);
896 if (MapData !=
NULL) {
903 if (MapMeta !=
NULL) {
910 if (MapPrpList !=
NULL) {
918 PciIo->FreeBuffer (PciIo, PrpListNo, PrpListHost);
921 if (TimerEvent !=
NULL) {
922 gBS->CloseEvent (TimerEvent);
965 IN OUT UINT32 *NamespaceId
970 UINT32 NextNamespaceId;
973 if ((This ==
NULL) || (NamespaceId ==
NULL)) {
974 return EFI_INVALID_PARAMETER;
977 NamespaceData =
NULL;
978 Status = EFI_NOT_FOUND;
980 Private = NVME_CONTROLLER_PRIVATE_DATA_FROM_PASS_THRU (This);
984 if (*NamespaceId == 0xFFFFFFFF) {
994 if (NamespaceData ==
NULL) {
995 return EFI_NOT_FOUND;
999 if (EFI_ERROR (Status)) {
1003 *NamespaceId = NextNamespaceId;
1005 if (*NamespaceId > Private->ControllerData->Nn) {
1006 return EFI_INVALID_PARAMETER;
1009 NextNamespaceId = *NamespaceId + 1;
1010 if (NextNamespaceId > Private->ControllerData->Nn) {
1011 return EFI_NOT_FOUND;
1018 if (NamespaceData ==
NULL) {
1019 return EFI_NOT_FOUND;
1023 if (EFI_ERROR (Status)) {
1027 *NamespaceId = NextNamespaceId;
1031 if (NamespaceData !=
NULL) {
1067 OUT UINT32 *NamespaceId
1073 if ((This ==
NULL) || (DevicePath ==
NULL) || (NamespaceId ==
NULL)) {
1074 return EFI_INVALID_PARAMETER;
1078 return EFI_UNSUPPORTED;
1082 Private = NVME_CONTROLLER_PRIVATE_DATA_FROM_PASS_THRU (This);
1086 return EFI_NOT_FOUND;
1092 if ((Node->NamespaceId == 0) ||
1093 (Node->NamespaceId > Private->ControllerData->Nn))
1095 return EFI_NOT_FOUND;
1098 *NamespaceId = Node->NamespaceId;
1102 return EFI_UNSUPPORTED;
1141 IN UINT32 NamespaceId,
1153 if ((This ==
NULL) || (DevicePath ==
NULL)) {
1154 return EFI_INVALID_PARAMETER;
1158 Private = NVME_CONTROLLER_PRIVATE_DATA_FROM_PASS_THRU (This);
1163 if ((NamespaceId == 0) ||
1164 (NamespaceId > Private->ControllerData->Nn))
1166 return EFI_NOT_FOUND;
1171 return EFI_OUT_OF_RESOURCES;
1177 Node->NamespaceId = NamespaceId;
1182 NamespaceData =
NULL;
1184 if (NamespaceData ==
NULL) {
1185 Status = EFI_OUT_OF_RESOURCES;
1195 (VOID *)NamespaceData
1198 if (EFI_ERROR (Status)) {
1202 Node->NamespaceUuid = NamespaceData->Eui64;
1207 if (NamespaceData !=
NULL) {
1211 if (EFI_ERROR (Status)) {
BOOLEAN EFIAPI IsNull(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
BOOLEAN EFIAPI IsListEmpty(IN CONST LIST_ENTRY *ListHead)
LIST_ENTRY *EFIAPI GetNextNode(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
LIST_ENTRY *EFIAPI GetFirstNode(IN CONST LIST_ENTRY *List)
LIST_ENTRY *EFIAPI RemoveEntryList(IN CONST LIST_ENTRY *Entry)
UINT64 EFIAPI DivU64x64Remainder(IN UINT64 Dividend, IN UINT64 Divisor, OUT UINT64 *Remainder OPTIONAL)
UINT64 EFIAPI LShiftU64(IN UINT64 Operand, IN UINTN Count)
LIST_ENTRY *EFIAPI InsertTailList(IN OUT LIST_ENTRY *ListHead, IN OUT LIST_ENTRY *Entry)
UINT32 EFIAPI ReadUnaligned32(IN CONST UINT32 *Buffer)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
#define MSG_NVME_NAMESPACE_DP
#define MESSAGING_DEVICE_PATH
UINT16 EFIAPI SetDevicePathNodeLength(IN OUT VOID *Node, IN UINTN Length)
UINTN EFIAPI DevicePathNodeLength(IN CONST VOID *Node)
EFI_STATUS EFIAPI ReportStatusCode(IN EFI_STATUS_CODE_TYPE Type, IN EFI_STATUS_CODE_VALUE Value)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
#define DEBUG_CODE_BEGIN()
#define DEBUG(Expression)
EFI_PCI_IO_PROTOCOL_OPERATION
@ EfiPciIoOperationBusMasterWrite
@ EfiPciIoOperationBusMasterRead
@ EfiPciIoOperationBusMasterCommonBuffer
EFI_STATUS NvmeIdentifyNamespace(IN NVME_CONTROLLER_PRIVATE_DATA *Private, IN UINT32 NamespaceId, IN VOID *Buffer)
EFI_STATUS NvmeControllerInit(IN NVME_CONTROLLER_PRIVATE_DATA *Private)
EFI_STATUS EFIAPI NvmExpressPassThru(IN EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL *This, IN UINT32 NamespaceId, IN OUT EFI_NVM_EXPRESS_PASS_THRU_COMMAND_PACKET *Packet, IN EFI_EVENT Event OPTIONAL)
EFI_STATUS EFIAPI NvmExpressGetNamespace(IN EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL *This, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, OUT UINT32 *NamespaceId)
EFI_STATUS EFIAPI NvmExpressBuildDevicePath(IN EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL *This, IN UINT32 NamespaceId, IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath)
VOID NvmeDumpStatus(IN NVME_CQ *Cq)
VOID * NvmeCreatePrpList(IN EFI_PCI_IO_PROTOCOL *PciIo, IN EFI_PHYSICAL_ADDRESS PhysicalAddr, IN UINTN Pages, OUT VOID **PrpListHost, IN OUT UINTN *PrpListNo, OUT VOID **Mapping)
EFI_STATUS EFIAPI NvmExpressGetNextNamespace(IN EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL *This, IN OUT UINT32 *NamespaceId)
EFI_STATUS AbortAsyncPassThruTasks(IN NVME_CONTROLLER_PRIVATE_DATA *Private)
VOID EFIAPI Exit(IN EFI_STATUS Status)
UINT64 EFI_PHYSICAL_ADDRESS
#define EFI_PAGES_TO_SIZE(Pages)
#define EFI_SIZE_TO_PAGES(Size)
EFI_STATUS TransactionStatus
EFI_PCI_IO_PROTOCOL_IO_MEM Write