[PATCH 1/1] efi_loader: printing TCG2 protocol GUID

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Sun Jan 16 21:04:35 CET 2022


We support the TCG2 protocol. Allow command efidebug to print it.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
This is a follow-up to
[PATCH 0/8] efi_loader: simplify printing GUIDs
https://lists.denx.de/pipermail/u-boot/2022-January/472092.html
---
 include/efi_api.h  | 4 ++++
 include/efi_tcg2.h | 4 ----
 lib/uuid.c         | 4 ++++
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/include/efi_api.h b/include/efi_api.h
index a60d1bc416..8d5d835bd0 100644
--- a/include/efi_api.h
+++ b/include/efi_api.h
@@ -434,6 +434,10 @@ struct efi_runtime_services {
 	EFI_GUID(0xe617d64c, 0xfe08, 0x46da, 0xf4, 0xdc, \
 		 0xbb, 0xd5, 0x87, 0x0c, 0x73, 0x00)
 
+#define EFI_TCG2_PROTOCOL_GUID \
+	EFI_GUID(0x607f766c, 0x7455, 0x42be, 0x93, \
+		 0x0b, 0xe4, 0xd7, 0x6d, 0xb2, 0x72, 0x0f)
+
 /**
  * struct efi_configuration_table - EFI Configuration Table
  *
diff --git a/include/efi_tcg2.h b/include/efi_tcg2.h
index 50a59f9263..874306dc11 100644
--- a/include/efi_tcg2.h
+++ b/include/efi_tcg2.h
@@ -19,10 +19,6 @@
 #include <efi_api.h>
 #include <tpm-v2.h>
 
-#define EFI_TCG2_PROTOCOL_GUID \
-	EFI_GUID(0x607f766c, 0x7455, 0x42be, 0x93, \
-		 0x0b, 0xe4, 0xd7, 0x6d, 0xb2, 0x72, 0x0f)
-
 /* TPMV2 only */
 #define TCG2_EVENT_LOG_FORMAT_TCG_2 0x00000002
 #define EFI_TCG2_EXTEND_ONLY 0x0000000000000001
diff --git a/lib/uuid.c b/lib/uuid.c
index 3ffaab7d15..24571ef5fb 100644
--- a/lib/uuid.c
+++ b/lib/uuid.c
@@ -183,6 +183,10 @@ static const struct {
 		"Device-Tree Fixup",
 		EFI_DT_FIXUP_PROTOCOL_GUID,
 	},
+	{
+		"TCG2",
+		EFI_TCG2_PROTOCOL_GUID,
+		},
 	{
 		"System Partition",
 		PARTITION_SYSTEM_GUID
-- 
2.33.1



More information about the U-Boot mailing list