MdeModulePkg DxeCore: Support USED_SIZE FV_EXT_TYPE
authorStar Zeng <star.zeng@intel.com>
Tue, 28 Nov 2017 09:04:23 +0000 (17:04 +0800)
committerStar Zeng <star.zeng@intel.com>
Fri, 1 Dec 2017 01:36:59 +0000 (09:36 +0800)
commita82e52b3b82b66a377618e3fcf3604e8bc1e7f21
treecafdc0a04a5f8db6f530e04251c77b44dda9fcec
parent5d0b4eb453bb0359487450e26884eebb8b452ff4
MdeModulePkg DxeCore: Support USED_SIZE FV_EXT_TYPE

The USED_SIZE FV_EXT_TYPE is introduced by PI 1.6 spec.

The EFI_FIRMWARE_VOLUME_EXT_ENTRY_USED_SIZE_TYPE can be used to find
out how many EFI_FVB2_ERASE_POLARITY bytes are at the end of the FV.

When the FV gets shadowed into memory you only need to copy the used
bytes into memory and fill the rest of the memory buffer with the
erase value.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c