diff mbox series

[edk2,v2,08/13] EmbeddedPkg/PrePiHobLib: base GCD memory space size on CPU's PA range

Message ID 20181126223801.17121-9-ard.biesheuvel@linaro.org
State New
Headers show
Series ArmPkg, ArmVirtPkg: lift 40-bit IPA space limit | expand

Commit Message

Ard Biesheuvel Nov. 26, 2018, 10:37 p.m. UTC
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>

---
 EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf | 1 -
 EmbeddedPkg/Library/PrePiHobLib/Hob.c           | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

-- 
2.19.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox series

Patch

diff --git a/EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf b/EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
index 526db4c0d8f9..1ce3546d007d 100644
--- a/EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
+++ b/EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
@@ -47,7 +47,6 @@  [Guids]
   gEfiHobMemoryAllocStackGuid
 
 [FixedPcd.common]
-  gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize
   gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize
 
   gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory
diff --git a/EmbeddedPkg/Library/PrePiHobLib/Hob.c b/EmbeddedPkg/Library/PrePiHobLib/Hob.c
index aff8ea05797b..e3d70ae0f9fe 100644
--- a/EmbeddedPkg/Library/PrePiHobLib/Hob.c
+++ b/EmbeddedPkg/Library/PrePiHobLib/Hob.c
@@ -193,7 +193,7 @@  CreateHobList (
   Hob = HobConstructor (MemoryBegin,MemoryLength,HobBase,StackBase);
   SetHobList (Hob);
 
-  BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize));
+  BuildCpuHob (ArmGetPhysicalAddressBits (), PcdGet8 (PcdPrePiCpuIoSize));
 
   Attributes =(
     EFI_RESOURCE_ATTRIBUTE_PRESENT |