ArmPlatformPkg: do not fulfil MemoryInitPeiLib dependency directly via .c file
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 14 Apr 2015 11:52:55 +0000 (11:52 +0000)
committeroliviermartin <oliviermartin@Edk2>
Tue, 14 Apr 2015 11:52:55 +0000 (11:52 +0000)
MemoryInitPeim short-circuits its MemoryInitPeiLib dependency by including
the .c file directly. This prevents us from having a special implementation
for ArmVirtualizationPkg that performs additional cache maintenance before
enabling the MMU. So instead, make it depend on the library class.

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17175 6f19259b-4bc3-4df7-8a09-765794883524

ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc
ArmPlatformPkg/ArmPlatformPkg-2ndstage.dsc
ArmPlatformPkg/ArmPlatformPkg.dsc
ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb.dsc.inc
ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc
ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf
ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf

index aad1358..5d1cc5a 100644 (file)
@@ -57,6 +57,8 @@
   PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf\r
   PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf\r
   PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf\r
+\r
+[LibraryClasses.common.SEC, LibraryClasses.common.PEIM]\r
   MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf\r
 \r
 [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.DXE_DRIVER]\r
index 0157430..4cfb913 100644 (file)
   PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf\r
   PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf\r
   PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf\r
+\r
+[LibraryClasses.common.SEC, LibraryClasses.common.PEIM]\r
   MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf\r
 \r
 [LibraryClasses.common.DXE_CORE]\r
index 7782748..f9f217c 100644 (file)
   DebugAgentLib|ArmPkg/Library/DebugAgentSymbolsBaseLib/DebugAgentSymbolsBaseLib.inf\r
   DefaultExceptionHandlerLib|ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerLibBase.inf\r
 \r
+[LibraryClasses.common.SEC, LibraryClasses.common.PEIM]\r
+  MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf\r
+\r
 [LibraryClasses.ARM.SEC]\r
   ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf\r
 \r
index a099a61..b7b2bf0 100644 (file)
   MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf\r
   HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf\r
   PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf\r
-  MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf\r
 !endif\r
 \r
+[LibraryClasses.common.SEC, LibraryClasses.common.PEIM]\r
+  MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf\r
+\r
 [LibraryClasses.common.PEI_CORE]\r
   HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf\r
   PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf\r
index 12673eb..8dd20ca 100644 (file)
   HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf\r
   PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf\r
   PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf\r
-  MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf\r
 !endif\r
 \r
   # Trustzone Support\r
   ArmPlatformGlobalVariableLib|ArmPlatformPkg/Library/ArmPlatformGlobalVariableLib/Pei/PeiArmPlatformGlobalVariableLib.inf\r
   PeiServicesTablePointerLib|ArmPlatformPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf\r
 \r
+[LibraryClasses.common.SEC, LibraryClasses.common.PEIM]\r
+  MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf\r
+\r
 [LibraryClasses.common.DXE_CORE]\r
   HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf\r
   MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf\r
index 1e5b93e..6d22b7c 100755 (executable)
@@ -15,9 +15,9 @@
   INF_VERSION                    = 0x00010005\r
   BASE_NAME                      = ArmMemoryInitPeiLib\r
   FILE_GUID                      = 55ddb6e0-70b5-11e0-b33e-0002a5d5c51b\r
-  MODULE_TYPE                    = SEC\r
+  MODULE_TYPE                    = BASE\r
   VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = PlatformPeiLib\r
+  LIBRARY_CLASS                  = MemoryInitPeiLib|SEC PEIM\r
 \r
 [Sources]\r
   MemoryInitPeiLib.c\r
index 6374b63..2c14a9c 100755 (executable)
@@ -28,7 +28,6 @@
 \r
 [Sources]\r
   MemoryInitPeim.c\r
-  MemoryInitPeiLib.c\r
 \r
 [Packages]\r
   MdePkg/MdePkg.dec\r
@@ -43,6 +42,7 @@
   HobLib\r
   ArmLib\r
   ArmPlatformLib\r
+  MemoryInitPeiLib\r
 \r
 [Guids]\r
   gEfiMemoryTypeInformationGuid\r