]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg: Remove dead code and inf redundant definitions.
authorChen A Chen <chen.a.chen@intel.com>
Thu, 8 Nov 2018 02:04:06 +0000 (10:04 +0800)
committerZhang, Chao B <chao.b.zhang@intel.com>
Mon, 10 Dec 2018 07:56:32 +0000 (15:56 +0800)
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>
14 files changed:
SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.inf
SecurityPkg/Tcg/Opal/OpalPassword/OpalAhciMode.c
SecurityPkg/Tcg/Opal/OpalPassword/OpalAhciMode.h
SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h
SecurityPkg/Tcg/Opal/OpalPassword/OpalHiiCallbacks.c
SecurityPkg/Tcg/Opal/OpalPassword/OpalNvmeMode.c
SecurityPkg/Tcg/Opal/OpalPassword/OpalNvmeMode.h
SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordDxe.inf
SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.inf
SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf
SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDxe.inf
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf

index 6f9a77b868c9058f1420ca24603fd06f48fbe006..a17fa4046d45d1e6dc47a134c90e954a1d700b07 100644 (file)
@@ -43,7 +43,6 @@
   UefiDriverEntryPoint\r
   UefiBootServicesTableLib\r
   UefiRuntimeServicesTableLib\r
-  ReportStatusCodeLib\r
   DebugLib\r
   UefiLib\r
   MemoryAllocationLib\r
index d51865380ff26ea75939c86ffc50e18b42551a88..0c4edd5346c456cfc7e89eb3f2ee1c6368a9117f 100644 (file)
@@ -969,58 +969,6 @@ AhciReset (
 \r
 }\r
 \r
-/**\r
-  Send Buffer cmd to specific device.\r
-\r
-  @param[in]  AhciContext         The pointer to the AHCI_CONTEXT.\r
-  @param[in]  Port                The port number of attached ATA device.\r
-  @param[in]  PortMultiplier      The port number of port multiplier of attached ATA device.\r
-  @param[in, out]  Buffer         The Data Buffer to store IDENTIFY PACKET Data.\r
-\r
-  @retval EFI_DEVICE_ERROR    The cmd abort with error occurs.\r
-  @retval EFI_TIMEOUT         The operation is time out.\r
-  @retval EFI_UNSUPPORTED     The device is not ready for executing.\r
-  @retval EFI_SUCCESS         The cmd executes successfully.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-AhciIdentify (\r
-  IN AHCI_CONTEXT             *AhciContext,\r
-  IN UINT8                    Port,\r
-  IN UINT8                    PortMultiplier,\r
-  IN OUT ATA_IDENTIFY_DATA    *Buffer\r
-  )\r
-{\r
-  EFI_STATUS                   Status;\r
-  EFI_ATA_COMMAND_BLOCK        AtaCommandBlock;\r
-\r
-  if (AhciContext == NULL || Buffer == NULL) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-\r
-  ZeroMem (&AtaCommandBlock, sizeof (EFI_ATA_COMMAND_BLOCK));\r
-\r
-  AtaCommandBlock.AtaCommand     = ATA_CMD_IDENTIFY_DRIVE;\r
-  AtaCommandBlock.AtaSectorCount = 1;\r
-\r
-  Status = AhciPioTransfer (\r
-             AhciContext,\r
-             Port,\r
-             PortMultiplier,\r
-             NULL,\r
-             0,\r
-             TRUE,\r
-             &AtaCommandBlock,\r
-             NULL,\r
-             Buffer,\r
-             sizeof (ATA_IDENTIFY_DATA),\r
-             ATA_TIMEOUT\r
-             );\r
-\r
-  return Status;\r
-}\r
-\r
 /**\r
   Allocate transfer-related data struct which is used at AHCI mode.\r
 \r
index 037f81ac24a7e26c8906d2e856d4875f6a1fa8a8..2076b0411b8caf197e9423d09de63dc165b1e5a9 100644 (file)
@@ -293,29 +293,6 @@ typedef struct {
   UINT32                    AhciBar;\r
 } AHCI_CONTEXT;\r
 \r
-/**\r
-  Send Buffer cmd to specific device.\r
-\r
-  @param  AhciContext         The pointer to the AHCI_CONTEXT.\r
-  @param  Port                The number of port.\r
-  @param  PortMultiplier      The timeout Value of stop.\r
-  @param  Buffer              The Data Buffer to store IDENTIFY PACKET Data.\r
-\r
-  @retval EFI_DEVICE_ERROR    The cmd abort with error occurs.\r
-  @retval EFI_TIMEOUT         The operation is time out.\r
-  @retval EFI_UNSUPPORTED     The device is not ready for executing.\r
-  @retval EFI_SUCCESS         The cmd executes successfully.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-AhciIdentify (\r
-  IN AHCI_CONTEXT             *AhciContext,\r
-  IN UINT8                    Port,\r
-  IN UINT8                    PortMultiplier,\r
-  IN OUT ATA_IDENTIFY_DATA    *Buffer\r
-  );\r
-\r
 /**\r
   Allocate transfer-related data struct which is used at AHCI mode.\r
 \r
index a4bb19ad6034403d67a7d5e2c2776e2bbec5147e..8b368fe995ce0473747e7c56f1cf6fdfffa7cd00 100644 (file)
@@ -285,17 +285,6 @@ OpalHiiAddPackages(
   VOID\r
   );\r
 \r
-/**\r
-  Check whether enable feature or not.\r
-\r
-  @retval  Return the disk number.\r
-\r
-**/\r
-UINT8\r
-HiiGetNumConfigRequiredOpalDisksCB(\r
-  VOID\r
-  );\r
-\r
 /**\r
   Returns the driver name.\r
 \r
index b07e38c1449d64569a0f5019b5d775028e8eee6d..31e1aa2240bbe8ceae2289416e9067ccb2741344 100644 (file)
@@ -15,56 +15,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "OpalHii.h"\r
 \r
-/**\r
-  Get Opal var name.\r
-  The return Value must be freed by caller if not NULL\r
-\r
-  @param      OpalDisk       The disk.\r
-  @param      Prefix         The prefix string.\r
-\r
-  @retval  The var name string.\r
-\r
-**/\r
-CHAR16*\r
-OpalDriverGetOpalVarName(\r
-  OPAL_DISK        *OpalDisk,\r
-  const CHAR16     *Prefix\r
-  )\r
-{\r
-  OPAL_DRIVER_DEVICE*          Dev;\r
-  UINTN                        PrefixLen;\r
-  UINTN                        NameLen;\r
-  UINTN                        VarNameLen;\r
-  CHAR16*                      VarName;\r
-\r
-  Dev = DRIVER_DEVICE_FROM_OPALDISK(OpalDisk);\r
-  if (Dev == NULL) {\r
-    return NULL;\r
-  }\r
-\r
-  PrefixLen = StrLen(Prefix);\r
-\r
-  NameLen = 0;\r
-  if (Dev->Name16 != NULL) {\r
-    NameLen = StrLen(Dev->Name16);\r
-  }\r
-\r
-  VarNameLen = PrefixLen + NameLen;\r
-\r
-  VarName = (CHAR16*)AllocateZeroPool((VarNameLen + 1) * sizeof(CHAR16));\r
-  if (VarName == NULL) {\r
-    return NULL;\r
-  }\r
-\r
-  CopyMem(VarName, Prefix, PrefixLen * sizeof(CHAR16));\r
-  if (Dev->Name16 != NULL) {\r
-    CopyMem(VarName + PrefixLen, Dev->Name16, NameLen * sizeof(CHAR16));\r
-  }\r
-  VarName[VarNameLen] = 0;\r
-\r
-  return VarName;\r
-}\r
-\r
 /**\r
   Get the driver image handle.\r
 \r
@@ -79,43 +29,6 @@ HiiGetDriverImageHandleCB(
   return gImageHandle;\r
 }\r
 \r
-/**\r
-  Check whether enable feature or not.\r
-\r
-  @retval  Return the disk number.\r
-\r
-**/\r
-UINT8\r
-HiiGetNumConfigRequiredOpalDisksCB(\r
-  VOID\r
-  )\r
-{\r
-  UINT8                        NumDisks;\r
-  UINT8                        NumLockedOpalDisks;\r
-  OPAL_DISK                    *OpalDisk;\r
-  UINT8                        Index;\r
-\r
-  NumLockedOpalDisks = 0;\r
-\r
-  NumDisks = GetDeviceCount();\r
-\r
-  for (Index = 0; Index < NumDisks; Index++) {\r
-    OpalDisk = HiiGetOpalDiskCB(Index);\r
-\r
-    if (OpalDisk != NULL) {\r
-      if (!OpalFeatureEnabled (&OpalDisk->SupportedAttributes, &OpalDisk->LockingFeature)) {\r
-        DEBUG ((DEBUG_INFO, "Ignoring disk %u because feature is disabled or health has already been inspected\n", Index));\r
-      } else if (OpalDeviceLocked (&OpalDisk->SupportedAttributes, &OpalDisk->LockingFeature)) {\r
-        NumLockedOpalDisks++;\r
-      }\r
-    }\r
-  }\r
-\r
-  return NumLockedOpalDisks;\r
-}\r
-\r
-\r
-\r
 /**\r
   Returns the opaque pointer to a physical disk context.\r
 \r
index 7657bb26e23c88df59bd3d4efe043e24946ffc60..01c316d597ea3b61b3bba7862399f6c3d187c0fd 100644 (file)
@@ -793,46 +793,6 @@ NvmeCreatePrpList (
   return PrpListPhyAddr;\r
 }\r
 \r
-/**\r
-  Check whether there are available command slots.\r
-\r
-  @param[in] Nvme                   - The pointer to the NVME_CONTEXT Data structure.\r
-  @param[in] Qid                    - Queue index\r
-\r
-  @retval EFI_SUCCESS               - Available command slot is found\r
-  @retval EFI_NOT_READY             - No available command slot is found\r
-  @retval EFI_DEVICE_ERROR          - Error occurred on device side.\r
-\r
-**/\r
-EFI_STATUS\r
-NvmeHasFreeCmdSlot (\r
-  IN NVME_CONTEXT       *Nvme,\r
-  IN UINT8              Qid\r
-  )\r
-{\r
-  return TRUE;\r
-}\r
-\r
-/**\r
-  Check whether all command slots are clean.\r
-\r
-  @param[in] Nvme                   - The pointer to the NVME_CONTEXT Data structure.\r
-  @param[in] Qid                    - Queue index\r
-\r
-  @retval EFI_SUCCESS               - All command slots are clean\r
-  @retval EFI_NOT_READY             - Not all command slots are clean\r
-  @retval EFI_DEVICE_ERROR          - Error occurred on device side.\r
-\r
-**/\r
-EFI_STATUS\r
-NvmeIsAllCmdSlotClean (\r
-  IN NVME_CONTEXT       *Nvme,\r
-  IN UINT8              Qid\r
-  )\r
-{\r
-  return EFI_SUCCESS;\r
-}\r
-\r
 /**\r
   Waits until all NVME commands completed.\r
 \r
@@ -1861,284 +1821,3 @@ NvmeControllerExit (
   Nvme->State = NvmeStatusUnknown;\r
   return Status;\r
 }\r
-\r
-/**\r
-  Read sector Data from the NVMe device.\r
-\r
-  @param[in] Nvme                   - The pointer to the NVME_CONTEXT Data structure.\r
-  @param[in,out] Buffer             - The Buffer used to store the Data read from the device.\r
-  @param[in] Lba                    - The start block number.\r
-  @param[in] Blocks                 - Total block number to be read.\r
-\r
-  @retval EFI_SUCCESS               - Datum are read from the device.\r
-  @retval Others                    - Fail to read all the datum.\r
-\r
-**/\r
-EFI_STATUS\r
-NvmeReadSectors (\r
-  IN NVME_CONTEXT                          *Nvme,\r
-  IN OUT UINT64                            Buffer,\r
-  IN UINT64                                Lba,\r
-  IN UINT32                                Blocks\r
-  )\r
-{\r
-  UINT32                                   Bytes;\r
-  NVM_EXPRESS_PASS_THRU_COMMAND_PACKET     CommandPacket;\r
-  NVM_EXPRESS_COMMAND                      Command;\r
-  NVM_EXPRESS_RESPONSE                     Response;\r
-  EFI_STATUS                               Status;\r
-  UINT32                                   BlockSize;\r
-\r
-  BlockSize  = Nvme->BlockSize;\r
-  Bytes      = Blocks * BlockSize;\r
-\r
-  ZeroMem (&CommandPacket, sizeof(NVM_EXPRESS_PASS_THRU_COMMAND_PACKET));\r
-  ZeroMem (&Command, sizeof(NVM_EXPRESS_COMMAND));\r
-  ZeroMem (&Response, sizeof(NVM_EXPRESS_RESPONSE));\r
-\r
-  CommandPacket.NvmeCmd      = &Command;\r
-  CommandPacket.NvmeResponse = &Response;\r
-\r
-  CommandPacket.NvmeCmd->Cdw0.Opcode = NVME_IO_READ_OPC;\r
-  CommandPacket.NvmeCmd->Cdw0.Cid    = Nvme->Cid[NVME_IO_QUEUE]++;\r
-  CommandPacket.NvmeCmd->Nsid        = Nvme->Nsid;\r
-  CommandPacket.TransferBuffer       = Buffer;\r
-\r
-  CommandPacket.TransferLength = Bytes;\r
-  CommandPacket.CommandTimeout = NVME_GENERIC_TIMEOUT;\r
-  CommandPacket.QueueId        = NVME_IO_QUEUE;\r
-\r
-  CommandPacket.NvmeCmd->Cdw10 = (UINT32)Lba;\r
-  CommandPacket.NvmeCmd->Cdw11 = (UINT32)(RShiftU64 (Lba, 32));\r
-  CommandPacket.NvmeCmd->Cdw12 = (Blocks - 1) & 0xFFFF;\r
-\r
-  CommandPacket.NvmeCmd->Flags = CDW10_VALID | CDW11_VALID | CDW12_VALID;\r
-\r
-  Status = NvmePassThru (\r
-              Nvme,\r
-              Nvme->Nsid,\r
-              0,\r
-              &CommandPacket\r
-              );\r
-\r
-  return Status;\r
-}\r
-\r
-/**\r
-  Write sector Data to the NVMe device.\r
-\r
-  @param[in] Nvme                   - The pointer to the NVME_CONTEXT Data structure.\r
-  @param[in] Buffer                 - The Buffer to be written into the device.\r
-  @param[in] Lba                    - The start block number.\r
-  @param[in] Blocks                 - Total block number to be written.\r
-\r
-  @retval EFI_SUCCESS               - Datum are written into the Buffer.\r
-  @retval Others                    - Fail to write all the datum.\r
-\r
-**/\r
-EFI_STATUS\r
-NvmeWriteSectors (\r
-  IN NVME_CONTEXT                          *Nvme,\r
-  IN UINT64                                Buffer,\r
-  IN UINT64                                Lba,\r
-  IN UINT32                                Blocks\r
-  )\r
-{\r
-  NVM_EXPRESS_PASS_THRU_COMMAND_PACKET     CommandPacket;\r
-  NVM_EXPRESS_COMMAND                      Command;\r
-  NVM_EXPRESS_RESPONSE                     Response;\r
-  EFI_STATUS                               Status;\r
-  UINT32                                   Bytes;\r
-  UINT32                                   BlockSize;\r
-\r
-  BlockSize  = Nvme->BlockSize;\r
-  Bytes      = Blocks * BlockSize;\r
-\r
-  ZeroMem (&CommandPacket, sizeof(NVM_EXPRESS_PASS_THRU_COMMAND_PACKET));\r
-  ZeroMem (&Command, sizeof(NVM_EXPRESS_COMMAND));\r
-  ZeroMem (&Response, sizeof(NVM_EXPRESS_RESPONSE));\r
-\r
-  CommandPacket.NvmeCmd      = &Command;\r
-  CommandPacket.NvmeResponse = &Response;\r
-\r
-  CommandPacket.NvmeCmd->Cdw0.Opcode = NVME_IO_WRITE_OPC;\r
-  CommandPacket.NvmeCmd->Cdw0.Cid    = Nvme->Cid[NVME_IO_QUEUE]++;\r
-  CommandPacket.NvmeCmd->Nsid  = Nvme->Nsid;\r
-  CommandPacket.TransferBuffer = Buffer;\r
-\r
-  CommandPacket.TransferLength = Bytes;\r
-  CommandPacket.CommandTimeout = NVME_GENERIC_TIMEOUT;\r
-  CommandPacket.QueueId        = NVME_IO_QUEUE;\r
-\r
-  CommandPacket.NvmeCmd->Cdw10 = (UINT32)Lba;\r
-  CommandPacket.NvmeCmd->Cdw11 = (UINT32)(RShiftU64 (Lba, 32));\r
-  CommandPacket.NvmeCmd->Cdw12 = (Blocks - 1) & 0xFFFF;\r
-\r
-  CommandPacket.MetadataBuffer = (UINT64)(UINTN)NULL;\r
-  CommandPacket.MetadataLength = 0;\r
-\r
-  CommandPacket.NvmeCmd->Flags = CDW10_VALID | CDW11_VALID | CDW12_VALID;\r
-\r
-  Status = NvmePassThru (\r
-              Nvme,\r
-              Nvme->Nsid,\r
-              0,\r
-              &CommandPacket\r
-              );\r
-\r
-  return Status;\r
-}\r
-\r
-/**\r
-  Flushes all modified Data to the device.\r
-\r
-  @param[in] Nvme                   - The pointer to the NVME_CONTEXT Data structure.\r
-\r
-  @retval EFI_SUCCESS               - Datum are written into the Buffer.\r
-  @retval Others                    - Fail to write all the datum.\r
-\r
-**/\r
-EFI_STATUS\r
-NvmeFlush (\r
-  IN NVME_CONTEXT                          *Nvme\r
-  )\r
-{\r
-  NVM_EXPRESS_PASS_THRU_COMMAND_PACKET     CommandPacket;\r
-  NVM_EXPRESS_COMMAND                      Command;\r
-  NVM_EXPRESS_RESPONSE                     Response;\r
-  EFI_STATUS                               Status;\r
-\r
-  ZeroMem (&CommandPacket, sizeof(NVM_EXPRESS_PASS_THRU_COMMAND_PACKET));\r
-  ZeroMem (&Command, sizeof(NVM_EXPRESS_COMMAND));\r
-  ZeroMem (&Response, sizeof(NVM_EXPRESS_RESPONSE));\r
-\r
-  CommandPacket.NvmeCmd      = &Command;\r
-  CommandPacket.NvmeResponse = &Response;\r
-\r
-  CommandPacket.NvmeCmd->Cdw0.Opcode = NVME_IO_FLUSH_OPC;\r
-  CommandPacket.NvmeCmd->Cdw0.Cid    = Nvme->Cid[NVME_IO_QUEUE]++;\r
-  CommandPacket.NvmeCmd->Nsid  = Nvme->Nsid;\r
-  CommandPacket.CommandTimeout = NVME_GENERIC_TIMEOUT;\r
-  CommandPacket.QueueId        = NVME_IO_QUEUE;\r
-\r
-  Status = NvmePassThru (\r
-              Nvme,\r
-              Nvme->Nsid,\r
-              0,\r
-              &CommandPacket\r
-              );\r
-  if (!EFI_ERROR (Status)) {\r
-    Status = NvmeWaitAllComplete (Nvme, CommandPacket.QueueId);\r
-  }\r
-\r
-  return Status;\r
-}\r
-\r
-/**\r
-  Read some blocks from the device.\r
-\r
-  @param[in] Nvme                   - The pointer to the NVME_CONTEXT Data structure.\r
-  @param[out] Buffer                - The Buffer used to store the Data read from the device.\r
-  @param[in] Lba                    - The start block number.\r
-  @param[in] Blocks                 - Total block number to be read.\r
-\r
-  @retval EFI_SUCCESS               - Datum are read from the device.\r
-  @retval Others                    - Fail to read all the datum.\r
-\r
-**/\r
-EFI_STATUS\r
-NvmeRead (\r
-  IN NVME_CONTEXT                  *Nvme,\r
-  OUT UINT64                       Buffer,\r
-  IN UINT64                        Lba,\r
-  IN UINTN                         Blocks\r
-  )\r
-{\r
-  EFI_STATUS                       Status;\r
-  UINT32                           BlockSize;\r
-  UINT32                           MaxTransferBlocks;\r
-\r
-  ASSERT (Blocks <= NVME_MAX_SECTORS);\r
-  Status        = EFI_SUCCESS;\r
-  BlockSize     = Nvme->BlockSize;\r
-  if (Nvme->ControllerData->Mdts != 0) {\r
-    MaxTransferBlocks = (1 << (Nvme->ControllerData->Mdts)) * (1 << (Nvme->Cap.Mpsmin + 12)) / BlockSize;\r
-  } else {\r
-    MaxTransferBlocks = 1024;\r
-  }\r
-\r
-  while (Blocks > 0) {\r
-    if (Blocks > MaxTransferBlocks) {\r
-      Status = NvmeReadSectors (Nvme, Buffer, Lba, MaxTransferBlocks);\r
-\r
-      Blocks -= MaxTransferBlocks;\r
-      Buffer += (MaxTransferBlocks * BlockSize);\r
-      Lba    += MaxTransferBlocks;\r
-    } else {\r
-      Status = NvmeReadSectors (Nvme, Buffer, Lba, (UINT32) Blocks);\r
-      Blocks = 0;\r
-    }\r
-\r
-    if (EFI_ERROR(Status)) {\r
-      DEBUG ((DEBUG_ERROR, "NvmeRead fail, Status = %r\n", Status));\r
-      break;\r
-    }\r
-  }\r
-\r
-  return Status;\r
-}\r
-\r
-/**\r
-  Write some blocks to the device.\r
-\r
-  @param[in] Nvme                   - The pointer to the NVME_CONTEXT Data structure.\r
-  @param[in] Buffer                 - The Buffer to be written into the device.\r
-  @param[in] Lba                    - The start block number.\r
-  @param[in] Blocks                 - Total block number to be written.\r
-\r
-  @retval EFI_SUCCESS               - Datum are written into the Buffer.\r
-  @retval Others                    - Fail to write all the datum.\r
-\r
-**/\r
-EFI_STATUS\r
-NvmeWrite (\r
-  IN NVME_CONTEXT                  *Nvme,\r
-  IN UINT64                        Buffer,\r
-  IN UINT64                        Lba,\r
-  IN UINTN                         Blocks\r
-  )\r
-{\r
-  EFI_STATUS                       Status;\r
-  UINT32                           BlockSize;\r
-  UINT32                           MaxTransferBlocks;\r
-\r
-  ASSERT (Blocks <= NVME_MAX_SECTORS);\r
-  Status        = EFI_SUCCESS;\r
-  BlockSize     = Nvme->BlockSize;\r
-\r
-  if (Nvme->ControllerData->Mdts != 0) {\r
-    MaxTransferBlocks = (1 << (Nvme->ControllerData->Mdts)) * (1 << (Nvme->Cap.Mpsmin + 12)) / BlockSize;\r
-  } else {\r
-    MaxTransferBlocks = 1024;\r
-  }\r
-\r
-  while (Blocks > 0) {\r
-    if (Blocks > MaxTransferBlocks) {\r
-      Status = NvmeWriteSectors (Nvme, Buffer, Lba, MaxTransferBlocks);\r
-\r
-      Blocks -= MaxTransferBlocks;\r
-      Buffer += (MaxTransferBlocks * BlockSize);\r
-      Lba    += MaxTransferBlocks;\r
-    } else {\r
-      Status = NvmeWriteSectors (Nvme, Buffer, Lba, (UINT32) Blocks);\r
-      Blocks = 0;\r
-    }\r
-\r
-    if (EFI_ERROR(Status)) {\r
-      DEBUG ((DEBUG_ERROR, "NvmeWrite fail, Status = %r\n", Status));\r
-      break;\r
-    }\r
-  }\r
-\r
-  return Status;\r
-}\r
index 3fef3dbc1c0d1bc9fc82691a865fe32db5412d2e..bd2bd5239d60a917764c2e9e0b35ba238b57facc 100644 (file)
@@ -300,134 +300,6 @@ NvmeControllerExit (
   IN NVME_CONTEXT       *Nvme\r
   );\r
 \r
-/**\r
-  Check whether there are available command slots.\r
-\r
-  @param[in] Nvme                   - The pointer to the NVME_CONTEXT Data structure.\r
-  @param[in] Qid                    - Queue index\r
-\r
-  @retval EFI_SUCCESS               - Available command slot is found\r
-  @retval EFI_NOT_READY             - No available command slot is found\r
-  @retval EFI_DEVICE_ERROR          - Error occurred on device side.\r
-\r
-**/\r
-EFI_STATUS\r
-NvmeHasFreeCmdSlot (\r
-  IN NVME_CONTEXT       *Nvme,\r
-  IN UINT8              Qid\r
-  );\r
-\r
-/**\r
-  Check whether all command slots are clean.\r
-\r
-  @param[in] Nvme                   - The pointer to the NVME_CONTEXT Data structure.\r
-  @param[in] Qid                    - Queue index\r
-\r
-  @retval EFI_SUCCESS               - All command slots are clean\r
-  @retval EFI_NOT_READY             - Not all command slots are clean\r
-  @retval EFI_DEVICE_ERROR          - Error occurred on device side.\r
-\r
-**/\r
-EFI_STATUS\r
-NvmeIsAllCmdSlotClean (\r
-  IN NVME_CONTEXT       *Nvme,\r
-  IN UINT8              Qid\r
-  );\r
-\r
-/**\r
-  Read sector Data from the NVMe device.\r
-\r
-  @param[in] Nvme                   - The pointer to the NVME_CONTEXT Data structure.\r
-  @param[in,out] Buffer             - The Buffer used to store the Data read from the device.\r
-  @param[in] Lba                    - The start block number.\r
-  @param[in] Blocks                 - Total block number to be read.\r
-\r
-  @retval EFI_SUCCESS               - Datum are read from the device.\r
-  @retval Others                    - Fail to read all the datum.\r
-\r
-**/\r
-EFI_STATUS\r
-NvmeReadSectors (\r
-  IN NVME_CONTEXT                          *Nvme,\r
-  IN OUT UINT64                            Buffer,\r
-  IN UINT64                                Lba,\r
-  IN UINT32                                Blocks\r
-  );\r
-\r
-/**\r
-  Write sector Data to the NVMe device.\r
-\r
-  @param[in] Nvme                   - The pointer to the NVME_CONTEXT Data structure.\r
-  @param[in] Buffer                 - The Buffer to be written into the device.\r
-  @param[in] Lba                    - The start block number.\r
-  @param[in] Blocks                 - Total block number to be written.\r
-\r
-  @retval EFI_SUCCESS               - Datum are written into the Buffer.\r
-  @retval Others                    - Fail to write all the datum.\r
-\r
-**/\r
-EFI_STATUS\r
-NvmeWriteSectors (\r
-  IN NVME_CONTEXT                          *Nvme,\r
-  IN UINT64                                Buffer,\r
-  IN UINT64                                Lba,\r
-  IN UINT32                                Blocks\r
-  );\r
-\r
-/**\r
-  Flushes all modified Data to the device.\r
-\r
-  @param[in] Nvme                   - The pointer to the NVME_CONTEXT Data structure.\r
-\r
-  @retval EFI_SUCCESS               - Datum are written into the Buffer.\r
-  @retval Others                    - Fail to write all the datum.\r
-\r
-**/\r
-EFI_STATUS\r
-NvmeFlush (\r
-  IN NVME_CONTEXT                          *Nvme\r
-  );\r
-\r
-/**\r
-  Read some blocks from the device.\r
-\r
-  @param[in] Nvme                   - The pointer to the NVME_CONTEXT Data structure.\r
-  @param[out] Buffer                - The Buffer used to store the Data read from the device.\r
-  @param[in] Lba                    - The start block number.\r
-  @param[in] Blocks                 - Total block number to be read.\r
-\r
-  @retval EFI_SUCCESS               - Datum are read from the device.\r
-  @retval Others                    - Fail to read all the datum.\r
-\r
-**/\r
-EFI_STATUS\r
-NvmeRead (\r
-  IN NVME_CONTEXT                  *Nvme,\r
-  OUT UINT64                       Buffer,\r
-  IN UINT64                        Lba,\r
-  IN UINTN                         Blocks\r
-  );\r
-\r
-/**\r
-  Write some blocks to the device.\r
-\r
-  @param[in] Nvme                   - The pointer to the NVME_CONTEXT Data structure.\r
-  @param[in] Buffer                 - The Buffer to be written into the device.\r
-  @param[in] Lba                    - The start block number.\r
-  @param[in] Blocks                 - Total block number to be written.\r
-\r
-  @retval EFI_SUCCESS               - Datum are written into the Buffer.\r
-  @retval Others                    - Fail to write all the datum.\r
-\r
-**/\r
-EFI_STATUS\r
-NvmeWrite (\r
-  IN NVME_CONTEXT                  *Nvme,\r
-  IN UINT64                        Buffer,\r
-  IN UINT64                        Lba,\r
-  IN UINTN                         Blocks\r
-  );\r
-\r
 /**\r
   Security send and receive commands.\r
 \r
index 0a82f30959bbcaab5b73575374e4c9f530174d0b..cfa55dded7871b71e3c17a36404aaee7fe5b22fc 100644 (file)
@@ -71,8 +71,6 @@
   gEfiComponentNameProtocolGuid                 ## PRODUCES\r
   gEfiComponentName2ProtocolGuid                ## PRODUCES\r
   gEfiBlockIoProtocolGuid                       ## CONSUMES\r
-  gEfiPciIoProtocolGuid                         ## CONSUMES\r
-  gEfiDevicePathToTextProtocolGuid              ## CONSUMES\r
 \r
 [Guids]\r
   gEfiEndOfDxeEventGroupGuid                    ## CONSUMES             ## Event\r
index 81c57c36d2aa1352f1a7f9b692fb3228e3f773a0..482b7c25afa1ffea995d85902adb6758e1af7665 100644 (file)
@@ -50,7 +50,6 @@
   BaseMemoryLib\r
   MemoryAllocationLib\r
   TimerLib\r
-  HobLib\r
   LockBoxLib\r
   TcgStorageOpalLib\r
   Tcg2PhysicalPresenceLib\r
index 581669a277faa1f48116f9b2d2e208e80a092388..4477c6fcad1a17cb10ecbd6f41848c13b6119a17 100644 (file)
@@ -43,7 +43,6 @@
 [LibraryClasses]\r
   BaseLib\r
   BaseMemoryLib\r
-  MemoryAllocationLib\r
   PeiServicesLib\r
   PeimEntryPoint\r
   DebugLib\r
index 12b7448ade8216ebac6a3a88b88bf61ac6e17ecf..87f0492750670ae9961ce1a629671fb0e97e416b 100644 (file)
@@ -92,7 +92,6 @@
 [Protocols]\r
   gEfiTcg2ProtocolGuid                               ## PRODUCES\r
   gEfiTcg2FinalEventsTableGuid                       ## PRODUCES\r
-  gEfiAcpiTableProtocolGuid                          ## NOTIFY\r
   gEfiMpServiceProtocolGuid                          ## SOMETIMES_CONSUMES\r
   gEfiVariableWriteArchProtocolGuid                  ## NOTIFY\r
   gEfiResetNotificationProtocolGuid                  ## CONSUMES\r
index 0a0888578697b83c45f65f86e064c3fb1b2eb6c8..97cec443e4448ccee0ed10a0f10c68f184204c32 100644 (file)
@@ -59,7 +59,6 @@
   TpmMeasurementLib\r
   Tpm2CommandLib\r
   Tcg2PhysicalPresenceLib\r
-  IoLib\r
   PcdLib\r
 \r
 [Guids]\r
index 179426978ce43e61e2f0d383966acaf0beec79ff..2a9f61a8c2de4b3229dfe7a53e1dae3e63c64f2f 100644 (file)
@@ -59,7 +59,6 @@
   ## SOMETIMES_CONSUMES ## Variable:L"PhysicalPresence"\r
   gEfiPhysicalPresenceGuid\r
 \r
-  gEfiIfrTianoGuid                                    ## SOMETIMES_PRODUCES  ## GUID       # HII opcode\r
   ## PRODUCES            ## HII\r
   ## CONSUMES            ## HII\r
   gTcgConfigFormSetGuid\r
index caf95ddac7d95ba64df49b06790452d328e4c479..8a1e2bc76b3ce8ca21a0d306c1358e0687f53bf1 100644 (file)
   gEfiCertPkcs7Guid                             ## SOMETIMES_PRODUCES  ## GUID  # Unique ID for the type of the certificate.\r
   gEfiCertTypeRsa2048Sha256Guid                 ## SOMETIMES_CONSUMES  ## GUID  # Unique ID for the type of the certificate.\r
   gEfiFileSystemVolumeLabelInfoIdGuid           ## SOMETIMES_CONSUMES  ## GUID  # Indicate the information type\r
-  gEfiFileInfoGuid                              ## SOMETIMES_CONSUMES  ## GUID  # Indicate the information type\r
 \r
   gEfiCertX509Sha256Guid                        ## SOMETIMES_PRODUCES  ## GUID  # Unique ID for the type of the certificate.\r
   gEfiCertX509Sha384Guid                        ## SOMETIMES_PRODUCES  ## GUID  # Unique ID for the type of the certificate.\r
 [Protocols]\r
   gEfiHiiConfigAccessProtocolGuid               ## PRODUCES\r
   gEfiDevicePathProtocolGuid                    ## PRODUCES\r
-  gEfiBlockIoProtocolGuid                       ## SOMETIMES_CONSUMES\r
 \r
 [Depex]\r
   gEfiHiiConfigRoutingProtocolGuid  AND\r