File ovmf.mBusMasterOperationName.patch of Package xen
From: Olaf Hering <olaf@aepfle.de>
Date: Wed, 24 Nov 2021 11:50:00 +0100
Subject: mBusMasterOperationName
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
/home/abuild/rpmbuild/BUILD/xen-4.16.20211123T164349.59505f48fa/non-dbg/tools/firmware/ovmf-dir-remote/OvmfPkg/IoMmuDxe/AmdSevIoMmu.c:42:1: error: ‘mBusMasterOperationName’ defined but not used [-Werror=unused-const-variable=]
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
OvmfPkg/IoMmuDxe/CcIoMmu.c | 1 +
1 file changed, 1 insertion(+)
--- a/OvmfPkg/IoMmuDxe/CcIoMmu.c
+++ b/OvmfPkg/IoMmuDxe/CcIoMmu.c
@@ -80,24 +80,25 @@ IoMmuMap (
IN VOID *HostAddress,
IN OUT UINTN *NumberOfBytes,
OUT EFI_PHYSICAL_ADDRESS *DeviceAddress,
OUT VOID **Mapping
)
{
EFI_STATUS Status;
MAP_INFO *MapInfo;
EFI_ALLOCATE_TYPE AllocateType;
COMMON_BUFFER_HEADER *CommonBufferHeader;
VOID *DecryptionSource;
+ Status = Operation >= 0 && Operation < ARRAY_SIZE (mBusMasterOperationName);
DEBUG ((
DEBUG_VERBOSE,
"%a: Operation=%a Host=0x%p Bytes=0x%Lx\n",
__func__,
((Operation >= 0 &&
Operation < ARRAY_SIZE (mBusMasterOperationName)) ?
mBusMasterOperationName[Operation] :
"Invalid"),
HostAddress,
(UINT64)((NumberOfBytes == NULL) ? 0 : *NumberOfBytes)
));