From b4a8de5d27cdad6fc2dad01770d9bde372d87f7e Mon Sep 17 00:00:00 2001 From: Brijesh Singh Date: Wed, 19 May 2021 13:19:48 -0500 Subject: 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 Cc: Min Xu Cc: Jiewen Yao Cc: Tom Lendacky Cc: Jordan Justen Cc: Ard Biesheuvel Cc: Laszlo Ersek Cc: Erdem Aktas Reviewed-by: Laszlo Ersek Signed-off-by: Brijesh Singh Message-Id: <20210519181949.6574-13-brijesh.singh@amd.com> --- OvmfPkg/Tcg/TpmMmioSevDecryptPei/TpmMmioSevDecryptPeim.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'OvmfPkg') diff --git a/OvmfPkg/Tcg/TpmMmioSevDecryptPei/TpmMmioSevDecryptPeim.c b/OvmfPkg/Tcg/TpmMmioSevDecryptPei/TpmMmioSevDecryptPeim.c index df2ad62330..570c8467a6 100644 --- a/OvmfPkg/Tcg/TpmMmioSevDecryptPei/TpmMmioSevDecryptPeim.c +++ b/OvmfPkg/Tcg/TpmMmioSevDecryptPei/TpmMmioSevDecryptPeim.c @@ -62,11 +62,10 @@ TpmMmioSevDecryptPeimEntryPoint ( "%a: mapping TPM MMIO address range unencrypted\n", __FUNCTION__)); - DecryptStatus = MemEncryptSevClearPageEncMask ( + DecryptStatus = MemEncryptSevClearMmioPageEncMask ( 0, FixedPcdGet64 (PcdTpmBaseAddress), - EFI_SIZE_TO_PAGES ((UINTN) 0x5000), - FALSE + EFI_SIZE_TO_PAGES ((UINTN) 0x5000) ); if (RETURN_ERROR (DecryptStatus)) { -- cgit v1.2.3