diff options
author | Laszlo Ersek <lersek@redhat.com> | 2020-04-17 17:37:47 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-04-22 19:42:32 +0000 |
commit | 002f38a44a774648e88bc559f2b739e777a49017 (patch) | |
tree | abbdd4f40052ce8dbcd3b3b90118780b04e81546 | |
parent | b36fbd364588178bc71f3642b5a09d14fe9ae5f7 (diff) | |
download | edk2-002f38a44a774648e88bc559f2b739e777a49017.tar.gz edk2-002f38a44a774648e88bc559f2b739e777a49017.tar.bz2 edk2-002f38a44a774648e88bc559f2b739e777a49017.zip |
OvmfPkg/ResetSystemLib: clean up library dependencies
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 <ard.biesheuvel@arm.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Rebecca Cran <rebecca@bsdio.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2675
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20200417153751.7110-3-lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
-rw-r--r-- | OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c | 17 | ||||
-rw-r--r-- | OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf | 2 |
2 files changed, 11 insertions, 8 deletions
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 <Base.h>
-
-#include <Library/BaseLib.h>
-#include <Library/DebugLib.h>
-#include <Library/IoLib.h>
-#include <Library/PciLib.h>
-#include <Library/TimerLib.h>
-#include <OvmfPlatforms.h>
+#include <Base.h> // BIT1
+
+#include <Library/BaseLib.h> // CpuDeadLoop()
+#include <Library/DebugLib.h> // ASSERT()
+#include <Library/IoLib.h> // IoWrite8()
+#include <Library/PciLib.h> // PciRead16()
+#include <Library/ResetSystemLib.h> // ResetCold()
+#include <Library/TimerLib.h> // MicroSecondDelay()
+#include <OvmfPlatforms.h> // 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
|