summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/QemuFlashFvbServicesRuntimeDxe
diff options
context:
space:
mode:
authorBrijesh Singh <brijesh.singh@amd.com>2021-05-19 13:19:47 -0500
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-05-29 12:15:21 +0000
commit8ee4e52ba8dc3930512e7f6076aa76bac2e2815e (patch)
tree4a7bb17cbb8700c617add00339a1659450d5677e /OvmfPkg/QemuFlashFvbServicesRuntimeDxe
parentc394fa4c9eef5621e419e51e28ba0de5ba7ec2a3 (diff)
downloadedk2-8ee4e52ba8dc3930512e7f6076aa76bac2e2815e.tar.gz
edk2-8ee4e52ba8dc3930512e7f6076aa76bac2e2815e.tar.bz2
edk2-8ee4e52ba8dc3930512e7f6076aa76bac2e2815e.zip
OvmfPkg/QemuFlashFvbServicesRuntimeDxe: use Mmio helper to clear enc mask
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275 Use the MemEncryptSevClearMmioPageEncMask() to clear memory encryption mask for the Mmio address range. Cc: James Bottomley <jejb@linux.ibm.com> Cc: Min Xu <min.m.xu@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Erdem Aktas <erdemaktas@google.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com> Message-Id: <20210519181949.6574-12-brijesh.singh@amd.com>
Diffstat (limited to 'OvmfPkg/QemuFlashFvbServicesRuntimeDxe')
-rw-r--r--OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockServiceDxe.c5
-rw-r--r--OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashSmm.c5
2 files changed, 4 insertions, 6 deletions
diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockServiceDxe.c b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockServiceDxe.c
index 1f285e0083..ab40087a84 100644
--- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockServiceDxe.c
+++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockServiceDxe.c
@@ -205,11 +205,10 @@ MarkIoMemoryRangeForRuntimeAccess (
// memory range.
//
if (MemEncryptSevIsEnabled ()) {
- Status = MemEncryptSevClearPageEncMask (
+ Status = MemEncryptSevClearMmioPageEncMask (
0,
BaseAddress,
- EFI_SIZE_TO_PAGES (Length),
- FALSE
+ EFI_SIZE_TO_PAGES (Length)
);
ASSERT_EFI_ERROR (Status);
}
diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashSmm.c b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashSmm.c
index 7eb80bfeff..ea75b489c7 100644
--- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashSmm.c
+++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashSmm.c
@@ -38,11 +38,10 @@ QemuFlashBeforeProbe (
// C-bit on flash ranges from SMM page table.
//
- Status = MemEncryptSevClearPageEncMask (
+ Status = MemEncryptSevClearMmioPageEncMask (
0,
BaseAddress,
- EFI_SIZE_TO_PAGES (FdBlockSize * FdBlockCount),
- FALSE
+ EFI_SIZE_TO_PAGES (FdBlockSize * FdBlockCount)
);
ASSERT_EFI_ERROR (Status);
}