]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/ResetSystemLib: clean up library dependencies
authorLaszlo Ersek <lersek@redhat.com>
Fri, 17 Apr 2020 15:37:47 +0000 (17:37 +0200)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 22 Apr 2020 19:42:32 +0000 (19:42 +0000)
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>
OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c
OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf

index b3abda80e75a152bc76afa1f112e577345fc1d17..23816183a95371d4bbacd7ace7f06d4ce2c2978d 100644 (file)
@@ -6,14 +6,15 @@
 \r
 **/\r
 \r
-#include <Base.h>\r
-\r
-#include <Library/BaseLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/IoLib.h>\r
-#include <Library/PciLib.h>\r
-#include <Library/TimerLib.h>\r
-#include <OvmfPlatforms.h>\r
+#include <Base.h>                   // BIT1\r
+\r
+#include <Library/BaseLib.h>        // CpuDeadLoop()\r
+#include <Library/DebugLib.h>       // ASSERT()\r
+#include <Library/IoLib.h>          // IoWrite8()\r
+#include <Library/PciLib.h>         // PciRead16()\r
+#include <Library/ResetSystemLib.h> // ResetCold()\r
+#include <Library/TimerLib.h>       // MicroSecondDelay()\r
+#include <OvmfPlatforms.h>          // OVMF_HOSTBRIDGE_DID\r
 \r
 VOID\r
 AcpiPmControl (\r
index 063dc49f2453a98322e72b8aece6a71be2e1697b..af20f516c03537c55da58aca022d6f92afc54a31 100644 (file)
   ResetSystemLib.c\r
 \r
 [Packages]\r
+  MdeModulePkg/MdeModulePkg.dec\r
   MdePkg/MdePkg.dec\r
   OvmfPkg/OvmfPkg.dec\r
 \r
 [LibraryClasses]\r
+  BaseLib\r
   DebugLib\r
   IoLib\r
   PciLib\r