]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/QemuFlashFvbServicesRuntimeDxe: Set the SwScratch valid bit
authorTom Lendacky <thomas.lendacky@amd.com>
Fri, 6 Nov 2020 17:53:10 +0000 (11:53 -0600)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 10 Nov 2020 19:07:55 +0000 (19:07 +0000)
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3008

All fields that are set in the GHCB should have their associated bit in
the GHCB ValidBitmap field set. Add support to set the bit for the scratch
area field (SwScratch).

Fixes: 437eb3f7a8db7681afe0e6064d3a8edb12abb766
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Message-Id: <cc8c8449740d2be0b287e6c69d48bf6cb067c7d8.1604685192.git.thomas.lendacky@amd.com>

OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c

index 565383ee26d2324acc1a747d92f0d4825c6a5fd8..f9b21b54137d416be671d0e3cf345058871e3d34 100644 (file)
@@ -66,6 +66,7 @@ QemuFlashPtrWrite (
     VmgInit (Ghcb);\r
     Ghcb->SharedBuffer[0] = Value;\r
     Ghcb->SaveArea.SwScratch = (UINT64) (UINTN) Ghcb->SharedBuffer;\r
+    VmgSetOffsetValid (Ghcb, GhcbSwScratch);\r
     VmgExit (Ghcb, SVM_EXIT_MMIO_WRITE, (UINT64) (UINTN) Ptr, 1);\r
     VmgDone (Ghcb);\r
   } else {\r