mirror of https://github.com/acidanthera/audk.git
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>
This commit is contained in:
parent
c394fa4c9e
commit
8ee4e52ba8
|
@ -205,11 +205,10 @@ MarkIoMemoryRangeForRuntimeAccess (
|
||||||
// memory range.
|
// memory range.
|
||||||
//
|
//
|
||||||
if (MemEncryptSevIsEnabled ()) {
|
if (MemEncryptSevIsEnabled ()) {
|
||||||
Status = MemEncryptSevClearPageEncMask (
|
Status = MemEncryptSevClearMmioPageEncMask (
|
||||||
0,
|
0,
|
||||||
BaseAddress,
|
BaseAddress,
|
||||||
EFI_SIZE_TO_PAGES (Length),
|
EFI_SIZE_TO_PAGES (Length)
|
||||||
FALSE
|
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,11 +38,10 @@ QemuFlashBeforeProbe (
|
||||||
// C-bit on flash ranges from SMM page table.
|
// C-bit on flash ranges from SMM page table.
|
||||||
//
|
//
|
||||||
|
|
||||||
Status = MemEncryptSevClearPageEncMask (
|
Status = MemEncryptSevClearMmioPageEncMask (
|
||||||
0,
|
0,
|
||||||
BaseAddress,
|
BaseAddress,
|
||||||
EFI_SIZE_TO_PAGES (FdBlockSize * FdBlockCount),
|
EFI_SIZE_TO_PAGES (FdBlockSize * FdBlockCount)
|
||||||
FALSE
|
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue