ArmPlatformPkg/PrePi: base GCD memory space size on CPU's PA range
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 26 Nov 2018 21:34:05 +0000 (22:34 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 29 Nov 2018 17:55:26 +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>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmPlatformPkg/PrePi/PeiMPCore.inf
ArmPlatformPkg/PrePi/PeiUniCore.inf
ArmPlatformPkg/PrePi/PrePi.c

index 242b031..7e2ad6f 100644 (file)
@@ -97,7 +97,6 @@
 \r
   gArmPlatformTokenSpaceGuid.PcdCoreCount\r
 \r
-  gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize\r
   gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize\r
 \r
   gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory\r
index a45cdef..26328b7 100644 (file)
@@ -90,7 +90,6 @@
 \r
   gArmPlatformTokenSpaceGuid.PcdCoreCount\r
 \r
-  gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize\r
   gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize\r
 \r
   gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory\r
index 02cff7d..245bdde 100644 (file)
@@ -115,7 +115,7 @@ PrePiMain (
   BuildStackHob (StacksBase, StacksSize);\r
 \r
   //TODO: Call CpuPei as a library\r
-  BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize));\r
+  BuildCpuHob (ArmGetPhysicalAddressBits (), PcdGet8 (PcdPrePiCpuIoSize));\r
 \r
   if (ArmIsMpCore ()) {\r
     // Only MP Core platform need to produce gArmMpCoreInfoPpiGuid\r