diff mbox

[edk2,02/21] ArmVirtPkg: drop dependency on DxePcdLib for DXE Pcd.inf

Message ID 1459959319-19293-3-git-send-email-ard.biesheuvel@linaro.org
State Accepted
Commit 31b3b02acaa788e55270b3fb1205c8a82f0749f4
Headers show

Commit Message

Ard Biesheuvel April 6, 2016, 4:15 p.m. UTC
The PcdDxe dynamic PCD driver is dispatched explicitly via an 'A PRIORI'
declaration in the platform DSC. Without that declaration, the DXE driver
can never be dispatched since it transitively depends on protocols it
produces itself via DxePcdLib. 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/ArmVirtQemuKernel.dsc | 5 ++++-
 ArmVirtPkg/ArmVirtXen.dsc        | 5 ++++-
 3 files changed, 12 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 6, 2016, 7:17 p.m. UTC | #1
On 04/06/16 18:15, Ard Biesheuvel wrote:
> The PcdDxe dynamic PCD driver is dispatched explicitly via an 'A PRIORI'

> declaration in the platform DSC. Without that declaration, the DXE driver

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

> produces itself via DxePcdLib. 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/ArmVirtQemuKernel.dsc | 5 ++++-

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

>  3 files changed, 12 insertions(+), 3 deletions(-)

> 

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

> index e626df768f85..a1a281303ac4 100644

> --- a/ArmVirtPkg/ArmVirtQemu.dsc

> +++ b/ArmVirtPkg/ArmVirtQemu.dsc

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

>      <LibraryClasses>

>        NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf

>    }

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

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

> +    <LibraryClasses>

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

> +  }

>  

>    #

>    # Architectural Protocols

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

> index bfa4dbe9fd8c..925a1fdec0e2 100644

> --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc

> +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc

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

>      <LibraryClasses>

>        NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf

>    }

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

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

> +    <LibraryClasses>

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

> +  }

>  

>    #

>    # Architectural Protocols

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

> index 43f093a63f3e..6a542f2447de 100644

> --- a/ArmVirtPkg/ArmVirtXen.dsc

> +++ b/ArmVirtPkg/ArmVirtXen.dsc

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

>      <LibraryClasses>

>        NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf

>    }

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

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

> +    <LibraryClasses>

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

> +  }

>  

>    #

>    # Architectural Protocols

> 


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

_______________________________________________
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 e626df768f85..a1a281303ac4 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -274,7 +274,10 @@  [Components.common]
     <LibraryClasses>
       NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
   }
-  MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
+  MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
+    <LibraryClasses>
+      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+  }
 
   #
   # Architectural Protocols
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index bfa4dbe9fd8c..925a1fdec0e2 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -255,7 +255,10 @@  [Components.common]
     <LibraryClasses>
       NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
   }
-  MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
+  MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
+    <LibraryClasses>
+      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+  }
 
   #
   # Architectural Protocols
diff --git a/ArmVirtPkg/ArmVirtXen.dsc b/ArmVirtPkg/ArmVirtXen.dsc
index 43f093a63f3e..6a542f2447de 100644
--- a/ArmVirtPkg/ArmVirtXen.dsc
+++ b/ArmVirtPkg/ArmVirtXen.dsc
@@ -178,7 +178,10 @@  [Components.common]
     <LibraryClasses>
       NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
   }
-  MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
+  MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
+    <LibraryClasses>
+      PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+  }
 
   #
   # Architectural Protocols