summaryrefslogtreecommitdiffstats
path: root/SecurityPkg
diff options
context:
space:
mode:
authorChen A Chen <chen.a.chen@intel.com>2018-11-08 10:04:06 +0800
committerZhang, Chao B <chao.b.zhang@intel.com>2018-12-10 15:56:32 +0800
commitf4c8c1bbf1698ddc0939178dddd7587cbdbb29c7 (patch)
tree1e9a09d6d1777bc6f5c8c1f45ab6b81d930ab93c /SecurityPkg
parent56fbaecb15b7fb04f7ab926eefd790747bd49562 (diff)
downloadedk2-f4c8c1bbf1698ddc0939178dddd7587cbdbb29c7.tar.gz
edk2-f4c8c1bbf1698ddc0939178dddd7587cbdbb29c7.tar.bz2
edk2-f4c8c1bbf1698ddc0939178dddd7587cbdbb29c7.zip
SecurityPkg: Remove dead code and inf redundant definitions.
Fix BZ1065, https://bugzilla.tianocore.org/show_bug.cgi?id=1065. Remove dead code and inf redundant definitions from SecurityPkg. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chen A Chen <chen.a.chen@intel.com> Cc: Zhang Chao B <chao.b.zhang@intel.com> Reviewed-by: Zhang Chao B <chao.b.zhang@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
Diffstat (limited to 'SecurityPkg')
-rw-r--r--SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf1
-rw-r--r--SecurityPkg/Tcg/Opal/OpalPassword/OpalAhciMode.c52
-rw-r--r--SecurityPkg/Tcg/Opal/OpalPassword/OpalAhciMode.h23
-rw-r--r--SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h11
-rw-r--r--SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiCallbacks.c87
-rw-r--r--SecurityPkg/Tcg/Opal/OpalPassword/OpalNvmeMode.c321
-rw-r--r--SecurityPkg/Tcg/Opal/OpalPassword/OpalNvmeMode.h128
-rw-r--r--SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordDxe.inf2
-rw-r--r--SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.inf1
-rw-r--r--SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf1
-rw-r--r--SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf1
-rw-r--r--SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf1
-rw-r--r--SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf1
-rw-r--r--SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf2
14 files changed, 0 insertions, 632 deletions
diff --git a/SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf b/SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf
index 6f9a77b868..a17fa4046d 100644
--- a/SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf
+++ b/SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf
@@ -43,7 +43,6 @@
UefiDriverEntryPoint
UefiBootServicesTableLib
UefiRuntimeServicesTableLib
- ReportStatusCodeLib
DebugLib
UefiLib
MemoryAllocationLib
diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalAhciMode.c b/SecurityPkg/Tcg/Opal/OpalPassword/OpalAhciMode.c
index d51865380f..0c4edd5346 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalAhciMode.c
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalAhciMode.c
@@ -970,58 +970,6 @@ AhciReset (
}
/**
- Send Buffer cmd to specific device.
-
- @param[in] AhciContext The pointer to the AHCI_CONTEXT.
- @param[in] Port The port number of attached ATA device.
- @param[in] PortMultiplier The port number of port multiplier of attached ATA device.
- @param[in, out] Buffer The Data Buffer to store IDENTIFY PACKET Data.
-
- @retval EFI_DEVICE_ERROR The cmd abort with error occurs.
- @retval EFI_TIMEOUT The operation is time out.
- @retval EFI_UNSUPPORTED The device is not ready for executing.
- @retval EFI_SUCCESS The cmd executes successfully.
-
-**/
-EFI_STATUS
-EFIAPI
-AhciIdentify (
- IN AHCI_CONTEXT *AhciContext,
- IN UINT8 Port,
- IN UINT8 PortMultiplier,
- IN OUT ATA_IDENTIFY_DATA *Buffer
- )
-{
- EFI_STATUS Status;
- EFI_ATA_COMMAND_BLOCK AtaCommandBlock;
-
- if (AhciContext == NULL || Buffer == NULL) {
- return EFI_INVALID_PARAMETER;
- }
-
- ZeroMem (&AtaCommandBlock, sizeof (EFI_ATA_COMMAND_BLOCK));
-
- AtaCommandBlock.AtaCommand = ATA_CMD_IDENTIFY_DRIVE;
- AtaCommandBlock.AtaSectorCount = 1;
-
- Status = AhciPioTransfer (
- AhciContext,
- Port,
- PortMultiplier,
- NULL,
- 0,
- TRUE,
- &AtaCommandBlock,
- NULL,
- Buffer,
- sizeof (ATA_IDENTIFY_DATA),
- ATA_TIMEOUT
- );
-
- return Status;
-}
-
-/**
Allocate transfer-related data struct which is used at AHCI mode.
@param[in, out] AhciContext The pointer to the AHCI_CONTEXT.
diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalAhciMode.h b/SecurityPkg/Tcg/Opal/OpalPassword/OpalAhciMode.h
index 037f81ac24..2076b0411b 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalAhciMode.h
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalAhciMode.h
@@ -294,29 +294,6 @@ typedef struct {
} AHCI_CONTEXT;
/**
- Send Buffer cmd to specific device.
-
- @param AhciContext The pointer to the AHCI_CONTEXT.
- @param Port The number of port.
- @param PortMultiplier The timeout Value of stop.
- @param Buffer The Data Buffer to store IDENTIFY PACKET Data.
-
- @retval EFI_DEVICE_ERROR The cmd abort with error occurs.
- @retval EFI_TIMEOUT The operation is time out.
- @retval EFI_UNSUPPORTED The device is not ready for executing.
- @retval EFI_SUCCESS The cmd executes successfully.
-
-**/
-EFI_STATUS
-EFIAPI
-AhciIdentify (
- IN AHCI_CONTEXT *AhciContext,
- IN UINT8 Port,
- IN UINT8 PortMultiplier,
- IN OUT ATA_IDENTIFY_DATA *Buffer
- );
-
-/**
Allocate transfer-related data struct which is used at AHCI mode.
@param[in, out] AhciContext The pointer to the AHCI_CONTEXT.
diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h
index a4bb19ad60..8b368fe995 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h
@@ -286,17 +286,6 @@ OpalHiiAddPackages(
);
/**
- Check whether enable feature or not.
-
- @retval Return the disk number.
-
-**/
-UINT8
-HiiGetNumConfigRequiredOpalDisksCB(
- VOID
- );
-
-/**
Returns the driver name.
@retval Returns the driver name.
diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiCallbacks.c b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiCallbacks.c
index b07e38c144..31e1aa2240 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiCallbacks.c
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiCallbacks.c
@@ -16,56 +16,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "OpalHii.h"
/**
- Get Opal var name.
- The return Value must be freed by caller if not NULL
-
- @param OpalDisk The disk.
- @param Prefix The prefix string.
-
- @retval The var name string.
-
-**/
-CHAR16*
-OpalDriverGetOpalVarName(
- OPAL_DISK *OpalDisk,
- const CHAR16 *Prefix
- )
-{
- OPAL_DRIVER_DEVICE* Dev;
- UINTN PrefixLen;
- UINTN NameLen;
- UINTN VarNameLen;
- CHAR16* VarName;
-
- Dev = DRIVER_DEVICE_FROM_OPALDISK(OpalDisk);
- if (Dev == NULL) {
- return NULL;
- }
-
- PrefixLen = StrLen(Prefix);
-
- NameLen = 0;
- if (Dev->Name16 != NULL) {
- NameLen = StrLen(Dev->Name16);
- }
-
- VarNameLen = PrefixLen + NameLen;
-
- VarName = (CHAR16*)AllocateZeroPool((VarNameLen + 1) * sizeof(CHAR16));
- if (VarName == NULL) {
- return NULL;
- }
-
- CopyMem(VarName, Prefix, PrefixLen * sizeof(CHAR16));
- if (Dev->Name16 != NULL) {
- CopyMem(VarName + PrefixLen, Dev->Name16, NameLen * sizeof(CHAR16));
- }
- VarName[VarNameLen] = 0;
-
- return VarName;
-}
-
-/**
Get the driver image handle.
@retval the driver image handle.
@@ -80,43 +30,6 @@ HiiGetDriverImageHandleCB(
}
/**
- Check whether enable feature or not.
-
- @retval Return the disk number.
-
-**/
-UINT8
-HiiGetNumConfigRequiredOpalDisksCB(
- VOID
- )
-{
- UINT8 NumDisks;
- UINT8 NumLockedOpalDisks;
- OPAL_DISK *OpalDisk;
- UINT8 Index;
-
- NumLockedOpalDisks = 0;
-
- NumDisks = GetDeviceCount();
-
- for (Index = 0; Index < NumDisks; Index++) {
- OpalDisk = HiiGetOpalDiskCB(Index);
-
- if (OpalDisk != NULL) {
- if (!OpalFeatureEnabled (&OpalDisk->SupportedAttributes, &OpalDisk->LockingFeature)) {
- DEBUG ((DEBUG_INFO, "Ignoring disk %u because feature is disabled or health has already been inspected\n", Index));
- } else if (OpalDeviceLocked (&OpalDisk->SupportedAttributes, &OpalDisk->LockingFeature)) {
- NumLockedOpalDisks++;
- }
- }
- }
-
- return NumLockedOpalDisks;
-}
-
-
-
-/**
Returns the opaque pointer to a physical disk context.
@param DiskIndex Input the disk index.
diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalNvmeMode.c b/SecurityPkg/Tcg/Opal/OpalPassword/OpalNvmeMode.c
index 7657bb26e2..01c316d597 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalNvmeMode.c
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalNvmeMode.c
@@ -794,46 +794,6 @@ NvmeCreatePrpList (
}
/**
- Check whether there are available command slots.
-
- @param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.
- @param[in] Qid - Queue index
-
- @retval EFI_SUCCESS - Available command slot is found
- @retval EFI_NOT_READY - No available command slot is found
- @retval EFI_DEVICE_ERROR - Error occurred on device side.
-
-**/
-EFI_STATUS
-NvmeHasFreeCmdSlot (
- IN NVME_CONTEXT *Nvme,
- IN UINT8 Qid
- )
-{
- return TRUE;
-}
-
-/**
- Check whether all command slots are clean.
-
- @param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.
- @param[in] Qid - Queue index
-
- @retval EFI_SUCCESS - All command slots are clean
- @retval EFI_NOT_READY - Not all command slots are clean
- @retval EFI_DEVICE_ERROR - Error occurred on device side.
-
-**/
-EFI_STATUS
-NvmeIsAllCmdSlotClean (
- IN NVME_CONTEXT *Nvme,
- IN UINT8 Qid
- )
-{
- return EFI_SUCCESS;
-}
-
-/**
Waits until all NVME commands completed.
@param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.
@@ -1861,284 +1821,3 @@ NvmeControllerExit (
Nvme->State = NvmeStatusUnknown;
return Status;
}
-
-/**
- Read sector Data from the NVMe device.
-
- @param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.
- @param[in,out] Buffer - The Buffer used to store the Data read from the device.
- @param[in] Lba - The start block number.
- @param[in] Blocks - Total block number to be read.
-
- @retval EFI_SUCCESS - Datum are read from the device.
- @retval Others - Fail to read all the datum.
-
-**/
-EFI_STATUS
-NvmeReadSectors (
- IN NVME_CONTEXT *Nvme,
- IN OUT UINT64 Buffer,
- IN UINT64 Lba,
- IN UINT32 Blocks
- )
-{
- UINT32 Bytes;
- NVM_EXPRESS_PASS_THRU_COMMAND_PACKET CommandPacket;
- NVM_EXPRESS_COMMAND Command;
- NVM_EXPRESS_RESPONSE Response;
- EFI_STATUS Status;
- UINT32 BlockSize;
-
- BlockSize = Nvme->BlockSize;
- Bytes = Blocks * BlockSize;
-
- ZeroMem (&CommandPacket, sizeof(NVM_EXPRESS_PASS_THRU_COMMAND_PACKET));
- ZeroMem (&Command, sizeof(NVM_EXPRESS_COMMAND));
- ZeroMem (&Response, sizeof(NVM_EXPRESS_RESPONSE));
-
- CommandPacket.NvmeCmd = &Command;
- CommandPacket.NvmeResponse = &Response;
-
- CommandPacket.NvmeCmd->Cdw0.Opcode = NVME_IO_READ_OPC;
- CommandPacket.NvmeCmd->Cdw0.Cid = Nvme->Cid[NVME_IO_QUEUE]++;
- CommandPacket.NvmeCmd->Nsid = Nvme->Nsid;
- CommandPacket.TransferBuffer = Buffer;
-
- CommandPacket.TransferLength = Bytes;
- CommandPacket.CommandTimeout = NVME_GENERIC_TIMEOUT;
- CommandPacket.QueueId = NVME_IO_QUEUE;
-
- CommandPacket.NvmeCmd->Cdw10 = (UINT32)Lba;
- CommandPacket.NvmeCmd->Cdw11 = (UINT32)(RShiftU64 (Lba, 32));
- CommandPacket.NvmeCmd->Cdw12 = (Blocks - 1) & 0xFFFF;
-
- CommandPacket.NvmeCmd->Flags = CDW10_VALID | CDW11_VALID | CDW12_VALID;
-
- Status = NvmePassThru (
- Nvme,
- Nvme->Nsid,
- 0,
- &CommandPacket
- );
-
- return Status;
-}
-
-/**
- Write sector Data to the NVMe device.
-
- @param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.
- @param[in] Buffer - The Buffer to be written into the device.
- @param[in] Lba - The start block number.
- @param[in] Blocks - Total block number to be written.
-
- @retval EFI_SUCCESS - Datum are written into the Buffer.
- @retval Others - Fail to write all the datum.
-
-**/
-EFI_STATUS
-NvmeWriteSectors (
- IN NVME_CONTEXT *Nvme,
- IN UINT64 Buffer,
- IN UINT64 Lba,
- IN UINT32 Blocks
- )
-{
- NVM_EXPRESS_PASS_THRU_COMMAND_PACKET CommandPacket;
- NVM_EXPRESS_COMMAND Command;
- NVM_EXPRESS_RESPONSE Response;
- EFI_STATUS Status;
- UINT32 Bytes;
- UINT32 BlockSize;
-
- BlockSize = Nvme->BlockSize;
- Bytes = Blocks * BlockSize;
-
- ZeroMem (&CommandPacket, sizeof(NVM_EXPRESS_PASS_THRU_COMMAND_PACKET));
- ZeroMem (&Command, sizeof(NVM_EXPRESS_COMMAND));
- ZeroMem (&Response, sizeof(NVM_EXPRESS_RESPONSE));
-
- CommandPacket.NvmeCmd = &Command;
- CommandPacket.NvmeResponse = &Response;
-
- CommandPacket.NvmeCmd->Cdw0.Opcode = NVME_IO_WRITE_OPC;
- CommandPacket.NvmeCmd->Cdw0.Cid = Nvme->Cid[NVME_IO_QUEUE]++;
- CommandPacket.NvmeCmd->Nsid = Nvme->Nsid;
- CommandPacket.TransferBuffer = Buffer;
-
- CommandPacket.TransferLength = Bytes;
- CommandPacket.CommandTimeout = NVME_GENERIC_TIMEOUT;
- CommandPacket.QueueId = NVME_IO_QUEUE;
-
- CommandPacket.NvmeCmd->Cdw10 = (UINT32)Lba;
- CommandPacket.NvmeCmd->Cdw11 = (UINT32)(RShiftU64 (Lba, 32));
- CommandPacket.NvmeCmd->Cdw12 = (Blocks - 1) & 0xFFFF;
-
- CommandPacket.MetadataBuffer = (UINT64)(UINTN)NULL;
- CommandPacket.MetadataLength = 0;
-
- CommandPacket.NvmeCmd->Flags = CDW10_VALID | CDW11_VALID | CDW12_VALID;
-
- Status = NvmePassThru (
- Nvme,
- Nvme->Nsid,
- 0,
- &CommandPacket
- );
-
- return Status;
-}
-
-/**
- Flushes all modified Data to the device.
-
- @param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.
-
- @retval EFI_SUCCESS - Datum are written into the Buffer.
- @retval Others - Fail to write all the datum.
-
-**/
-EFI_STATUS
-NvmeFlush (
- IN NVME_CONTEXT *Nvme
- )
-{
- NVM_EXPRESS_PASS_THRU_COMMAND_PACKET CommandPacket;
- NVM_EXPRESS_COMMAND Command;
- NVM_EXPRESS_RESPONSE Response;
- EFI_STATUS Status;
-
- ZeroMem (&CommandPacket, sizeof(NVM_EXPRESS_PASS_THRU_COMMAND_PACKET));
- ZeroMem (&Command, sizeof(NVM_EXPRESS_COMMAND));
- ZeroMem (&Response, sizeof(NVM_EXPRESS_RESPONSE));
-
- CommandPacket.NvmeCmd = &Command;
- CommandPacket.NvmeResponse = &Response;
-
- CommandPacket.NvmeCmd->Cdw0.Opcode = NVME_IO_FLUSH_OPC;
- CommandPacket.NvmeCmd->Cdw0.Cid = Nvme->Cid[NVME_IO_QUEUE]++;
- CommandPacket.NvmeCmd->Nsid = Nvme->Nsid;
- CommandPacket.CommandTimeout = NVME_GENERIC_TIMEOUT;
- CommandPacket.QueueId = NVME_IO_QUEUE;
-
- Status = NvmePassThru (
- Nvme,
- Nvme->Nsid,
- 0,
- &CommandPacket
- );
- if (!EFI_ERROR (Status)) {
- Status = NvmeWaitAllComplete (Nvme, CommandPacket.QueueId);
- }
-
- return Status;
-}
-
-/**
- Read some blocks from the device.
-
- @param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.
- @param[out] Buffer - The Buffer used to store the Data read from the device.
- @param[in] Lba - The start block number.
- @param[in] Blocks - Total block number to be read.
-
- @retval EFI_SUCCESS - Datum are read from the device.
- @retval Others - Fail to read all the datum.
-
-**/
-EFI_STATUS
-NvmeRead (
- IN NVME_CONTEXT *Nvme,
- OUT UINT64 Buffer,
- IN UINT64 Lba,
- IN UINTN Blocks
- )
-{
- EFI_STATUS Status;
- UINT32 BlockSize;
- UINT32 MaxTransferBlocks;
-
- ASSERT (Blocks <= NVME_MAX_SECTORS);
- Status = EFI_SUCCESS;
- BlockSize = Nvme->BlockSize;
- if (Nvme->ControllerData->Mdts != 0) {
- MaxTransferBlocks = (1 << (Nvme->ControllerData->Mdts)) * (1 << (Nvme->Cap.Mpsmin + 12)) / BlockSize;
- } else {
- MaxTransferBlocks = 1024;
- }
-
- while (Blocks > 0) {
- if (Blocks > MaxTransferBlocks) {
- Status = NvmeReadSectors (Nvme, Buffer, Lba, MaxTransferBlocks);
-
- Blocks -= MaxTransferBlocks;
- Buffer += (MaxTransferBlocks * BlockSize);
- Lba += MaxTransferBlocks;
- } else {
- Status = NvmeReadSectors (Nvme, Buffer, Lba, (UINT32) Blocks);
- Blocks = 0;
- }
-
- if (EFI_ERROR(Status)) {
- DEBUG ((DEBUG_ERROR, "NvmeRead fail, Status = %r\n", Status));
- break;
- }
- }
-
- return Status;
-}
-
-/**
- Write some blocks to the device.
-
- @param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.
- @param[in] Buffer - The Buffer to be written into the device.
- @param[in] Lba - The start block number.
- @param[in] Blocks - Total block number to be written.
-
- @retval EFI_SUCCESS - Datum are written into the Buffer.
- @retval Others - Fail to write all the datum.
-
-**/
-EFI_STATUS
-NvmeWrite (
- IN NVME_CONTEXT *Nvme,
- IN UINT64 Buffer,
- IN UINT64 Lba,
- IN UINTN Blocks
- )
-{
- EFI_STATUS Status;
- UINT32 BlockSize;
- UINT32 MaxTransferBlocks;
-
- ASSERT (Blocks <= NVME_MAX_SECTORS);
- Status = EFI_SUCCESS;
- BlockSize = Nvme->BlockSize;
-
- if (Nvme->ControllerData->Mdts != 0) {
- MaxTransferBlocks = (1 << (Nvme->ControllerData->Mdts)) * (1 << (Nvme->Cap.Mpsmin + 12)) / BlockSize;
- } else {
- MaxTransferBlocks = 1024;
- }
-
- while (Blocks > 0) {
- if (Blocks > MaxTransferBlocks) {
- Status = NvmeWriteSectors (Nvme, Buffer, Lba, MaxTransferBlocks);
-
- Blocks -= MaxTransferBlocks;
- Buffer += (MaxTransferBlocks * BlockSize);
- Lba += MaxTransferBlocks;
- } else {
- Status = NvmeWriteSectors (Nvme, Buffer, Lba, (UINT32) Blocks);
- Blocks = 0;
- }
-
- if (EFI_ERROR(Status)) {
- DEBUG ((DEBUG_ERROR, "NvmeWrite fail, Status = %r\n", Status));
- break;
- }
- }
-
- return Status;
-}
diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalNvmeMode.h b/SecurityPkg/Tcg/Opal/OpalPassword/OpalNvmeMode.h
index 3fef3dbc1c..bd2bd5239d 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalNvmeMode.h
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalNvmeMode.h
@@ -301,134 +301,6 @@ NvmeControllerExit (
);
/**
- Check whether there are available command slots.
-
- @param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.
- @param[in] Qid - Queue index
-
- @retval EFI_SUCCESS - Available command slot is found
- @retval EFI_NOT_READY - No available command slot is found
- @retval EFI_DEVICE_ERROR - Error occurred on device side.
-
-**/
-EFI_STATUS
-NvmeHasFreeCmdSlot (
- IN NVME_CONTEXT *Nvme,
- IN UINT8 Qid
- );
-
-/**
- Check whether all command slots are clean.
-
- @param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.
- @param[in] Qid - Queue index
-
- @retval EFI_SUCCESS - All command slots are clean
- @retval EFI_NOT_READY - Not all command slots are clean
- @retval EFI_DEVICE_ERROR - Error occurred on device side.
-
-**/
-EFI_STATUS
-NvmeIsAllCmdSlotClean (
- IN NVME_CONTEXT *Nvme,
- IN UINT8 Qid
- );
-
-/**
- Read sector Data from the NVMe device.
-
- @param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.
- @param[in,out] Buffer - The Buffer used to store the Data read from the device.
- @param[in] Lba - The start block number.
- @param[in] Blocks - Total block number to be read.
-
- @retval EFI_SUCCESS - Datum are read from the device.
- @retval Others - Fail to read all the datum.
-
-**/
-EFI_STATUS
-NvmeReadSectors (
- IN NVME_CONTEXT *Nvme,
- IN OUT UINT64 Buffer,
- IN UINT64 Lba,
- IN UINT32 Blocks
- );
-
-/**
- Write sector Data to the NVMe device.
-
- @param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.
- @param[in] Buffer - The Buffer to be written into the device.
- @param[in] Lba - The start block number.
- @param[in] Blocks - Total block number to be written.
-
- @retval EFI_SUCCESS - Datum are written into the Buffer.
- @retval Others - Fail to write all the datum.
-
-**/
-EFI_STATUS
-NvmeWriteSectors (
- IN NVME_CONTEXT *Nvme,
- IN UINT64 Buffer,
- IN UINT64 Lba,
- IN UINT32 Blocks
- );
-
-/**
- Flushes all modified Data to the device.
-
- @param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.
-
- @retval EFI_SUCCESS - Datum are written into the Buffer.
- @retval Others - Fail to write all the datum.
-
-**/
-EFI_STATUS
-NvmeFlush (
- IN NVME_CONTEXT *Nvme
- );
-
-/**
- Read some blocks from the device.
-
- @param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.
- @param[out] Buffer - The Buffer used to store the Data read from the device.
- @param[in] Lba - The start block number.
- @param[in] Blocks - Total block number to be read.
-
- @retval EFI_SUCCESS - Datum are read from the device.
- @retval Others - Fail to read all the datum.
-
-**/
-EFI_STATUS
-NvmeRead (
- IN NVME_CONTEXT *Nvme,
- OUT UINT64 Buffer,
- IN UINT64 Lba,
- IN UINTN Blocks
- );
-
-/**
- Write some blocks to the device.
-
- @param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.
- @param[in] Buffer - The Buffer to be written into the device.
- @param[in] Lba - The start block number.
- @param[in] Blocks - Total block number to be written.
-
- @retval EFI_SUCCESS - Datum are written into the Buffer.
- @retval Others - Fail to write all the datum.
-
-**/
-EFI_STATUS
-NvmeWrite (
- IN NVME_CONTEXT *Nvme,
- IN UINT64 Buffer,
- IN UINT64 Lba,
- IN UINTN Blocks
- );
-
-/**
Security send and receive commands.
@param[in] Nvme - The pointer to the NVME_CONTEXT Data structure.
diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordDxe.inf b/SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordDxe.inf
index 0a82f30959..cfa55dded7 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordDxe.inf
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordDxe.inf
@@ -71,8 +71,6 @@
gEfiComponentNameProtocolGuid ## PRODUCES
gEfiComponentName2ProtocolGuid ## PRODUCES
gEfiBlockIoProtocolGuid ## CONSUMES
- gEfiPciIoProtocolGuid ## CONSUMES
- gEfiDevicePathToTextProtocolGuid ## CONSUMES
[Guids]
gEfiEndOfDxeEventGroupGuid ## CONSUMES ## Event
diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.inf b/SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.inf
index 81c57c36d2..482b7c25af 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.inf
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.inf
@@ -50,7 +50,6 @@
BaseMemoryLib
MemoryAllocationLib
TimerLib
- HobLib
LockBoxLib
TcgStorageOpalLib
Tcg2PhysicalPresenceLib
diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
index 581669a277..4477c6fcad 100644
--- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
+++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
@@ -43,7 +43,6 @@
[LibraryClasses]
BaseLib
BaseMemoryLib
- MemoryAllocationLib
PeiServicesLib
PeimEntryPoint
DebugLib
diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
index 12b7448ade..87f0492750 100644
--- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
+++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
@@ -92,7 +92,6 @@
[Protocols]
gEfiTcg2ProtocolGuid ## PRODUCES
gEfiTcg2FinalEventsTableGuid ## PRODUCES
- gEfiAcpiTableProtocolGuid ## NOTIFY
gEfiMpServiceProtocolGuid ## SOMETIMES_CONSUMES
gEfiVariableWriteArchProtocolGuid ## NOTIFY
gEfiResetNotificationProtocolGuid ## CONSUMES
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
index 0a08885786..97cec443e4 100644
--- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
+++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
@@ -59,7 +59,6 @@
TpmMeasurementLib
Tpm2CommandLib
Tcg2PhysicalPresenceLib
- IoLib
PcdLib
[Guids]
diff --git a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf
index 179426978c..2a9f61a8c2 100644
--- a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf
+++ b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf
@@ -59,7 +59,6 @@
## SOMETIMES_CONSUMES ## Variable:L"PhysicalPresence"
gEfiPhysicalPresenceGuid
- gEfiIfrTianoGuid ## SOMETIMES_PRODUCES ## GUID # HII opcode
## PRODUCES ## HII
## CONSUMES ## HII
gTcgConfigFormSetGuid
diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
index caf95ddac7..8a1e2bc76b 100644
--- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
+++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
@@ -105,7 +105,6 @@
gEfiCertPkcs7Guid ## SOMETIMES_PRODUCES ## GUID # Unique ID for the type of the certificate.
gEfiCertTypeRsa2048Sha256Guid ## SOMETIMES_CONSUMES ## GUID # Unique ID for the type of the certificate.
gEfiFileSystemVolumeLabelInfoIdGuid ## SOMETIMES_CONSUMES ## GUID # Indicate the information type
- gEfiFileInfoGuid ## SOMETIMES_CONSUMES ## GUID # Indicate the information type
gEfiCertX509Sha256Guid ## SOMETIMES_PRODUCES ## GUID # Unique ID for the type of the certificate.
gEfiCertX509Sha384Guid ## SOMETIMES_PRODUCES ## GUID # Unique ID for the type of the certificate.
@@ -114,7 +113,6 @@
[Protocols]
gEfiHiiConfigAccessProtocolGuid ## PRODUCES
gEfiDevicePathProtocolGuid ## PRODUCES
- gEfiBlockIoProtocolGuid ## SOMETIMES_CONSUMES
[Depex]
gEfiHiiConfigRoutingProtocolGuid AND