[edk2,03/21] ArmVirtPkg: drop dependency on PeiPcdLib for PEI Pcd.inf

Message ID 1459959319-19293-4-git-send-email-ard.biesheuvel@linaro.org
State Accepted
Commit 874399d4b1aa96bec5db05bbd358a16c6f5e1457
Headers show

Commit Message

Ard Biesheuvel April 6, 2016, 4:15 p.m.
The PcdPeim dynamic PCD driver is dispatched explicitly via an 'A PRIORI'
declaration in the platform DSC. Without that declaration, the PEI module
can never be dispatched since it transitively depends on protocols it
produces itself via PeiPcdLib. So use the NULL PcdLib explicitly only for
this driver.

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

---
 ArmVirtPkg/ArmVirtQemu.dsc | 5 ++++-
 ArmVirtPkg/ArmVirtQemu.fdf | 3 ---
 2 files changed, 4 insertions(+), 4 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 6, 2016, 7:21 p.m. | #1
On 04/06/16 18:15, Ard Biesheuvel wrote:
> The PcdPeim dynamic PCD driver is dispatched explicitly via an 'A PRIORI'

> declaration in the platform DSC. Without that declaration, the PEI module

> can never be dispatched since it transitively depends on protocols it


(4) s/protocols/the PPI/

with that,

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


> produces itself via PeiPcdLib. So use the NULL PcdLib explicitly only for

> this driver.

> 

> Contributed-under: TianoCore Contribution Agreement 1.0

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

> ---

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

>  ArmVirtPkg/ArmVirtQemu.fdf | 3 ---

>  2 files changed, 4 insertions(+), 4 deletions(-)

> 

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

> index a1a281303ac4..5a158c2de94b 100644

> --- a/ArmVirtPkg/ArmVirtQemu.dsc

> +++ b/ArmVirtPkg/ArmVirtQemu.dsc

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

>    #

>    ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf

>    MdeModulePkg/Core/Pei/PeiMain.inf

> -  MdeModulePkg/Universal/PCD/Pei/Pcd.inf

> +  MdeModulePkg/Universal/PCD/Pei/Pcd.inf {

> +    <LibraryClasses>

> +      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf

> +  }

>    ArmPlatformPkg/PlatformPei/PlatformPeim.inf

>    ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf

>    ArmPkg/Drivers/CpuPei/CpuPei.inf

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

> index ef456539cc62..600e10882434 100644

> --- a/ArmVirtPkg/ArmVirtQemu.fdf

> +++ b/ArmVirtPkg/ArmVirtQemu.fdf

> @@ -262,9 +262,6 @@ [FV.FVMAIN_COMPACT]

>  READ_LOCK_CAP      = TRUE

>  READ_LOCK_STATUS   = TRUE

>  

> -  APRIORI PEI {

> -    INF  MdeModulePkg/Universal/PCD/Pei/Pcd.inf

> -  }

>    INF ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf

>    INF MdeModulePkg/Core/Pei/PeiMain.inf

>    INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf

> 


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

Patch

diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index a1a281303ac4..5a158c2de94b 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -255,7 +255,10 @@  [Components.common]
   #
   ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
   MdeModulePkg/Core/Pei/PeiMain.inf
-  MdeModulePkg/Universal/PCD/Pei/Pcd.inf
+  MdeModulePkg/Universal/PCD/Pei/Pcd.inf {
+    <LibraryClasses>
+      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+  }
   ArmPlatformPkg/PlatformPei/PlatformPeim.inf
   ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf
   ArmPkg/Drivers/CpuPei/CpuPei.inf
diff --git a/ArmVirtPkg/ArmVirtQemu.fdf b/ArmVirtPkg/ArmVirtQemu.fdf
index ef456539cc62..600e10882434 100644
--- a/ArmVirtPkg/ArmVirtQemu.fdf
+++ b/ArmVirtPkg/ArmVirtQemu.fdf
@@ -262,9 +262,6 @@  [FV.FVMAIN_COMPACT]
 READ_LOCK_CAP      = TRUE
 READ_LOCK_STATUS   = TRUE
 
-  APRIORI PEI {
-    INF  MdeModulePkg/Universal/PCD/Pei/Pcd.inf
-  }
   INF ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
   INF MdeModulePkg/Core/Pei/PeiMain.inf
   INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf