ArmPkg/CpuPei: base GCD memory space size on CPU's PA range
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 26 Nov 2018 21:22:20 +0000 (22:22 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 29 Nov 2018 17:55:08 +0000 (18:55 +0100)
Derive the size of the GCD memory space map directly from the CPU's
information registers rather than from the PcdPrePiCpuMemorySize PCD,
which will be removed.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmPkg/Drivers/CpuPei/CpuPei.c
ArmPkg/Drivers/CpuPei/CpuPei.inf

index d54f42a..e63519f 100644 (file)
@@ -73,7 +73,7 @@ InitializeCpuPeim (
   ArmEnableBranchPrediction ();\r
 \r
   // Publish the CPU memory and io spaces sizes\r
-  BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize));\r
+  BuildCpuHob (ArmGetPhysicalAddressBits (), PcdGet8 (PcdPrePiCpuIoSize));\r
 \r
   // Only MP Core platform need to produce gArmMpCoreInfoPpiGuid\r
   Status = PeiServicesLocatePpi (&gArmMpCoreInfoPpiGuid, 0, NULL, (VOID**)&ArmMpCoreInfoPpi);\r
index eafccd6..dcea012 100644 (file)
@@ -50,7 +50,6 @@
   gArmMpCoreInfoGuid\r
 \r
 [FixedPcd]\r
-  gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize\r
   gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize\r
 \r
 [Depex]\r