[edk2-devel] Silicon/SbsaQemu: Fix NOR flash RegionBaseAddress
Graeme Gregory
graeme.gregory at linaro.org
Wed Jun 17 07:39:11 UTC 2020
On Wed, Jun 17, 2020 at 12:59:13AM +0530, Tanmay Jagdale wrote:
> The EFI_FIMRWARE_VOLUME_HEADER is present at an offset in the
> NOR flash of Sbsa QEMU model. Use the right RegionBaseAddress
> so that the EFI firmware volume header can be found correctly.
>
> Signed-off-by: Tanmay Jagdale <tanmay.jagdale at linaro.org>
This fixes the problem for me, I have tested setting variables from
efi shell and from debian guest OS and they persist correctly now.
Tested-by: Graeme Gregory <graeme.gregory at linaro.org>
> ---
> .../SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.c | 2 +-
> .../Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.inf | 2 ++
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.c b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.c
> index e7bb626596..0946327cb5 100644
> --- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.c
> +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.c
> @@ -23,7 +23,7 @@ NorFlashPlatformInitialization (
> NOR_FLASH_DESCRIPTION mNorFlashDevice =
> {
> FixedPcdGet64(PcdFdBaseAddress),
> - FixedPcdGet64(PcdFdBaseAddress),
> + FixedPcdGet64(PcdFlashNvStorageVariableBase),
> FixedPcdGet32(PcdFdSize),
> QEMU_NOR_BLOCK_SIZE
> };
> diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.inf b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.inf
> index 82712c8901..f2ba41e1df 100644
> --- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.inf
> +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.inf
> @@ -23,7 +23,9 @@
> ArmPlatformPkg/ArmPlatformPkg.dec
> ArmPkg/ArmPkg.dec
> MdePkg/MdePkg.dec
> + MdeModulePkg/MdeModulePkg.dec
>
> [FixedPcd]
> gArmTokenSpaceGuid.PcdFdBaseAddress
> gArmTokenSpaceGuid.PcdFdSize
> + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase
> --
> 2.27.0
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#61387): https://edk2.groups.io/g/devel/message/61387
Mute This Topic: https://groups.io/mt/74923728/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list