OvmfPkg/RiscVVirt: VirtNorFlashPlatformLib: Fix wrong flash size
The size should be for single region, not the whole firmware FD. Signed-off-by: Tuan Phan <tphan@ventanamicro.com> Reviewed-by: Andrei Warkentin <andrei.warkentin@intel.com> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
This commit is contained in:
@@ -24,7 +24,8 @@ VIRT_NOR_FLASH_DESCRIPTION mNorFlashDevice =
|
||||
{
|
||||
FixedPcdGet32 (PcdOvmfFdBaseAddress),
|
||||
FixedPcdGet64 (PcdFlashNvStorageVariableBase),
|
||||
FixedPcdGet32 (PcdOvmfFirmwareFdSize),
|
||||
FixedPcdGet32 (PcdOvmfFirmwareFdSize) -
|
||||
(FixedPcdGet64 (PcdFlashNvStorageVariableBase) - FixedPcdGet32 (PcdOvmfFdBaseAddress)),
|
||||
QEMU_NOR_BLOCK_SIZE
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user