]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Library/PlatformHasIoMmuLib/PlatformHasIoMmuLib.c
OvmfPkg: Add PlatformHasIoMmuLib
[mirror_edk2.git] / OvmfPkg / Library / PlatformHasIoMmuLib / PlatformHasIoMmuLib.c
1 /** @file
2 A hook-in library for MdeModulePkg/Bus/Pci/PciHostBridgeDxe.
3
4 Plugging this library instance into PciHostBridgeDxe makes
5 PciHostBridgeDxe depend on the platform's dynamic decision whether
6 to provide IOMMU implementation (usually through IoMmuDxe driver).
7
8 Copyright (C) 2017, Red Hat, Inc.
9 Copyright (C) 2017, AMD, Inc.
10
11 This program and the accompanying materials are licensed and made available
12 under the terms and conditions of the BSD License which accompanies this
13 distribution. The full text of the license may be found at
14 http://opensource.org/licenses/bsd-license.php
15
16 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
17 WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 **/
19
20 #include <Base.h>
21
22 RETURN_STATUS
23 EFIAPI
24 PlatformHasIoMmuInitialize (
25 VOID
26 )
27 {
28 //
29 // Do nothing, just imbue PciHostBridgeDxe with a protocol dependency on
30 // gIoMmuAbsentProtocolGuid OR gEdkiiIoMmuProtocolGuid.
31 //
32 return RETURN_SUCCESS;
33 }