Browse Source

BeagleBoardPkg/PrePi: base GCD memory space size on CPU's PA range

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>
Ard Biesheuvel 5 years ago
parent
commit
32f79df36e
2 changed files with 1 additions and 2 deletions
  1. 0 1
      BeagleBoardPkg/PrePi/PeiUniCore.inf
  2. 1 1
      BeagleBoardPkg/PrePi/PrePi.c

+ 0 - 1
BeagleBoardPkg/PrePi/PeiUniCore.inf

@@ -86,7 +86,6 @@
 
   gArmPlatformTokenSpaceGuid.PcdCoreCount
 
-  gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize
   gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize
 
   gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory

+ 1 - 1
BeagleBoardPkg/PrePi/PrePi.c

@@ -110,7 +110,7 @@ PrePiMain (
   BuildStackHob (StacksBase, StacksSize);
 
   //TODO: Call CpuPei as a library
-  BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize));
+  BuildCpuHob (ArmGetPhysicalAddressBits (), PcdGet8 (PcdPrePiCpuIoSize));
 
   // Store timer value logged at the beginning of firmware image execution
   Performance.ResetEnd = GetTimeInNanoSecond (StartTimeStamp);