audk/OvmfPkg/IoMmuDxe/IoMmuDxe.inf
Ard Biesheuvel dfb941d32a OvmfPkg/IoMmuDxe: don't rely on TPLs to manage concurrency
Instead of relying on raising the TPL to protect the critical sections
that manipulate the global bitmask that keeps track of bounce buffer
allocations, use compare-and-exchange to manage the global variable, and
tweak the logic to line up with that.

Given that IoMmuDxe implements a singleton protocol that is shared
between multiple drivers, and considering the elaborate and confusing
requirements in the UEFP spec regarding TPL levels at which protocol
methods may be invoked, not relying on TPL levels at all is a more
robust approach in this case.

Link: https://bugzilla.redhat.com/show_bug.cgi?id=2211060
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Pedro Falcato <pedro.falcato@gmail.com>
2023-09-02 14:52:28 +00:00

51 lines
1.1 KiB
INI

#/** @file
#
# Driver provides the IOMMU protcol support for PciHostBridgeIo and others
# drivers.
#
# Copyright (c) 2017, AMD Inc. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
#**/
[Defines]
INF_VERSION = 1.25
BASE_NAME = IoMmuDxe
FILE_GUID = 8657015b-ea43-440d-949a-af3be365c0fc
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
ENTRY_POINT = IoMmuDxeEntryPoint
[Sources]
CcIoMmu.c
CcIoMmu.h
IoMmuDxe.c
IoMmuBuffer.c
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
OvmfPkg/OvmfPkg.dec
[LibraryClasses]
BaseLib
BaseMemoryLib
DebugLib
MemEncryptSevLib
MemEncryptTdxLib
MemoryAllocationLib
SynchronizationLib
UefiBootServicesTableLib
UefiDriverEntryPoint
[Pcd]
gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr
[Protocols]
gEdkiiIoMmuProtocolGuid ## SOMETIME_PRODUCES
gIoMmuAbsentProtocolGuid ## SOMETIME_PRODUCES
[Depex]
TRUE