Platforms/ARM: get rid of A PRIORI declaration for Dxe/Pcd.inf

A PRIORI declarations are evil. They force a driver to be dispatched
before any other drivers, while completely ignoring normal precedence
rules or protocol dependencies.

In this particular case, the DXE version of Pcd.inf is loaded a priori to
work around the problem that the default PcdLib resolution introduces a
a protocol dependency on gPcdProtocolGuid, which provides dynamic PCD
handling for other drivers, and is implemented by Pcd.inf. Since Pcd.inf
depends on PcdLib as well, it can never be dispatched in the ordinary way
if it inherits the default PcdLib resolution (since that will make it depend
on itself), and so it must be made to depend on the Null implementation of
PcdLib explicitly.

So add this explicit override, and drop the A PRIORI declarations.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
diff --git a/Platforms/ARM/Juno/ArmJuno.fdf b/Platforms/ARM/Juno/ArmJuno.fdf
index a051510..3983c20 100644
--- a/Platforms/ARM/Juno/ArmJuno.fdf
+++ b/Platforms/ARM/Juno/ArmJuno.fdf
@@ -86,10 +86,6 @@
 READ_LOCK_STATUS   = TRUE

 FvNameGuid         = B73FE497-B92E-416e-8326-45AD0D270092

 

-  APRIORI DXE {

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

-  }

-

   INF MdeModulePkg/Core/Dxe/DxeMain.inf

   INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf

 

diff --git a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf
index ff126ad..b49d452 100644
--- a/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf
+++ b/Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf
@@ -73,10 +73,6 @@
 READ_LOCK_STATUS   = TRUE

 FvNameGuid         = 87940482-fc81-41c3-87e6-399cf85ac8a0

 

-  APRIORI DXE {

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

-  }

-

   INF MdeModulePkg/Core/Dxe/DxeMain.inf

   INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf

 

diff --git a/Platforms/ARM/VExpress/ArmVExpress.dsc.inc b/Platforms/ARM/VExpress/ArmVExpress.dsc.inc
index 0c17603..bfd94c3 100644
--- a/Platforms/ARM/VExpress/ArmVExpress.dsc.inc
+++ b/Platforms/ARM/VExpress/ArmVExpress.dsc.inc
@@ -443,7 +443,10 @@
 !endif

 

 [Components.common]

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

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

+    <LibraryClasses>

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

+  }

 

   # Versatile Express FileSystem

   ArmPlatformPkg/FileSystem/BootMonFs/BootMonFs.inf