On 10/10/20 18:07, Tom Lendacky wrote:
> From: Tom Lendacky <thomas.lendacky@amd.com>
>
> The original SEV-ES support missed updating the QemuFlashEraseBlock()
> function to successfully erase blocks. Update QemuFlashEraseBlock() to
> call the QemuFlashPtrWrite() to be able to successfully perform the
> commands under SEV-ES.
>
> Fixes: 437eb3f7a8db ("OvmfPkg/QemuFlashFvbServicesRuntimeDxe: Bypass flash detection with SEV-ES")
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
> ---
> OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c
> index 0d29bf701aca..d19997032ec9 100644
> --- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c
> +++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c
> @@ -232,8 +232,8 @@ QemuFlashEraseBlock (
> }
>
> Ptr = QemuFlashPtr (Lba, 0);
> - *Ptr = BLOCK_ERASE_CMD;
> - *Ptr = BLOCK_ERASE_CONFIRM_CMD;
> + QemuFlashPtrWrite (Ptr, BLOCK_ERASE_CMD);
> + QemuFlashPtrWrite (Ptr, BLOCK_ERASE_CONFIRM_CMD);
> return EFI_SUCCESS;
> }
>
>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Sorry for not noticing this during review.
Thanks
Laszlo
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#66246): https://edk2.groups.io/g/devel/message/66246
Mute This Topic: https://groups.io/mt/77425920/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-