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 d54f42acfcc8e65812da12c91a0eea3684a61aca..e63519ff6481d2cc96a6504e3def6a6c838500b7 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 eafccd600983c6f5e381f533ca1702ca3d1a5848..dcea012fd8f93fb390d8019430e4d2aaf9898285 100644 (file)
@@ -50,7 +50,6 @@
   gArmMpCoreInfoGuid\r
 \r
 [FixedPcd]\r
-  gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize\r
   gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize\r
 \r
 [Depex]\r