summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/IoMmuDxe
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2017-08-02 12:11:50 +0200
committerLaszlo Ersek <lersek@redhat.com>2017-08-05 01:31:53 +0200
commitdb7ea4d7c4c2740c91a0727949b68d12de9e866c (patch)
treec34f61f30f6866c15ef0f1caa0d81e2de35c563c /OvmfPkg/IoMmuDxe
parentdb1250792c158031f7c6e709ce251d42d2f8fe8e (diff)
downloadedk2-db7ea4d7c4c2740c91a0727949b68d12de9e866c.tar.gz
edk2-db7ea4d7c4c2740c91a0727949b68d12de9e866c.tar.bz2
edk2-db7ea4d7c4c2740c91a0727949b68d12de9e866c.zip
OvmfPkg/IoMmuDxe: clean up used library classes
The following library classes are not used by this module, so remove them from the INF file's [LibraryClasses] section: - DxeServicesTableLib - UefiLib The following library classes are used by this module, so add them to the INF file's [LibraryClasses] section: - BaseMemoryLib (e.g. via CopyMem()) - MemoryAllocationLib (e.g. via AllocatePool()) Sort the list of library classes (in both "IoMmuDxe.inf" and "AmdSevIoMmu.h"). Remove all non-local #include directives from "IoMmuDxe.c"; both C files of this module include "AmdSevIoMmu.h", and "AmdSevIoMmu.h" includes all non-local headers already. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Brijesh Singh <brijesh.singh@amd.com> Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>
Diffstat (limited to 'OvmfPkg/IoMmuDxe')
-rw-r--r--OvmfPkg/IoMmuDxe/AmdSevIoMmu.h4
-rw-r--r--OvmfPkg/IoMmuDxe/IoMmuDxe.c9
-rw-r--r--OvmfPkg/IoMmuDxe/IoMmuDxe.inf8
3 files changed, 6 insertions, 15 deletions
diff --git a/OvmfPkg/IoMmuDxe/AmdSevIoMmu.h b/OvmfPkg/IoMmuDxe/AmdSevIoMmu.h
index 17d3694e4a..c15fa76c3c 100644
--- a/OvmfPkg/IoMmuDxe/AmdSevIoMmu.h
+++ b/OvmfPkg/IoMmuDxe/AmdSevIoMmu.h
@@ -24,11 +24,11 @@
#include <Protocol/IoMmu.h>
#include <Library/BaseLib.h>
-#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
+#include <Library/DebugLib.h>
+#include <Library/MemEncryptSevLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
-#include <Library/MemEncryptSevLib.h>
/**
Install IOMMU protocol to provide the DMA support for PciHostBridge and
diff --git a/OvmfPkg/IoMmuDxe/IoMmuDxe.c b/OvmfPkg/IoMmuDxe/IoMmuDxe.c
index 0ea42cbc13..70d30ea916 100644
--- a/OvmfPkg/IoMmuDxe/IoMmuDxe.c
+++ b/OvmfPkg/IoMmuDxe/IoMmuDxe.c
@@ -15,15 +15,6 @@
**/
-#include <PiDxe.h>
-
-#include <Library/BaseLib.h>
-#include <Library/DebugLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/MemoryAllocationLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/MemEncryptSevLib.h>
-
#include "AmdSevIoMmu.h"
EFI_STATUS
diff --git a/OvmfPkg/IoMmuDxe/IoMmuDxe.inf b/OvmfPkg/IoMmuDxe/IoMmuDxe.inf
index 21dc39b923..3078497068 100644
--- a/OvmfPkg/IoMmuDxe/IoMmuDxe.inf
+++ b/OvmfPkg/IoMmuDxe/IoMmuDxe.inf
@@ -35,12 +35,12 @@
[LibraryClasses]
BaseLib
- UefiLib
- UefiDriverEntryPoint
- UefiBootServicesTableLib
- DxeServicesTableLib
+ BaseMemoryLib
DebugLib
MemEncryptSevLib
+ MemoryAllocationLib
+ UefiBootServicesTableLib
+ UefiDriverEntryPoint
[Protocols]
gEdkiiIoMmuProtocolGuid ## SOMETIME_PRODUCES