MdeModulePkg/NvmExpressPei: Add logic to produce SSC PPI
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1409 For the NvmExpressPei driver, this commit will add codes to produce the Storage Security Command PPI if the underlying NVM Express controller supports the Security Send and Security Receive commands. Cc: Jian J Wang <jian.j.wang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
The NvmExpressPei driver is used to manage non-volatile memory subsystem
|
||||
which follows NVM Express specification at PEI phase.
|
||||
|
||||
Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions
|
||||
@@ -702,47 +702,25 @@ NvmeControllerInit (
|
||||
}
|
||||
|
||||
/**
|
||||
Free the resources allocated by an NVME controller.
|
||||
Free the DMA resources allocated by an NVME controller.
|
||||
|
||||
@param[in] Private The pointer to the PEI_NVME_CONTROLLER_PRIVATE_DATA data structure.
|
||||
|
||||
**/
|
||||
VOID
|
||||
NvmeFreeControllerResource (
|
||||
NvmeFreeDmaResource (
|
||||
IN PEI_NVME_CONTROLLER_PRIVATE_DATA *Private
|
||||
)
|
||||
{
|
||||
//
|
||||
// Free the controller data buffer
|
||||
//
|
||||
if (Private->ControllerData != NULL) {
|
||||
FreePool (Private->ControllerData);
|
||||
Private->ControllerData = NULL;
|
||||
}
|
||||
ASSERT (Private != NULL);
|
||||
|
||||
//
|
||||
// Free the DMA buffers
|
||||
//
|
||||
if (Private->Buffer != NULL) {
|
||||
if (Private->BufferMapping != NULL) {
|
||||
IoMmuFreeBuffer (
|
||||
NVME_MEM_MAX_PAGES,
|
||||
Private->Buffer,
|
||||
Private->BufferMapping
|
||||
);
|
||||
Private->Buffer = NULL;
|
||||
}
|
||||
|
||||
//
|
||||
// Free the namespaces information buffer
|
||||
//
|
||||
if (Private->NamespaceInfo != NULL) {
|
||||
FreePool (Private->NamespaceInfo);
|
||||
Private->NamespaceInfo = NULL;
|
||||
}
|
||||
|
||||
//
|
||||
// Free the controller private data structure
|
||||
//
|
||||
FreePool (Private);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user