]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/Tcg2ConfigPei: clean up some lib class dependencies
authorLaszlo Ersek <lersek@redhat.com>
Wed, 20 May 2020 22:58:39 +0000 (00:58 +0200)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 21 May 2020 12:23:37 +0000 (12:23 +0000)
Commit 89236992913f introduced an explicit Tpm12CommandLib dependency to
Tcg2ConfigPei.

In reality this lib class is not consumed by Tcg2ConfigPei at all (such a
dependency is not even inherited from other lib instances). Simplify the
module by dropping the superfluous dependency.

(The Tpm12CommandLib class resolution that was also added in commit
89236992913f is not useless, at the platform build level: it is consumed
by TcgPei and TcgDxe. Meaning that said Tpm12CommandLib resolution should
have likely been a part of the subsequent patch in the original series,
namely commit 6be54f15a0c9.)

Commit 89236992913f also introduced SwapBytesXx() calls. Those functions
are provided by BaseLib. Spell out the BaseLib dependency.

Functionally, this patch is a no-op.

Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Eric Auger <eric.auger@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Simon Hardy <simon.hardy@itdev.co.uk>
Cc: Stefan Berger <stefanb@linux.ibm.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2728
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20200520225841.17793-2-lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf
OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c

index 97c529c91d0bf31d24abf08f7610de96f9dd2762..b79d0a3fb91282243114ed92cc974fd4c65defb7 100644 (file)
@@ -30,9 +30,9 @@
 \r
 [LibraryClasses]\r
   PeimEntryPoint\r
+  BaseLib\r
   DebugLib\r
   PeiServicesLib\r
-  Tpm12CommandLib\r
   Tpm12DeviceLib\r
   Tpm2DeviceLib\r
 \r
index 5b5075bded92b15738c4c4984fc1f94dcce75884..44abd6c541f9b12f36fe541f20505d535afe6914 100644 (file)
 #include <PiPei.h>\r
 \r
 #include <Guid/TpmInstance.h>\r
+#include <Library/BaseLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/PeiServicesLib.h>\r
 #include <Library/Tpm2DeviceLib.h>\r
 #include <Library/Tpm12DeviceLib.h>\r
-#include <Library/Tpm12CommandLib.h>\r
 #include <Ppi/TpmInitialized.h>\r
 \r
 STATIC CONST EFI_PEI_PPI_DESCRIPTOR mTpmSelectedPpi = {\r