audk/ArmVirtPkg
Laszlo Ersek f9dff90289 ArmVirtPkg: use protocol-based DevicePathLib instance for most DXE modules
Port OvmfPkg commit 5c3481b0b6 to ArmVirtPkg. Some explanation should
be in order (because 5c3481b0b6 doesn't offer any):

- The UefiDevicePathLibDevicePathProtocol instance uses the Device Path
  Utilities Protocol, produced by DevicePathDxe, for formatting and
  parsing the textual device path representation. This allows for a
  lighter weight lib instance that gets linked into several DXE modules.
  In comparison, the more standalone UefiDevicePathLib instance includes
  the formatting and parsing routines in every client module.

- The DXE core needs DevicePathLib before it dispatches DevicePathDxe, so
  it needs to stick with the standalone instance.

- DevicePathDxe itself also needs the standalone instance, for
  implementing the protocol.

- The DXE-phase PCD driver, "MdeModulePkg/Universal/PCD/Dxe/Pcd.inf",
  depends on DevicePathLib via UefiLib and DxeServicesLib at the least; so
  with this update, it inherits a dependency on the protocol. In reverse,
  DevicePathDxe depends on the PCD Protocol, via PcdLib. The cycle is
  broken by using BasePcdLibNull in DevicePathDxe. That restricts it to
  FixedAtBuild, Patch, and FeatureFlag PCDs, but that's fine.

Example space savings (using ArmVirtQemu and the GCC5 toolchain):
- NOOPT:   187KB in FVMAIN, 12KB in FVMAIN_COMPACT
- DEBUG:   147KB in FVMAIN, 20KB in FVMAIN_COMPACT
- RELEASE: 123KB in FVMAIN, 17KB in FVMAIN_COMPACT

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Julien Grall <julien.grall@linaro.org>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=940
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2018-04-30 11:21:19 +02:00
..
FdtClientDxe
HighMemDxe
Include ArmVirtPkg: introduce ArmVirtMemInfoLib library class 2017-11-23 16:05:18 +00:00
Library ArmVirtPkg: reinstate timer unmask quirk for Xen 2018-04-26 08:31:40 +02:00
PlatformHasAcpiDtDxe ArmVirtPkg/PlatformHasAcpiDtDxe: depend on gEfiVariableArchProtocolGuid 2018-04-12 21:24:40 +02:00
PrePi ArmVirtPkg/ArmVirtPrePiUniCoreRelocatable: list "PrePi.h" in INF file 2018-03-13 14:30:10 +01:00
VirtioFdtDxe
XenAcpiPlatformDxe
XenPlatformHasAcpiDtDxe MdeModulePkg: move PlatformHasAcpiGuid from EmbeddedPkg 2017-04-05 16:59:13 +01:00
XenioFdtDxe
ArmVirt.dsc.inc ArmVirtPkg: use protocol-based DevicePathLib instance for most DXE modules 2018-04-30 11:21:19 +02:00
ArmVirtPkg.dec ArmVirtPkg: introduce ArmVirtMemInfoLib library class 2017-11-23 16:05:18 +00:00
ArmVirtQemu.dsc ArmVirtPkg: use protocol-based DevicePathLib instance for most DXE modules 2018-04-30 11:21:19 +02:00
ArmVirtQemu.fdf
ArmVirtQemuFvMain.fdf.inc ArmVirtPkg: Fix build failure due to Tftp library removal 2017-11-30 13:17:53 +01:00
ArmVirtQemuKernel.dsc ArmVirtPkg: use protocol-based DevicePathLib instance for most DXE modules 2018-04-30 11:21:19 +02:00
ArmVirtQemuKernel.fdf
ArmVirtRules.fdf.inc
ArmVirtXen.dsc ArmVirtPkg: use protocol-based DevicePathLib instance for most DXE modules 2018-04-30 11:21:19 +02:00
ArmVirtXen.fdf ArmVirtPkg/ArmVirtXen: move from Intel to generic BDS 2017-12-04 16:12:34 +00:00
VarStore.fdf.inc