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 <[email protected]>
---
 EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf | 1 -
 EmbeddedPkg/Library/PrePiHobLib/Hob.c           | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

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 |
-- 
2.19.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to