]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c
MdeModulePkg/NvmExpressPei: Add logic to produce SSC PPI
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / NvmExpressPei / NvmExpressPeiHci.c
index d4056a2a5b4b3c7c1d2ee27a34bf09e60578461a..b9fa3230f8782a615ffcfdfc3b090c99a41d547c 100644 (file)
@@ -2,7 +2,7 @@
   The NvmExpressPei driver is used to manage non-volatile memory subsystem\r
   which follows NVM Express specification at PEI phase.\r
 \r
-  Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions\r
@@ -702,47 +702,25 @@ NvmeControllerInit (
 }\r
 \r
 /**\r
-  Free the resources allocated by an NVME controller.\r
+  Free the DMA resources allocated by an NVME controller.\r
 \r
   @param[in] Private     The pointer to the PEI_NVME_CONTROLLER_PRIVATE_DATA data structure.\r
 \r
 **/\r
 VOID\r
-NvmeFreeControllerResource (\r
+NvmeFreeDmaResource (\r
   IN PEI_NVME_CONTROLLER_PRIVATE_DATA    *Private\r
   )\r
 {\r
-  //\r
-  // Free the controller data buffer\r
-  //\r
-  if (Private->ControllerData != NULL) {\r
-    FreePool (Private->ControllerData);\r
-    Private->ControllerData = NULL;\r
-  }\r
+  ASSERT (Private != NULL);\r
 \r
-  //\r
-  // Free the DMA buffers\r
-  //\r
-  if (Private->Buffer != NULL) {\r
+  if (Private->BufferMapping != NULL) {\r
     IoMmuFreeBuffer (\r
        NVME_MEM_MAX_PAGES,\r
        Private->Buffer,\r
        Private->BufferMapping\r
        );\r
-    Private->Buffer = NULL;\r
   }\r
 \r
-  //\r
-  // Free the namespaces information buffer\r
-  //\r
-  if (Private->NamespaceInfo != NULL) {\r
-    FreePool (Private->NamespaceInfo);\r
-    Private->NamespaceInfo = NULL;\r
-  }\r
-\r
-  //\r
-  // Free the controller private data structure\r
-  //\r
-  FreePool (Private);\r
   return;\r
 }\r