From 002f38a44a774648e88bc559f2b739e777a49017 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Fri, 17 Apr 2020 17:37:47 +0200 Subject: OvmfPkg/ResetSystemLib: clean up library dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Annotate the #include directives with the interfaces that this lib instance needs from the included lib class headers. This will help us keep the #include set minimal, when we move code around later. While at it, synchronize the [LibraryClasses] section with the #include directives -- list BaseLib. Also #include the ResetSystemLib class header, which declares the interfaces that this lib instance implements. This forces us to spell out the "MdeModulePkg.dec" dependency too, under [Packages]. Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Philippe Mathieu-Daudé Cc: Rebecca Cran Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2675 Signed-off-by: Laszlo Ersek Message-Id: <20200417153751.7110-3-lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Ard Biesheuvel Reviewed-by: Rebecca Cran --- OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c | 17 +++++++++-------- OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf | 2 ++ 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'OvmfPkg/Library/ResetSystemLib') diff --git a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c b/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c index b3abda80e7..23816183a9 100644 --- a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c +++ b/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c @@ -6,14 +6,15 @@ **/ -#include - -#include -#include -#include -#include -#include -#include +#include // BIT1 + +#include // CpuDeadLoop() +#include // ASSERT() +#include // IoWrite8() +#include // PciRead16() +#include // ResetCold() +#include // MicroSecondDelay() +#include // OVMF_HOSTBRIDGE_DID VOID AcpiPmControl ( diff --git a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf b/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf index 063dc49f24..af20f516c0 100644 --- a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf +++ b/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf @@ -25,10 +25,12 @@ ResetSystemLib.c [Packages] + MdeModulePkg/MdeModulePkg.dec MdePkg/MdePkg.dec OvmfPkg/OvmfPkg.dec [LibraryClasses] + BaseLib DebugLib IoLib PciLib -- cgit v1.2.3