diff mbox series

[edk2,v3,10/16] ArmPlatformPkg/PrePi: base GCD memory space size on CPU's PA range

Message ID 20181128143357.991-11-ard.biesheuvel@linaro.org
State Accepted
Commit e0ec9a127f44e421ddddc1b597e7a255cd098258
Headers show
Series Pkg: lift 40-bit IPA space limit | expand

Commit Message

Ard Biesheuvel Nov. 28, 2018, 2:33 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>

---
 ArmPlatformPkg/PrePi/PeiMPCore.inf  | 1 -
 ArmPlatformPkg/PrePi/PeiUniCore.inf | 1 -
 ArmPlatformPkg/PrePi/PrePi.c        | 2 +-
 3 files changed, 1 insertion(+), 3 deletions(-)

-- 
2.19.1

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

Comments

Philippe Mathieu-Daudé Nov. 28, 2018, 3:01 p.m. UTC | #1
On 28/11/18 15:33, Ard Biesheuvel wrote:
> 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>

> ---
>  ArmPlatformPkg/PrePi/PeiMPCore.inf  | 1 -
>  ArmPlatformPkg/PrePi/PeiUniCore.inf | 1 -
>  ArmPlatformPkg/PrePi/PrePi.c        | 2 +-
>  3 files changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/ArmPlatformPkg/PrePi/PeiMPCore.inf b/ArmPlatformPkg/PrePi/PeiMPCore.inf
> index 242b03175536..7e2ad6fc483d 100644
> --- a/ArmPlatformPkg/PrePi/PeiMPCore.inf
> +++ b/ArmPlatformPkg/PrePi/PeiMPCore.inf
> @@ -97,7 +97,6 @@ [FixedPcd]
>  
>    gArmPlatformTokenSpaceGuid.PcdCoreCount
>  
> -  gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize
>    gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize
>  
>    gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory
> diff --git a/ArmPlatformPkg/PrePi/PeiUniCore.inf b/ArmPlatformPkg/PrePi/PeiUniCore.inf
> index a45cdef4ed91..26328b7e8f67 100644
> --- a/ArmPlatformPkg/PrePi/PeiUniCore.inf
> +++ b/ArmPlatformPkg/PrePi/PeiUniCore.inf
> @@ -90,7 +90,6 @@ [FixedPcd]
>  
>    gArmPlatformTokenSpaceGuid.PcdCoreCount
>  
> -  gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize
>    gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize
>  
>    gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory
> diff --git a/ArmPlatformPkg/PrePi/PrePi.c b/ArmPlatformPkg/PrePi/PrePi.c
> index 02cff7ddc204..245bdded1eb3 100644
> --- a/ArmPlatformPkg/PrePi/PrePi.c
> +++ b/ArmPlatformPkg/PrePi/PrePi.c
> @@ -115,7 +115,7 @@ PrePiMain (
>    BuildStackHob (StacksBase, StacksSize);
>  
>    //TODO: Call CpuPei as a library
> -  BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize));
> +  BuildCpuHob (ArmGetPhysicalAddressBits (), PcdGet8 (PcdPrePiCpuIoSize));
>  
>    if (ArmIsMpCore ()) {
>      // Only MP Core platform need to produce gArmMpCoreInfoPpiGuid
>
Laszlo Ersek Nov. 28, 2018, 7:53 p.m. UTC | #2
On 11/28/18 15:33, Ard Biesheuvel wrote:
> 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>

> ---

>  ArmPlatformPkg/PrePi/PeiMPCore.inf  | 1 -

>  ArmPlatformPkg/PrePi/PeiUniCore.inf | 1 -

>  ArmPlatformPkg/PrePi/PrePi.c        | 2 +-

>  3 files changed, 1 insertion(+), 3 deletions(-)

> 

> diff --git a/ArmPlatformPkg/PrePi/PeiMPCore.inf b/ArmPlatformPkg/PrePi/PeiMPCore.inf

> index 242b03175536..7e2ad6fc483d 100644

> --- a/ArmPlatformPkg/PrePi/PeiMPCore.inf

> +++ b/ArmPlatformPkg/PrePi/PeiMPCore.inf

> @@ -97,7 +97,6 @@ [FixedPcd]

>  

>    gArmPlatformTokenSpaceGuid.PcdCoreCount

>  

> -  gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize

>    gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize

>  

>    gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory

> diff --git a/ArmPlatformPkg/PrePi/PeiUniCore.inf b/ArmPlatformPkg/PrePi/PeiUniCore.inf

> index a45cdef4ed91..26328b7e8f67 100644

> --- a/ArmPlatformPkg/PrePi/PeiUniCore.inf

> +++ b/ArmPlatformPkg/PrePi/PeiUniCore.inf

> @@ -90,7 +90,6 @@ [FixedPcd]

>  

>    gArmPlatformTokenSpaceGuid.PcdCoreCount

>  

> -  gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize

>    gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize

>  

>    gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory

> diff --git a/ArmPlatformPkg/PrePi/PrePi.c b/ArmPlatformPkg/PrePi/PrePi.c

> index 02cff7ddc204..245bdded1eb3 100644

> --- a/ArmPlatformPkg/PrePi/PrePi.c

> +++ b/ArmPlatformPkg/PrePi/PrePi.c

> @@ -115,7 +115,7 @@ PrePiMain (

>    BuildStackHob (StacksBase, StacksSize);

>  

>    //TODO: Call CpuPei as a library

> -  BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize));

> +  BuildCpuHob (ArmGetPhysicalAddressBits (), PcdGet8 (PcdPrePiCpuIoSize));

>  

>    if (ArmIsMpCore ()) {

>      // Only MP Core platform need to produce gArmMpCoreInfoPpiGuid

> 


Acked-by: Laszlo Ersek <lersek@redhat.com>

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Leif Lindholm Nov. 29, 2018, 3:44 p.m. UTC | #3
On Wed, Nov 28, 2018 at 03:33:51PM +0100, Ard Biesheuvel wrote:
> 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: Leif Lindholm <leif.lindholm@linaro.org>


> ---

>  ArmPlatformPkg/PrePi/PeiMPCore.inf  | 1 -

>  ArmPlatformPkg/PrePi/PeiUniCore.inf | 1 -

>  ArmPlatformPkg/PrePi/PrePi.c        | 2 +-

>  3 files changed, 1 insertion(+), 3 deletions(-)

> 

> diff --git a/ArmPlatformPkg/PrePi/PeiMPCore.inf b/ArmPlatformPkg/PrePi/PeiMPCore.inf

> index 242b03175536..7e2ad6fc483d 100644

> --- a/ArmPlatformPkg/PrePi/PeiMPCore.inf

> +++ b/ArmPlatformPkg/PrePi/PeiMPCore.inf

> @@ -97,7 +97,6 @@ [FixedPcd]

>  

>    gArmPlatformTokenSpaceGuid.PcdCoreCount

>  

> -  gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize

>    gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize

>  

>    gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory

> diff --git a/ArmPlatformPkg/PrePi/PeiUniCore.inf b/ArmPlatformPkg/PrePi/PeiUniCore.inf

> index a45cdef4ed91..26328b7e8f67 100644

> --- a/ArmPlatformPkg/PrePi/PeiUniCore.inf

> +++ b/ArmPlatformPkg/PrePi/PeiUniCore.inf

> @@ -90,7 +90,6 @@ [FixedPcd]

>  

>    gArmPlatformTokenSpaceGuid.PcdCoreCount

>  

> -  gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize

>    gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize

>  

>    gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory

> diff --git a/ArmPlatformPkg/PrePi/PrePi.c b/ArmPlatformPkg/PrePi/PrePi.c

> index 02cff7ddc204..245bdded1eb3 100644

> --- a/ArmPlatformPkg/PrePi/PrePi.c

> +++ b/ArmPlatformPkg/PrePi/PrePi.c

> @@ -115,7 +115,7 @@ PrePiMain (

>    BuildStackHob (StacksBase, StacksSize);

>  

>    //TODO: Call CpuPei as a library

> -  BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize));

> +  BuildCpuHob (ArmGetPhysicalAddressBits (), PcdGet8 (PcdPrePiCpuIoSize));

>  

>    if (ArmIsMpCore ()) {

>      // Only MP Core platform need to produce gArmMpCoreInfoPpiGuid

> -- 

> 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/ArmPlatformPkg/PrePi/PeiMPCore.inf b/ArmPlatformPkg/PrePi/PeiMPCore.inf
index 242b03175536..7e2ad6fc483d 100644
--- a/ArmPlatformPkg/PrePi/PeiMPCore.inf
+++ b/ArmPlatformPkg/PrePi/PeiMPCore.inf
@@ -97,7 +97,6 @@  [FixedPcd]
 
   gArmPlatformTokenSpaceGuid.PcdCoreCount
 
-  gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize
   gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize
 
   gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory
diff --git a/ArmPlatformPkg/PrePi/PeiUniCore.inf b/ArmPlatformPkg/PrePi/PeiUniCore.inf
index a45cdef4ed91..26328b7e8f67 100644
--- a/ArmPlatformPkg/PrePi/PeiUniCore.inf
+++ b/ArmPlatformPkg/PrePi/PeiUniCore.inf
@@ -90,7 +90,6 @@  [FixedPcd]
 
   gArmPlatformTokenSpaceGuid.PcdCoreCount
 
-  gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize
   gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize
 
   gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory
diff --git a/ArmPlatformPkg/PrePi/PrePi.c b/ArmPlatformPkg/PrePi/PrePi.c
index 02cff7ddc204..245bdded1eb3 100644
--- a/ArmPlatformPkg/PrePi/PrePi.c
+++ b/ArmPlatformPkg/PrePi/PrePi.c
@@ -115,7 +115,7 @@  PrePiMain (
   BuildStackHob (StacksBase, StacksSize);
 
   //TODO: Call CpuPei as a library
-  BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize));
+  BuildCpuHob (ArmGetPhysicalAddressBits (), PcdGet8 (PcdPrePiCpuIoSize));
 
   if (ArmIsMpCore ()) {
     // Only MP Core platform need to produce gArmMpCoreInfoPpiGuid