diff options
-rw-r--r-- | OvmfPkg/IoMmuDxe/AmdSevIoMmu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c b/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c index 8c2c23356a..d899b0ab9e 100644 --- a/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c +++ b/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c @@ -280,6 +280,10 @@ IoMmuUnmap ( TRUE
);
ASSERT_EFI_ERROR(Status);
+ ZeroMem (
+ (VOID*)(UINTN)MapInfo->PlainTextAddress,
+ EFI_PAGES_TO_SIZE (MapInfo->NumberOfPages)
+ );
//
// Free the mapped buffer and the MAP_INFO structure.
@@ -414,6 +418,7 @@ IoMmuFreeBuffer ( TRUE
);
ASSERT_EFI_ERROR(Status);
+ ZeroMem (HostAddress, EFI_PAGES_TO_SIZE (Pages));
DEBUG ((
DEBUG_VERBOSE,
|