summaryrefslogtreecommitdiffstats
path: root/ArmVirtPkg/ArmVirtXen.dsc
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2018-04-24 01:36:27 +0200
committerLaszlo Ersek <lersek@redhat.com>2018-04-30 11:21:19 +0200
commitf9dff90289507191f299331e44601c5ef83c1948 (patch)
tree9738a45e19a02bfaad1cf2f2abc2fb948aa3394b /ArmVirtPkg/ArmVirtXen.dsc
parent78e759910c8d3627f8ba6a0412b85f0868c1b203 (diff)
downloadedk2-f9dff90289507191f299331e44601c5ef83c1948.tar.gz
edk2-f9dff90289507191f299331e44601c5ef83c1948.tar.bz2
edk2-f9dff90289507191f299331e44601c5ef83c1948.zip
ArmVirtPkg: use protocol-based DevicePathLib instance for most DXE modules
Port OvmfPkg commit 5c3481b0b611e to ArmVirtPkg. Some explanation should be in order (because 5c3481b0b611e 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>
Diffstat (limited to 'ArmVirtPkg/ArmVirtXen.dsc')
-rw-r--r--ArmVirtPkg/ArmVirtXen.dsc7
1 files changed, 6 insertions, 1 deletions
diff --git a/ArmVirtPkg/ArmVirtXen.dsc b/ArmVirtPkg/ArmVirtXen.dsc
index 8878912e6b..20fae9e675 100644
--- a/ArmVirtPkg/ArmVirtXen.dsc
+++ b/ArmVirtPkg/ArmVirtXen.dsc
@@ -154,6 +154,7 @@
MdeModulePkg/Core/Dxe/DxeMain.inf {
<LibraryClasses>
NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
+ DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
}
MdeModulePkg/Universal/PCD/Dxe/Pcd.inf {
<LibraryClasses>
@@ -206,7 +207,11 @@
#
# Bds
#
- MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
+ MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {
+ <LibraryClasses>
+ DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
+ PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
+ }
MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
MdeModulePkg/Universal/BdsDxe/BdsDxe.inf