UefiCpuPkg: Remove redundant library classes, Ppis and GUIDs
authorshenglei <shenglei.zhang@intel.com>
Tue, 18 Sep 2018 08:28:13 +0000 (16:28 +0800)
committerEric Dong <eric.dong@intel.com>
Fri, 21 Sep 2018 06:42:53 +0000 (14:42 +0800)
Some redundant library classes Ppis and GUIDs
have been removed in inf, .c and .h files.

v2:
1.Remove ReadOnlyVariable2.h in S3Resume.c which should be
  deleted in last version in which gEfiPeiReadOnlyVariable2PpiGuid
  was removed.
2.Remove the library class BaseLib in CpuPageTable.c
  which is included elsewhere.
3.Add library classes in SecCore.inf which are removed
  at last version.
  They are DebugAgentLib and CpuExceptionHandlerLib.
4.Add two Ppis in SecCore.inf which are removed
  at last version.
  They are gEfiSecPlatformInformationPpiGuid and
  gEfiSecPlatformInformation2PpiGuid.

https://bugzilla.tianocore.org/show_bug.cgi?id=1043
https://bugzilla.tianocore.org/show_bug.cgi?id=1013
https://bugzilla.tianocore.org/show_bug.cgi?id=1032
https://bugzilla.tianocore.org/show_bug.cgi?id=1016

Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: shenglei <shenglei.zhang@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
UefiCpuPkg/CpuDxe/CpuPageTable.c
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfileInternal.h
UefiCpuPkg/SecCore/FindPeiCore.c
UefiCpuPkg/SecCore/SecCore.inf
UefiCpuPkg/SecCore/SecMain.h
UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume2Pei.inf

index 0a980b9..33e8ee2 100644 (file)
 \r
 #include <Base.h>\r
 #include <Uefi.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/CpuLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/PeCoffGetEntryPointLib.h>\r
 #include <Library/SerialPortLib.h>\r
 #include <Library/SynchronizationLib.h>\r
 #include <Library/PrintLib.h>\r
-#include <Protocol/MpService.h>\r
 #include <Protocol/SmmBase2.h>\r
 #include <Register/Cpuid.h>\r
 #include <Register/Msr.h>\r
index e3c7cff..8c7f499 100644 (file)
@@ -38,7 +38,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/DebugLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/PcdLib.h>\r
-#include <Library/CacheMaintenanceLib.h>\r
 #include <Library/MtrrLib.h>\r
 #include <Library/SmmCpuPlatformHookLib.h>\r
 #include <Library/SmmServicesTableLib.h>\r
index a7fb7b0..95a4511 100644 (file)
@@ -77,7 +77,6 @@
 [LibraryClasses]\r
   UefiDriverEntryPoint\r
   UefiRuntimeServicesTableLib\r
-  CacheMaintenanceLib\r
   PcdLib\r
   DebugLib\r
   BaseLib\r
 \r
 [Guids]\r
   gEfiAcpiVariableGuid                     ## SOMETIMES_CONSUMES ## HOB # it is used for S3 boot.\r
-  gEfiGlobalVariableGuid                   ## SOMETIMES_PRODUCES ## Variable:L"SmmProfileData"\r
   gEfiAcpi20TableGuid                      ## SOMETIMES_CONSUMES ## SystemTable\r
   gEfiAcpi10TableGuid                      ## SOMETIMES_CONSUMES ## SystemTable\r
   gEdkiiPiSmmMemoryAttributesTableGuid     ## CONSUMES ## SystemTable\r
index bacb2f8..18a7fe3 100644 (file)
@@ -15,7 +15,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef _SMM_PROFILE_INTERNAL_H_\r
 #define _SMM_PROFILE_INTERNAL_H_\r
 \r
-#include <Guid/GlobalVariable.h>\r
 #include <Guid/Acpi.h>\r
 #include <Protocol/SmmReadyToLock.h>\r
 #include <Library/UefiRuntimeServicesTableLib.h>\r
index 60ccaa9..bb9c434 100644 (file)
@@ -13,8 +13,6 @@
 **/\r
 \r
 #include <PiPei.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/PeCoffGetEntryPointLib.h>\r
 \r
 #include "SecMain.h"\r
 \r
index 7bcd4f8..b228610 100644 (file)
@@ -50,7 +50,6 @@
 [LibraryClasses]\r
   BaseMemoryLib\r
   DebugLib\r
-  BaseLib\r
   PlatformSecLib\r
   PcdLib\r
   DebugAgentLib\r
@@ -71,9 +70,6 @@
   ## SOMETIMES_PRODUCES\r
   gEfiSecPlatformInformation2PpiGuid\r
   gEfiTemporaryRamDonePpiGuid                          ## PRODUCES\r
-  ## NOTIFY\r
-  ## SOMETIMES_CONSUMES\r
-  gPeiSecPerformancePpiGuid\r
 \r
 [Guids]\r
   ## SOMETIMES_PRODUCES   ## HOB\r
index 4bc6606..83244af 100644 (file)
 \r
 #include <PiPei.h>\r
 \r
-#include <Ppi/SecPlatformInformation.h>\r
 #include <Ppi/SecPlatformInformation2.h>\r
 #include <Ppi/TemporaryRamDone.h>\r
 #include <Ppi/SecPerformance.h>\r
 \r
 #include <Guid/FirmwarePerformance.h>\r
 \r
-#include <Library/BaseLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/PcdLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
index 28e53ac..f164c17 100644 (file)
@@ -25,7 +25,6 @@
 #include <Guid/ExtendedFirmwarePerformance.h>\r
 #include <Guid/EndOfS3Resume.h>\r
 #include <Guid/S3SmmInitDone.h>\r
-#include <Ppi/ReadOnlyVariable2.h>\r
 #include <Ppi/S3Resume2.h>\r
 #include <Ppi/SmmAccess.h>\r
 #include <Ppi/PostBootScriptTable.h>\r
@@ -34,7 +33,6 @@
 \r
 #include <Library/DebugLib.h>\r
 #include <Library/BaseLib.h>\r
-#include <Library/TimerLib.h>\r
 #include <Library/PeimEntryPoint.h>\r
 #include <Library/PeiServicesLib.h>\r
 #include <Library/HobLib.h>\r
@@ -47,7 +45,7 @@
 #include <Library/DebugAgentLib.h>\r
 #include <Library/LocalApicLib.h>\r
 #include <Library/ReportStatusCodeLib.h>\r
-#include <Library/PrintLib.h>\r
+\r
 #include <Library/HobLib.h>\r
 #include <Library/LockBoxLib.h>\r
 #include <IndustryStandard/Acpi.h>\r
index 407aab6..6ce1bf9 100644 (file)
@@ -53,7 +53,6 @@
   HobLib\r
   PeiServicesLib\r
   PeimEntryPoint\r
-  TimerLib\r
   BaseLib\r
   DebugLib\r
   PcdLib\r
@@ -64,7 +63,6 @@
   LocalApicLib\r
   ReportStatusCodeLib\r
   LockBoxLib\r
-  PrintLib\r
 \r
 [Guids]\r
   gEfiBootScriptExecutorVariableGuid            ## SOMETIMES_CONSUMES ## UNDEFINED # LockBox\r
@@ -79,7 +77,6 @@
   gEdkiiS3SmmInitDoneGuid\r
 \r
 [Ppis]\r
-  gEfiPeiReadOnlyVariable2PpiGuid               ## CONSUMES\r
   gEfiPeiS3Resume2PpiGuid                       ## PRODUCES\r
   gPeiSmmAccessPpiGuid                          ## SOMETIMES_CONSUMES\r
   gPeiPostScriptTablePpiGuid                    ## SOMETIMES_PRODUCES\r