OvmfPkg/TpmMmioSevDecryptPei: use MemEncryptSevClearMmioPageEncMask()

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-13-brijesh.singh@amd.com>
This commit is contained in:
Brijesh Singh 2021-05-19 13:19:48 -05:00 committed by mergify[bot]
parent 8ee4e52ba8
commit b4a8de5d27
1 changed files with 2 additions and 3 deletions

View File

@ -62,11 +62,10 @@ TpmMmioSevDecryptPeimEntryPoint (
"%a: mapping TPM MMIO address range unencrypted\n", "%a: mapping TPM MMIO address range unencrypted\n",
__FUNCTION__)); __FUNCTION__));
DecryptStatus = MemEncryptSevClearPageEncMask ( DecryptStatus = MemEncryptSevClearMmioPageEncMask (
0, 0,
FixedPcdGet64 (PcdTpmBaseAddress), FixedPcdGet64 (PcdTpmBaseAddress),
EFI_SIZE_TO_PAGES ((UINTN) 0x5000), EFI_SIZE_TO_PAGES ((UINTN) 0x5000)
FALSE
); );
if (RETURN_ERROR (DecryptStatus)) { if (RETURN_ERROR (DecryptStatus)) {