ArmVirtPkg/PrePi: base GCD memory space size on CPU's PA range
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 26 Nov 2018 21:35:02 +0000 (22:35 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 29 Nov 2018 17:57:20 +0000 (18:57 +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>
ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
ArmVirtPkg/PrePi/PrePi.c

index 1587bd9..034ddb4 100755 (executable)
@@ -85,7 +85,6 @@
 \r
   gArmPlatformTokenSpaceGuid.PcdCoreCount\r
 \r
-  gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize\r
   gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize\r
 \r
   gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory\r
index f6abe2f..61de6cf 100755 (executable)
@@ -80,7 +80,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
   // Set the Boot Mode\r
   SetBootMode (BOOT_WITH_FULL_CONFIGURATION);\r