37 EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_PHYSICAL |
38 EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_LOGICAL |
39 EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_NONBLOCKIO |
40 EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_CMD_SET_NVM,
79 NewDevicePathNode =
NULL;
87 if (NamespaceData ==
NULL) {
88 return EFI_OUT_OF_RESOURCES;
91 ParentDevicePath = Private->ParentDevicePath;
100 if (EFI_ERROR (Status)) {
107 if (NamespaceData->Ncap == 0) {
108 Status = EFI_DEVICE_ERROR;
114 if (Device ==
NULL) {
115 Status = EFI_OUT_OF_RESOURCES;
122 Device->Signature = NVME_DEVICE_PRIVATE_DATA_SIGNATURE;
123 Device->NamespaceId = NamespaceId;
124 Device->NamespaceUuid = NamespaceData->Eui64;
126 Device->ControllerHandle = Private->ControllerHandle;
127 Device->DriverBindingHandle = Private->DriverBindingHandle;
128 Device->Controller = Private;
139 Device->Media.
IoAlign = Private->PassThruMode.IoAlign;
141 Flbas = NamespaceData->Flbas;
142 LbaFmtIdx = Flbas & 0xF;
147 if (NamespaceData->LbaFormat[LbaFmtIdx].Ms != 0) {
150 "NVME IDENTIFY NAMESPACE [%d] Ms(%d) is not supported.\n",
152 NamespaceData->LbaFormat[LbaFmtIdx].Ms
154 Status = EFI_UNSUPPORTED;
158 Lbads = NamespaceData->LbaFormat[LbaFmtIdx].Lbads;
159 Device->Media.
BlockSize = (UINT32)1 << Lbads;
161 Device->Media.
LastBlock = NamespaceData->Nsze - 1;
168 Device->BlockIo.
Revision = EFI_BLOCK_IO_PROTOCOL_REVISION2;
169 Device->BlockIo.
Media = &Device->Media;
178 Device->BlockIo2.
Media = &Device->Media;
188 Device->MediaSanitize.
Revision = MEDIA_SANITIZE_PROTOCOL_REVISION;
189 Device->MediaSanitize.
Media = &Device->Media;
190 Device->MediaSanitize.MediaClear = NvmExpressMediaClear;
191 Device->MediaSanitize.MediaPurge = NvmExpressMediaPurge;
192 Device->MediaSanitize.MediaFormat = NvmExpressMediaFormat;
196 sizeof (Device->Controller->ControllerData->Sanicap)
201 &(Device->Controller->ControllerData->Sanicap),
220 Status = Private->Passthru.BuildDevicePath (
226 if (EFI_ERROR (Status)) {
234 if (DevicePath ==
NULL) {
235 Status = EFI_OUT_OF_RESOURCES;
240 RemainingDevicePath = DevicePath;
241 Status =
gBS->LocateDevicePath (&gEfiDevicePathProtocolGuid, &RemainingDevicePath, &DeviceHandle);
242 if (!EFI_ERROR (Status) && (DeviceHandle !=
NULL) &&
IsDevicePathEnd (RemainingDevicePath)) {
243 Status = EFI_ALREADY_STARTED;
248 Device->DevicePath = DevicePath;
253 Device->DeviceHandle =
NULL;
255 Status =
gBS->InstallMultipleProtocolInterfaces (
256 &Device->DeviceHandle,
257 &gEfiDevicePathProtocolGuid,
259 &gEfiBlockIoProtocolGuid,
261 &gEfiBlockIo2ProtocolGuid,
263 &gEfiDiskInfoProtocolGuid,
265 &gMediaSanitizeProtocolGuid,
266 &Device->MediaSanitize,
270 if (EFI_ERROR (Status)) {
277 if ((Private->ControllerData->Oacs & SECURITY_SEND_RECEIVE_SUPPORTED) != 0) {
278 Status =
gBS->InstallProtocolInterface (
279 &Device->DeviceHandle,
280 &gEfiStorageSecurityCommandProtocolGuid,
282 &Device->StorageSecurity
284 if (EFI_ERROR (Status)) {
285 gBS->UninstallMultipleProtocolInterfaces (
286 Device->DeviceHandle,
287 &gEfiDevicePathProtocolGuid,
289 &gEfiBlockIoProtocolGuid,
291 &gEfiBlockIo2ProtocolGuid,
293 &gEfiDiskInfoProtocolGuid,
295 &gMediaSanitizeProtocolGuid,
296 &Device->MediaSanitize,
304 Private->ControllerHandle,
305 &gEfiNvmExpressPassThruProtocolGuid,
306 (VOID **)&DummyInterface,
307 Private->DriverBindingHandle,
308 Device->DeviceHandle,
309 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
315 DEBUG ((DEBUG_INFO,
" == NVME IDENTIFY NAMESPACE [%d] DATA ==\n", NamespaceId));
316 DEBUG ((DEBUG_INFO,
" NSZE : 0x%lx\n", NamespaceData->Nsze));
317 DEBUG ((DEBUG_INFO,
" NCAP : 0x%lx\n", NamespaceData->Ncap));
318 DEBUG ((DEBUG_INFO,
" NUSE : 0x%lx\n", NamespaceData->Nuse));
319 DEBUG ((DEBUG_INFO,
" LBAF0.LBADS : 0x%x\n", (NamespaceData->LbaFormat[0].Lbads)));
324 CopyMem (Sn, Private->ControllerData->Sn, sizeof (Private->ControllerData->Sn));
326 CopyMem (Mn, Private->ControllerData->Mn, sizeof (Private->ControllerData->Mn));
328 UnicodeSPrintAsciiFormat (Device->ModelName, sizeof (Device->ModelName),
"%a-%a-%lx", Sn, Mn, NamespaceData->Eui64);
333 &Device->ControllerNameTable,
341 &Device->ControllerNameTable,
348 if (NamespaceData !=
NULL) {
352 if (NewDevicePathNode !=
NULL) {
356 if (EFI_ERROR (Status) && (Device !=
NULL) && (Device->DevicePath !=
NULL)) {
360 if (EFI_ERROR (Status) && (Device !=
NULL)) {
386 NamespaceId = 0xFFFFFFFF;
387 Passthru = &Private->Passthru;
390 Status = Passthru->GetNextNamespace (
392 (UINT32 *)&NamespaceId
395 if (EFI_ERROR (Status)) {
404 if (EFI_ERROR (Status)) {
439 VOID *DummyInterface;
443 Status =
gBS->OpenProtocol (
445 &gEfiBlockIoProtocolGuid,
447 This->DriverBindingHandle,
449 EFI_OPEN_PROTOCOL_GET_PROTOCOL
451 if (EFI_ERROR (Status)) {
455 Device = NVME_DEVICE_PRIVATE_DATA_FROM_BLOCK_IO (BlockIo);
461 OldTpl =
gBS->RaiseTPL (TPL_NOTIFY);
463 gBS->RestoreTPL (OldTpl);
477 &gEfiNvmExpressPassThruProtocolGuid,
478 This->DriverBindingHandle,
486 Status =
gBS->UninstallMultipleProtocolInterfaces (
488 &gEfiDevicePathProtocolGuid,
490 &gEfiBlockIoProtocolGuid,
492 &gEfiBlockIo2ProtocolGuid,
494 &gEfiDiskInfoProtocolGuid,
496 &gMediaSanitizeProtocolGuid,
497 &Device->MediaSanitize,
501 if (EFI_ERROR (Status)) {
504 &gEfiNvmExpressPassThruProtocolGuid,
505 (VOID **)&DummyInterface,
506 This->DriverBindingHandle,
508 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
516 Status =
gBS->OpenProtocol (
518 &gEfiStorageSecurityCommandProtocolGuid,
519 (VOID **)&StorageSecurity,
520 This->DriverBindingHandle,
522 EFI_OPEN_PROTOCOL_GET_PROTOCOL
525 if (!EFI_ERROR (Status)) {
526 Status =
gBS->UninstallProtocolInterface (
528 &gEfiStorageSecurityCommandProtocolGuid,
529 &Device->StorageSecurity
531 if (EFI_ERROR (Status)) {
534 &gEfiNvmExpressPassThruProtocolGuid,
535 (VOID **)&DummyInterface,
536 This->DriverBindingHandle,
538 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
544 if (Device->DevicePath !=
NULL) {
548 if (Device->ControllerNameTable !=
NULL) {
588 Cq = Private->CqBuffer[QueueId] + Private->CqHdbl[QueueId].Cqh;
590 PciIo = Private->PciIo;
595 for (Link =
GetFirstNode (&Private->UnsubmittedSubtasks);
596 !
IsNull (&Private->UnsubmittedSubtasks, Link);
599 NextLink =
GetNextNode (&Private->UnsubmittedSubtasks, Link);
600 Subtask = NVME_BLKIO2_SUBTASK_FROM_LINK (Link);
601 BlkIo2Request = Subtask->BlockIo2Request;
602 Token = BlkIo2Request->Token;
604 BlkIo2Request->UnsubmittedSubtaskNum--;
611 BlkIo2Request->LastSubtaskSubmitted &&
612 (BlkIo2Request->UnsubmittedSubtaskNum == 0))
622 FreePool (Subtask->CommandPacket->NvmeCmd);
623 FreePool (Subtask->CommandPacket->NvmeCompletion);
630 Status = Private->Passthru.PassThru (
632 Subtask->NamespaceId,
633 Subtask->CommandPacket,
636 if (Status == EFI_NOT_READY) {
638 BlkIo2Request->UnsubmittedSubtaskNum++;
640 }
else if (EFI_ERROR (Status)) {
654 FreePool (Subtask->CommandPacket->NvmeCmd);
655 FreePool (Subtask->CommandPacket->NvmeCompletion);
660 if (Subtask->IsLast) {
661 BlkIo2Request->LastSubtaskSubmitted =
TRUE;
666 while (Cq->Pt != Private->Pt[QueueId]) {
667 ASSERT (Cq->Sqid == QueueId);
674 for (Link =
GetFirstNode (&Private->AsyncPassThruQueue);
675 !
IsNull (&Private->AsyncPassThruQueue, Link);
678 NextLink =
GetNextNode (&Private->AsyncPassThruQueue, Link);
679 AsyncRequest = NVME_PASS_THRU_ASYNC_REQ_FROM_THIS (Link);
680 if (AsyncRequest->CommandId == Cq->Cid) {
686 AsyncRequest->Packet->NvmeCompletion,
694 if (AsyncRequest->MapData !=
NULL) {
695 PciIo->Unmap (PciIo, AsyncRequest->MapData);
698 if (AsyncRequest->MapMeta !=
NULL) {
699 PciIo->Unmap (PciIo, AsyncRequest->MapMeta);
702 if (AsyncRequest->MapPrpList !=
NULL) {
703 PciIo->Unmap (PciIo, AsyncRequest->MapPrpList);
706 if (AsyncRequest->PrpListHost !=
NULL) {
709 AsyncRequest->PrpListNo,
710 AsyncRequest->PrpListHost
715 gBS->SignalEvent (AsyncRequest->CallerEvent);
721 Private->AsyncSqHead = Cq->Sqhd;
726 Private->CqHdbl[QueueId].Cqh++;
727 if (Private->CqHdbl[QueueId].Cqh >
MIN (NVME_ASYNC_CCQ_SIZE, Private->Cap.Mqes)) {
728 Private->CqHdbl[QueueId].Cqh = 0;
729 Private->Pt[QueueId] ^= 1;
732 Cq = Private->CqBuffer[QueueId] + Private->CqHdbl[QueueId].Cqh;
741 NVME_CQHDBL_OFFSET (QueueId, Private->Cap.Dstrd),
807 if (RemainingDevicePath !=
NULL) {
817 DevicePathNode.DevPath = RemainingDevicePath;
823 return EFI_UNSUPPORTED;
831 Status =
gBS->OpenProtocol (
833 &gEfiDevicePathProtocolGuid,
834 (VOID **)&ParentDevicePath,
835 This->DriverBindingHandle,
837 EFI_OPEN_PROTOCOL_BY_DRIVER
839 if (Status == EFI_ALREADY_STARTED) {
843 if (EFI_ERROR (Status)) {
852 &gEfiDevicePathProtocolGuid,
853 This->DriverBindingHandle,
860 Status =
gBS->OpenProtocol (
862 &gEfiPciIoProtocolGuid,
864 This->DriverBindingHandle,
866 EFI_OPEN_PROTOCOL_BY_DRIVER
868 if (Status == EFI_ALREADY_STARTED) {
872 if (EFI_ERROR (Status)) {
880 Status = PciIo->Pci.
Read (
883 PCI_CLASSCODE_OFFSET,
887 if (EFI_ERROR (Status)) {
894 if ((ClassCode[0] != PCI_IF_NVMHCI) || (ClassCode[1] != PCI_CLASS_MASS_STORAGE_NVM) || (ClassCode[2] != PCI_CLASS_MASS_STORAGE)) {
895 Status = EFI_UNSUPPORTED;
901 &gEfiPciIoProtocolGuid,
902 This->DriverBindingHandle,
961 DEBUG ((DEBUG_INFO,
"NvmExpressDriverBindingStart: start\n"));
965 ParentDevicePath =
NULL;
967 Status =
gBS->OpenProtocol (
969 &gEfiDevicePathProtocolGuid,
970 (VOID **)&ParentDevicePath,
971 This->DriverBindingHandle,
973 EFI_OPEN_PROTOCOL_BY_DRIVER
975 if ((EFI_ERROR (Status)) && (Status != EFI_ALREADY_STARTED)) {
979 Status =
gBS->OpenProtocol (
981 &gEfiPciIoProtocolGuid,
983 This->DriverBindingHandle,
985 EFI_OPEN_PROTOCOL_BY_DRIVER
988 if (EFI_ERROR (Status) && (Status != EFI_ALREADY_STARTED)) {
995 if (Status != EFI_ALREADY_STARTED) {
998 if (Private ==
NULL) {
999 DEBUG ((DEBUG_ERROR,
"NvmExpressDriverBindingStart: allocating pool for Nvme Private Data failed!\n"));
1000 Status = EFI_OUT_OF_RESOURCES;
1007 Status = PciIo->Attributes (
1011 &Private->PciAttributes
1014 if (EFI_ERROR (Status)) {
1021 Status = PciIo->Attributes (
1027 if (EFI_ERROR (Status)) {
1028 DEBUG ((DEBUG_WARN,
"NvmExpressDriverBindingStart: failed to enable 64-bit DMA (%r)\n", Status));
1042 Status = PciIo->AllocateBuffer (
1047 (VOID **)&Private->Buffer,
1050 if (EFI_ERROR (Status)) {
1055 Status = PciIo->Map (
1068 Private->BufferPciAddr = (UINT8 *)(
UINTN)MappedAddr;
1070 Private->Signature = NVME_CONTROLLER_PRIVATE_DATA_SIGNATURE;
1071 Private->ControllerHandle = Controller;
1072 Private->ImageHandle = This->DriverBindingHandle;
1073 Private->DriverBindingHandle = This->DriverBindingHandle;
1074 Private->PciIo = PciIo;
1075 Private->ParentDevicePath = ParentDevicePath;
1076 Private->Passthru.Mode = &Private->PassThruMode;
1086 if (EFI_ERROR (Status)) {
1093 Status =
gBS->CreateEvent (
1094 EVT_TIMER | EVT_NOTIFY_SIGNAL,
1098 &Private->TimerEvent
1100 if (EFI_ERROR (Status)) {
1104 Status =
gBS->SetTimer (
1105 Private->TimerEvent,
1109 if (EFI_ERROR (Status)) {
1113 Status =
gBS->InstallMultipleProtocolInterfaces (
1115 &gEfiNvmExpressPassThruProtocolGuid,
1119 if (EFI_ERROR (Status)) {
1125 Status =
gBS->OpenProtocol (
1127 &gEfiNvmExpressPassThruProtocolGuid,
1129 This->DriverBindingHandle,
1131 EFI_OPEN_PROTOCOL_GET_PROTOCOL
1133 if (EFI_ERROR (Status)) {
1137 Private = NVME_CONTROLLER_PRIVATE_DATA_FROM_PASS_THRU (Passthru);
1140 if (RemainingDevicePath ==
NULL) {
1151 Status = Private->Passthru.GetNamespace (
1153 RemainingDevicePath,
1157 if (!EFI_ERROR (Status)) {
1165 DEBUG ((DEBUG_INFO,
"NvmExpressDriverBindingStart: end successfully\n"));
1169 if ((Private !=
NULL) && (Private->Mapping !=
NULL)) {
1170 PciIo->Unmap (PciIo, Private->Mapping);
1173 if ((Private !=
NULL) && (Private->Buffer !=
NULL)) {
1174 PciIo->FreeBuffer (PciIo, 6, Private->Buffer);
1177 if ((Private !=
NULL) && (Private->ControllerData !=
NULL)) {
1178 FreePool (Private->ControllerData);
1181 if (Private !=
NULL) {
1182 if (Private->TimerEvent !=
NULL) {
1183 gBS->CloseEvent (Private->TimerEvent);
1189 gBS->CloseProtocol (
1191 &gEfiPciIoProtocolGuid,
1192 This->DriverBindingHandle,
1196 gBS->CloseProtocol (
1198 &gEfiDevicePathProtocolGuid,
1199 This->DriverBindingHandle,
1203 DEBUG ((DEBUG_INFO,
"NvmExpressDriverBindingStart: end with %r\n", Status));
1244 BOOLEAN AllChildrenStopped;
1251 if (NumberOfChildren == 0) {
1252 Status =
gBS->OpenProtocol (
1254 &gEfiNvmExpressPassThruProtocolGuid,
1256 This->DriverBindingHandle,
1258 EFI_OPEN_PROTOCOL_GET_PROTOCOL
1261 if (!EFI_ERROR (Status)) {
1262 Private = NVME_CONTROLLER_PRIVATE_DATA_FROM_PASS_THRU (PassThru);
1268 OldTpl =
gBS->RaiseTPL (TPL_NOTIFY);
1269 IsEmpty =
IsListEmpty (&Private->AsyncPassThruQueue) &&
1271 gBS->RestoreTPL (OldTpl);
1280 gBS->UninstallMultipleProtocolInterfaces (
1282 &gEfiNvmExpressPassThruProtocolGuid,
1287 if (Private->TimerEvent !=
NULL) {
1288 gBS->CloseEvent (Private->TimerEvent);
1291 if (Private->Mapping !=
NULL) {
1292 Private->PciIo->Unmap (Private->PciIo, Private->Mapping);
1295 if (Private->Buffer !=
NULL) {
1296 Private->PciIo->FreeBuffer (Private->PciIo, 6, Private->Buffer);
1299 FreePool (Private->ControllerData);
1303 gBS->CloseProtocol (
1305 &gEfiPciIoProtocolGuid,
1306 This->DriverBindingHandle,
1309 gBS->CloseProtocol (
1311 &gEfiDevicePathProtocolGuid,
1312 This->DriverBindingHandle,
1321 AllChildrenStopped =
TRUE;
1323 for (Index = 0; Index < NumberOfChildren; Index++) {
1325 if (EFI_ERROR (Status)) {
1326 AllChildrenStopped =
FALSE;
1330 if (!AllChildrenStopped) {
1331 return EFI_DEVICE_ERROR;
1357 UINTN DeviceHandleCount;
1368 DeviceHandleBuffer =
NULL;
1369 Status =
gBS->LocateHandleBuffer (
1371 &gEfiNvmExpressPassThruProtocolGuid,
1377 if (!EFI_ERROR (Status)) {
1382 for (Index = 0; Index < DeviceHandleCount; Index++) {
1383 Status =
gBS->DisconnectController (
1384 DeviceHandleBuffer[Index],
1388 if (EFI_ERROR (Status)) {
1397 Status =
gBS->UninstallMultipleProtocolInterfaces (
1399 &gEfiDriverBindingProtocolGuid,
1400 &gNvmExpressDriverBinding,
1401 &gEfiDriverSupportedEfiVersionProtocolGuid,
1402 &gNvmExpressDriverSupportedEfiVersion,
1406 if (EFI_ERROR (Status)) {
1419 Status =
gBS->HandleProtocol (
1421 &gEfiComponentNameProtocolGuid,
1422 (VOID **)&ComponentName
1424 if (!EFI_ERROR (Status)) {
1425 gBS->UninstallProtocolInterface (
1427 &gEfiComponentNameProtocolGuid,
1432 Status =
gBS->HandleProtocol (
1434 &gEfiComponentName2ProtocolGuid,
1435 (VOID **)&ComponentName2
1437 if (!EFI_ERROR (Status)) {
1438 gBS->UninstallProtocolInterface (
1440 &gEfiComponentName2ProtocolGuid,
1451 if (DeviceHandleBuffer !=
NULL) {
1452 gBS->FreePool (DeviceHandleBuffer);
1480 &gNvmExpressDriverBinding,
1482 &gNvmExpressComponentName,
1483 &gNvmExpressComponentName2
1492 Status =
gBS->InstallMultipleProtocolInterfaces (
1494 &gEfiDriverSupportedEfiVersionProtocolGuid,
1495 &gNvmExpressDriverSupportedEfiVersion,
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 InsertHeadList(IN OUT LIST_ENTRY *ListHead, IN OUT LIST_ENTRY *Entry)
LIST_ENTRY *EFIAPI GetFirstNode(IN CONST LIST_ENTRY *List)
LIST_ENTRY *EFIAPI RemoveEntryList(IN CONST LIST_ENTRY *Entry)
LIST_ENTRY *EFIAPI InitializeListHead(IN OUT LIST_ENTRY *ListHead)
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)
#define MSG_NVME_NAMESPACE_DP
#define MESSAGING_DEVICE_PATH
UINTN EFIAPI DevicePathNodeLength(IN CONST VOID *Node)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI AppendDevicePathNode(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathNode OPTIONAL)
BOOLEAN EFIAPI IsDevicePathEnd(IN CONST VOID *Node)
struct _EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
UINTN EFIAPI UnicodeSPrintAsciiFormat(OUT CHAR16 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR8 *FormatString,...)
#define GLOBAL_REMOVE_IF_UNREFERENCED
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
#define EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE
Clear for PCI controllers that can not genrate a DAC.
@ EfiPciIoAttributeOperationGet
@ EfiPciIoAttributeOperationEnable
@ EfiPciIoOperationBusMasterCommonBuffer
EFI_STATUS EFIAPI NvmExpressDriverEntry(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS EnumerateNvmeDevNamespace(IN NVME_CONTROLLER_PRIVATE_DATA *Private, UINT32 NamespaceId)
EFI_STATUS EFIAPI NvmExpressDriverBindingStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS DiscoverAllNamespaces(IN NVME_CONTROLLER_PRIVATE_DATA *Private)
EFI_STATUS UnregisterNvmeNamespace(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_HANDLE Handle)
EFI_STATUS EFIAPI NvmExpressUnload(IN EFI_HANDLE ImageHandle)
EFI_STATUS EFIAPI NvmExpressDriverBindingSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
VOID EFIAPI ProcessAsyncTaskList(IN EFI_EVENT Event, IN VOID *Context)
EFI_STATUS EFIAPI NvmExpressDriverBindingStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
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 NvmeRegisterShutdownNotification(VOID)
EFI_STATUS EFIAPI NvmExpressGetNextNamespace(IN EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL *This, IN OUT UINT32 *NamespaceId)
VOID NvmeUnregisterShutdownNotification(VOID)
EFI_STATUS EFIAPI NvmeBlockIoWriteBlocks(IN EFI_BLOCK_IO_PROTOCOL *This, IN UINT32 MediaId, IN EFI_LBA Lba, IN UINTN BufferSize, IN VOID *Buffer)
EFI_STATUS EFIAPI NvmeBlockIoResetEx(IN EFI_BLOCK_IO2_PROTOCOL *This, IN BOOLEAN ExtendedVerification)
EFI_STATUS EFIAPI NvmeBlockIoReset(IN EFI_BLOCK_IO_PROTOCOL *This, IN BOOLEAN ExtendedVerification)
EFI_STATUS EFIAPI NvmeBlockIoReadBlocksEx(IN EFI_BLOCK_IO2_PROTOCOL *This, IN UINT32 MediaId, IN EFI_LBA Lba, IN OUT EFI_BLOCK_IO2_TOKEN *Token, IN UINTN BufferSize, OUT VOID *Buffer)
EFI_STATUS EFIAPI NvmeStorageSecuritySendData(IN EFI_STORAGE_SECURITY_COMMAND_PROTOCOL *This, IN UINT32 MediaId, IN UINT64 Timeout, IN UINT8 SecurityProtocolId, IN UINT16 SecurityProtocolSpecificData, IN UINTN PayloadBufferSize, IN VOID *PayloadBuffer)
EFI_STATUS EFIAPI NvmeBlockIoReadBlocks(IN EFI_BLOCK_IO_PROTOCOL *This, IN UINT32 MediaId, IN EFI_LBA Lba, IN UINTN BufferSize, OUT VOID *Buffer)
EFI_STATUS EFIAPI NvmeStorageSecurityReceiveData(IN EFI_STORAGE_SECURITY_COMMAND_PROTOCOL *This, IN UINT32 MediaId, IN UINT64 Timeout, IN UINT8 SecurityProtocolId, IN UINT16 SecurityProtocolSpecificData, IN UINTN PayloadBufferSize, OUT VOID *PayloadBuffer, OUT UINTN *PayloadTransferSize)
EFI_STATUS EFIAPI NvmeBlockIoWriteBlocksEx(IN EFI_BLOCK_IO2_PROTOCOL *This, IN UINT32 MediaId, IN EFI_LBA Lba, IN OUT EFI_BLOCK_IO2_TOKEN *Token, IN UINTN BufferSize, IN VOID *Buffer)
EFI_STATUS EFIAPI NvmeBlockIoFlushBlocksEx(IN EFI_BLOCK_IO2_PROTOCOL *This, IN OUT EFI_BLOCK_IO2_TOKEN *Token)
EFI_STATUS EFIAPI NvmeBlockIoFlushBlocks(IN EFI_BLOCK_IO_PROTOCOL *This)
VOID InitializeDiskInfo(IN NVME_DEVICE_PRIVATE_DATA *Device)
EFI_STATUS NvmeIdentifyNamespace(IN NVME_CONTROLLER_PRIVATE_DATA *Private, IN UINT32 NamespaceId, IN VOID *Buffer)
EFI_STATUS NvmeControllerInit(IN NVME_CONTROLLER_PRIVATE_DATA *Private)
VOID EFIAPI Exit(IN EFI_STATUS Status)
UINT64 EFI_PHYSICAL_ADDRESS
#define EFI_PAGES_TO_SIZE(Pages)
EFI_STATUS EFIAPI AddUnicodeString2(IN CONST CHAR8 *Language, IN CONST CHAR8 *SupportedLanguages, IN OUT EFI_UNICODE_STRING_TABLE **UnicodeStringTable, IN CONST CHAR16 *UnicodeString, IN BOOLEAN Iso639Language)
EFI_STATUS EFIAPI EfiLibInstallDriverBindingComponentName2(IN CONST EFI_HANDLE ImageHandle, IN CONST EFI_SYSTEM_TABLE *SystemTable, IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, IN EFI_HANDLE DriverBindingHandle, IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL)
EFI_STATUS EFIAPI FreeUnicodeStringTable(IN EFI_UNICODE_STRING_TABLE *UnicodeStringTable)
EFI_BLOCK_IO_MEDIA * Media
EFI_BLOCK_IO_MEDIA * Media
CHAR8 * SupportedLanguages
CHAR8 * SupportedLanguages
UINT32 SanitizeCapabilities
EFI_BLOCK_IO_MEDIA * Media
EFI_STATUS TransactionStatus
UINT32 LogicalBlocksPerPhysicalBlock
EFI_PCI_IO_PROTOCOL_IO_MEM Write
EFI_PCI_IO_PROTOCOL_CONFIG Read