diff mbox

[edk2,v3,2/9] ArmVirtPkg: move QEMU based platforms to ArmVirtPL031FdtClientLib

Message ID 1460534539-2169-3-git-send-email-ard.biesheuvel@linaro.org
State Superseded
Headers show

Commit Message

Ard Biesheuvel April 13, 2016, 8:02 a.m. UTC
This moves QEMU based platforms to ArmVirtPL031FdtClientLib, so that we no
longer have to rely on VirtFdtDxe to execute first and set the PL031 base
address in a dynamic PCD.

The only driver which [transitively] depends on this PcdPL031RtcBase PCD is
EmbeddedPkg/RealTimeClockRuntimeDxe, so this conversion cannot affect any
other users and is thus safe.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 ArmVirtPkg/ArmVirtQemu.dsc       | 5 ++++-
 ArmVirtPkg/ArmVirtQemuKernel.dsc | 7 +++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

-- 
2.5.0

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

Comments

Laszlo Ersek April 13, 2016, 12:21 p.m. UTC | #1
On 04/13/16 10:02, Ard Biesheuvel wrote:
> This moves QEMU based platforms to ArmVirtPL031FdtClientLib, so that we no

> longer have to rely on VirtFdtDxe to execute first and set the PL031 base

> address in a dynamic PCD.

> 

> The only driver which [transitively] depends on this PcdPL031RtcBase PCD is

> EmbeddedPkg/RealTimeClockRuntimeDxe, so this conversion cannot affect any

> other users and is thus safe.

> 

> Contributed-under: TianoCore Contribution Agreement 1.0

> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---

>  ArmVirtPkg/ArmVirtQemu.dsc       | 5 ++++-

>  ArmVirtPkg/ArmVirtQemuKernel.dsc | 7 +++++--

>  2 files changed, 9 insertions(+), 3 deletions(-)


Assuming we stick with the original idea in patch v3 1/9, I have the
following comments:

You were editing these files way too quick, while rebasing. :) Namely,

> diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc

> index c42092f54163..70419ff3f856 100644

> --- a/ArmVirtPkg/ArmVirtQemu.dsc

> +++ b/ArmVirtPkg/ArmVirtQemu.dsc

> @@ -293,7 +293,10 @@ [Components.common]

>    MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf

>    MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf

>    EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf

> -  EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf

> +  EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf {

> +    <LibraryClasses>

> +      NULL|ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf


this is correct,

> +  }

>    EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf

>  

>    MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf

> diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc

> index 2cbeced695f9..65991baaf680 100644

> --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc

> +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc

> @@ -271,7 +271,10 @@ [Components.common]

>    MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf

>    MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf

>    EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf

> -  EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf

> +  EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf {

> +    <LibraryClasses>

> +      NULL|ArmVirtPkg/Library/ArmVirtRtcFdtClientLib/ArmVirtPL031FdtClientLib.inf


here you failed to perform the v2->v3 rename that you described in the
v3 blurb, namely

  ArmVirtRtcFdtClientLib -> ArmVirtPL031FdtClientLib

> +  }

>    EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf

>  

>    MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf

> @@ -285,7 +288,7 @@ [Components.common]

>    ArmPkg/Drivers/ArmGic/ArmGicDxe.inf

>    ArmPkg/Drivers/TimerDxe/TimerDxe.inf {

>      <LibraryClasses>

> -      NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf

> +      NULL|ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtTimerFdtClientLib.inf


and instead of that, here you made a bogus replacement. :)

>    }

>  !if $(SECURE_BOOT_ENABLE) == TRUE

>    ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashAuthenticatedDxe.inf

> 


Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Ard Biesheuvel April 13, 2016, 1:18 p.m. UTC | #2
On 13 April 2016 at 14:21, Laszlo Ersek <lersek@redhat.com> wrote:
> On 04/13/16 10:02, Ard Biesheuvel wrote:

>> This moves QEMU based platforms to ArmVirtPL031FdtClientLib, so that we no

>> longer have to rely on VirtFdtDxe to execute first and set the PL031 base

>> address in a dynamic PCD.

>>

>> The only driver which [transitively] depends on this PcdPL031RtcBase PCD is

>> EmbeddedPkg/RealTimeClockRuntimeDxe, so this conversion cannot affect any

>> other users and is thus safe.

>>

>> Contributed-under: TianoCore Contribution Agreement 1.0

>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

>> ---

>>  ArmVirtPkg/ArmVirtQemu.dsc       | 5 ++++-

>>  ArmVirtPkg/ArmVirtQemuKernel.dsc | 7 +++++--

>>  2 files changed, 9 insertions(+), 3 deletions(-)

>

> Assuming we stick with the original idea in patch v3 1/9, I have the

> following comments:

>

> You were editing these files way too quick, while rebasing. :) Namely,

>

>> diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc

>> index c42092f54163..70419ff3f856 100644

>> --- a/ArmVirtPkg/ArmVirtQemu.dsc

>> +++ b/ArmVirtPkg/ArmVirtQemu.dsc

>> @@ -293,7 +293,10 @@ [Components.common]

>>    MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf

>>    MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf

>>    EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf

>> -  EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf

>> +  EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf {

>> +    <LibraryClasses>

>> +      NULL|ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf

>

> this is correct,

>

>> +  }

>>    EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf

>>

>>    MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf

>> diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc

>> index 2cbeced695f9..65991baaf680 100644

>> --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc

>> +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc

>> @@ -271,7 +271,10 @@ [Components.common]

>>    MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf

>>    MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf

>>    EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf

>> -  EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf

>> +  EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf {

>> +    <LibraryClasses>

>> +      NULL|ArmVirtPkg/Library/ArmVirtRtcFdtClientLib/ArmVirtPL031FdtClientLib.inf

>

> here you failed to perform the v2->v3 rename that you described in the

> v3 blurb, namely

>

>   ArmVirtRtcFdtClientLib -> ArmVirtPL031FdtClientLib

>

>> +  }

>>    EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf

>>

>>    MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf

>> @@ -285,7 +288,7 @@ [Components.common]

>>    ArmPkg/Drivers/ArmGic/ArmGicDxe.inf

>>    ArmPkg/Drivers/TimerDxe/TimerDxe.inf {

>>      <LibraryClasses>

>> -      NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf

>> +      NULL|ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtTimerFdtClientLib.inf

>

> and instead of that, here you made a bogus replacement. :)

>


Yep,my bad :-( I spotted it myself just now ...

>>    }

>>  !if $(SECURE_BOOT_ENABLE) == TRUE

>>    ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashAuthenticatedDxe.inf

>>

>

> Laszlo

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

Patch

diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index c42092f54163..70419ff3f856 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -293,7 +293,10 @@  [Components.common]
   MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
   MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
   EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
-  EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
+  EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf {
+    <LibraryClasses>
+      NULL|ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf
+  }
   EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
 
   MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index 2cbeced695f9..65991baaf680 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -271,7 +271,10 @@  [Components.common]
   MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
   MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
   EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
-  EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
+  EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf {
+    <LibraryClasses>
+      NULL|ArmVirtPkg/Library/ArmVirtRtcFdtClientLib/ArmVirtPL031FdtClientLib.inf
+  }
   EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
 
   MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
@@ -285,7 +288,7 @@  [Components.common]
   ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
   ArmPkg/Drivers/TimerDxe/TimerDxe.inf {
     <LibraryClasses>
-      NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
+      NULL|ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtTimerFdtClientLib.inf
   }
 !if $(SECURE_BOOT_ENABLE) == TRUE
   ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashAuthenticatedDxe.inf