summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/OvmfPkgIa32.fdf
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2017-05-06 13:17:58 +0200
committerLaszlo Ersek <lersek@redhat.com>2017-05-18 23:38:45 +0200
commit7e8329267ecb62670263bfc6afec93f37bfa19d2 (patch)
tree44345b038a04fc24fac734ce43262f59df71eb18 /OvmfPkg/OvmfPkgIa32.fdf
parent89f385ce0ad7bf2c93a80ff7733e45f2af88937a (diff)
downloadedk2-7e8329267ecb62670263bfc6afec93f37bfa19d2.tar.gz
edk2-7e8329267ecb62670263bfc6afec93f37bfa19d2.tar.bz2
edk2-7e8329267ecb62670263bfc6afec93f37bfa19d2.zip
OvmfPkg/EmuVariableFvbRuntimeDxe: change block size to 4KB
EmuVariableFvbRuntimeDxe currently produces a Firmware Volume Block protocol that is based on a block map of two blocks, each block having PcdFlashNvStorageFtwSpareSize for size. (The total size is 2 * PcdFlashNvStorageFtwSpareSize.) FaultTolerantWriteDxe in turn expects the block size to be a power of two. In the 4MB build of OVMF, PcdFlashNvStorageFtwSpareSize is 264KB, which is not a power of two. In order to equip EmuVariableFvbRuntimeDxe for this build, shrink the block size to 4KB (EFI_PAGE_SIZE), and grow the block count from 2 to EFI_SIZE_TO_PAGES(2 * PcdFlashNvStorageFtwSpareSize). The total size remains 2 * PcdFlashNvStorageFtwSpareSize --------------------------------- * EFI_PAGE_SIZE EFI_PAGE_SIZE Right now EmuVariableFvbRuntimeDxe open-codes the block count of 2 in various limit checks, so introduce a few new macros: - EMU_FVB_NUM_TOTAL_BLOCKS, for the LHS of the above product, - EMU_FVB_NUM_SPARE_BLOCKS for the half of that. Also rework the FVB protocol members to support an arbitrary count of blocks. Keep the invariant intact that the first half of the firmware volume hosts the variable store and the FTW working block, and that the second half maps the FTW spare area. Cc: Jordan Justen <jordan.l.justen@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=527 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Regression-tested-by: Gary Lin <glin@suse.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'OvmfPkg/OvmfPkgIa32.fdf')
0 files changed, 0 insertions, 0 deletions