On 4/17/20 5:37 PM, Laszlo Ersek wrote:
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.biesheu...@arm.com>
Cc: Jordan Justen <jordan.l.jus...@intel.com>
Cc: Philippe Mathieu-Daudé <phi...@redhat.com>
Cc: Rebecca Cran <rebe...@bsdio.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2675
Signed-off-by: Laszlo Ersek <ler...@redhat.com>
---
OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf | 2 ++
OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c | 15 ++++++++-------
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf
b/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf
index 063dc49f2453..af20f516c035 100644
--- a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf
+++ b/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.inf
@@ -25,10 +25,12 @@ [Sources]
ResetSystemLib.c
[Packages]
+ MdeModulePkg/MdeModulePkg.dec
MdePkg/MdePkg.dec
OvmfPkg/OvmfPkg.dec
[LibraryClasses]
+ BaseLib
DebugLib
IoLib
PciLib
diff --git a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c
b/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c
index b3abda80e75a..23816183a953 100644
--- a/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c
+++ b/OvmfPkg/Library/ResetSystemLib/ResetSystemLib.c
@@ -6,14 +6,15 @@
**/
-#include <Base.h>
+#include <Base.h> // BIT1
-#include <Library/BaseLib.h>
-#include <Library/DebugLib.h>
-#include <Library/IoLib.h>
-#include <Library/PciLib.h>
-#include <Library/TimerLib.h>
-#include <OvmfPlatforms.h>
+#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 (
Reviewed-by: Philippe Mathieu-Daude <phi...@redhat.com>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#57526): https://edk2.groups.io/g/devel/message/57526
Mute This Topic: https://groups.io/mt/73085500/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-