[U-Boot] [PATCH 1/1] efi_loader: debug messages for protocol interfaces

Heinrich Schuchardt xypron.glpk at gmx.de
Sun Jul 30 14:12:36 UTC 2017


Write debug messages with the adresses of the protocol interfaces.
This information is needed to understand the debug messages for
efi_open_protocol and other functions.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 cmd/bootefi.c                | 5 +++++
 lib/efi_loader/efi_console.c | 4 ++++
 lib/efi_loader/efi_gop.c     | 2 ++
 lib/efi_loader/efi_net.c     | 2 ++
 4 files changed, 13 insertions(+)

diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index d20775eccd..cbee84dbe2 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -111,6 +111,11 @@ static void efi_init_obj_list(void)
 {
 	efi_obj_list_initalized = 1;
 
+	debug("EFI: loaded_image_info: 0x%p\n",
+	      &loaded_image_info);
+	debug("EFI: bootefi_device_path: 0x%p\n",
+	      bootefi_device_path);
+
 	list_add_tail(&loaded_image_info_obj.link, &efi_obj_list);
 	list_add_tail(&bootefi_device_obj.link, &efi_obj_list);
 	efi_console_register();
diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c
index f8567eb597..feee6dbf44 100644
--- a/lib/efi_loader/efi_console.c
+++ b/lib/efi_loader/efi_console.c
@@ -463,6 +463,10 @@ int efi_console_register(void)
 {
 	efi_status_t r;
 
+	debug("EFI: console_control: 0x%p\n", &efi_console_control);
+	debug("EFI: console_output: 0x%p\n", &efi_con_out);
+	debug("EFI: console_input: 0x%p\n", &efi_con_in);
+
 	/* Hook up to the device list */
 	list_add_tail(&efi_console_control_obj.link, &efi_obj_list);
 	list_add_tail(&efi_console_output_obj.link, &efi_obj_list);
diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c
index 806cfaeea1..c5d057dc5a 100644
--- a/lib/efi_loader/efi_gop.c
+++ b/lib/efi_loader/efi_gop.c
@@ -174,6 +174,8 @@ int efi_gop_register(void)
 
 	gopobj = calloc(1, sizeof(*gopobj));
 
+	debug("EFI: gobobj: 0x%p\n", &gopobj->ops);
+
 	/* Fill in object data */
 	gopobj->parent.protocols[0].guid = &efi_gop_guid;
 	gopobj->parent.protocols[0].protocol_interface = &gopobj->ops;
diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c
index 0b949d86e8..1822880168 100644
--- a/lib/efi_loader/efi_net.c
+++ b/lib/efi_loader/efi_net.c
@@ -232,6 +232,8 @@ int efi_net_register(void **handle)
 	/* We only expose the "active" eth device, so one is enough */
 	netobj = calloc(1, sizeof(*netobj));
 
+	debug("EFI: netobj: 0x%p\n", &netobj->net);
+
 	/* Fill in object data */
 	netobj->parent.protocols[0].guid = &efi_net_guid;
 	netobj->parent.protocols[0].protocol_interface = &netobj->net;
-- 
2.13.2



More information about the U-Boot mailing list