diff options
author | Tuan Phan <tphan@ventanamicro.com> | 2023-07-14 12:08:20 -0700 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-07-15 14:10:18 +0000 |
commit | a9fc9bb4666f8412ca5f1beb9e7e8cff63463861 (patch) | |
tree | e03566092e304a06986997cf7159262ad4fbddd3 /OvmfPkg/RiscVVirt | |
parent | fbec9aec00c2cc10de439f2f0c3accb52488d32f (diff) | |
download | edk2-a9fc9bb4666f8412ca5f1beb9e7e8cff63463861.tar.gz edk2-a9fc9bb4666f8412ca5f1beb9e7e8cff63463861.tar.bz2 edk2-a9fc9bb4666f8412ca5f1beb9e7e8cff63463861.zip |
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>
Diffstat (limited to 'OvmfPkg/RiscVVirt')
-rw-r--r-- | OvmfPkg/RiscVVirt/Library/VirtNorFlashPlatformLib/VirtNorFlashStaticLib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/OvmfPkg/RiscVVirt/Library/VirtNorFlashPlatformLib/VirtNorFlashStaticLib.c b/OvmfPkg/RiscVVirt/Library/VirtNorFlashPlatformLib/VirtNorFlashStaticLib.c index fdc2ccb629..33f3a01b06 100644 --- a/OvmfPkg/RiscVVirt/Library/VirtNorFlashPlatformLib/VirtNorFlashStaticLib.c +++ b/OvmfPkg/RiscVVirt/Library/VirtNorFlashPlatformLib/VirtNorFlashStaticLib.c @@ -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
};
|