From ca8b09a0d6c31db5bf5ee955dc21b783d14157eb Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Tue, 19 Apr 2016 09:41:21 +0200 Subject: 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 Tested-by: Ryan Harkin --- Platforms/ARM/Juno/ArmJuno.fdf | 4 ---- Platforms/ARM/VExpress/ArmVExpress-FVP-AArch64.fdf | 4 ---- Platforms/ARM/VExpress/ArmVExpress.dsc.inc | 5 ++++- 3 files changed, 4 insertions(+), 9 deletions(-) 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_CAP = TRUE 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_CAP = TRUE 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 { + + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf + } # Versatile Express FileSystem ArmPlatformPkg/FileSystem/BootMonFs/BootMonFs.inf -- cgit v1.2.3