]> git.proxmox.com Git - mirror_edk2.git/commit
BaseTools/GenFv: optimize away redundant padding
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 27 Jul 2015 13:50:30 +0000 (13:50 +0000)
committerabiesheuvel <abiesheuvel@Edk2>
Mon, 27 Jul 2015 13:50:30 +0000 (13:50 +0000)
commit47746688e1688a94d2cde44c5f874f761bae992d
tree84daf65cef68b5b0a47e8b35f664c026baebd945
parent46d0f3f871420269de54dc495e43872fcdd83f86
BaseTools/GenFv: optimize away redundant padding

To prevent double padding of XIP modules leading to excessive
waste of FV space, try to adjust existing padding rather than
adding more.

Instead of adding a pad file to the FV to line up an FFS file that
itself may contain padding to line up the payload, try to find a
dedicated padding section inside the FFS, and reduce its size to
place all subsequent aligned FFS section at their respective minimum
alignments.

When using 4 KB section alignment (which is required on AARCH64 in
some cases), this will save 4 KB for each XIP module.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yingke Liu <yingke.d.liu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18080 6f19259b-4bc3-4df7-8a09-765794883524
BaseTools/Source/C/GenFv/GenFvInternalLib.c