diff mbox series

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

Message ID 20181128143357.991-13-ard.biesheuvel@linaro.org
State Accepted
Commit 32f79df36eb8755e71431d5e670f0deeba88ffe3
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>

---
 BeagleBoardPkg/PrePi/PeiUniCore.inf | 1 -
 BeagleBoardPkg/PrePi/PrePi.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

Comments

Philippe Mathieu-Daudé Nov. 28, 2018, 3:02 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>

> ---
>  BeagleBoardPkg/PrePi/PeiUniCore.inf | 1 -
>  BeagleBoardPkg/PrePi/PrePi.c        | 2 +-
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/BeagleBoardPkg/PrePi/PeiUniCore.inf b/BeagleBoardPkg/PrePi/PeiUniCore.inf
> index 3d72bc5b46e1..53c71d8eafc2 100644
> --- a/BeagleBoardPkg/PrePi/PeiUniCore.inf
> +++ b/BeagleBoardPkg/PrePi/PeiUniCore.inf
> @@ -86,7 +86,6 @@ [FixedPcd]
>  
>    gArmPlatformTokenSpaceGuid.PcdCoreCount
>  
> -  gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize
>    gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize
>  
>    gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory
> diff --git a/BeagleBoardPkg/PrePi/PrePi.c b/BeagleBoardPkg/PrePi/PrePi.c
> index 46f63f40c46e..bc9b0c80b84c 100644
> --- a/BeagleBoardPkg/PrePi/PrePi.c
> +++ b/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);
>
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>

> ---

>  BeagleBoardPkg/PrePi/PeiUniCore.inf | 1 -

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

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

> 

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

> index 3d72bc5b46e1..53c71d8eafc2 100644

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

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

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

>  

>    gArmPlatformTokenSpaceGuid.PcdCoreCount

>  

> -  gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize

>    gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize

>  

>    gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory

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

> index 46f63f40c46e..bc9b0c80b84c 100644

> --- a/BeagleBoardPkg/PrePi/PrePi.c

> +++ b/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);

> 


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:53PM +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>


> ---

>  BeagleBoardPkg/PrePi/PeiUniCore.inf | 1 -

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

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

> 

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

> index 3d72bc5b46e1..53c71d8eafc2 100644

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

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

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

>  

>    gArmPlatformTokenSpaceGuid.PcdCoreCount

>  

> -  gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize

>    gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize

>  

>    gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory

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

> index 46f63f40c46e..bc9b0c80b84c 100644

> --- a/BeagleBoardPkg/PrePi/PrePi.c

> +++ b/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);

> -- 

> 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/BeagleBoardPkg/PrePi/PeiUniCore.inf b/BeagleBoardPkg/PrePi/PeiUniCore.inf
index 3d72bc5b46e1..53c71d8eafc2 100644
--- a/BeagleBoardPkg/PrePi/PeiUniCore.inf
+++ b/BeagleBoardPkg/PrePi/PeiUniCore.inf
@@ -86,7 +86,6 @@  [FixedPcd]
 
   gArmPlatformTokenSpaceGuid.PcdCoreCount
 
-  gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize
   gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize
 
   gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory
diff --git a/BeagleBoardPkg/PrePi/PrePi.c b/BeagleBoardPkg/PrePi/PrePi.c
index 46f63f40c46e..bc9b0c80b84c 100644
--- a/BeagleBoardPkg/PrePi/PrePi.c
+++ b/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);