summaryrefslogtreecommitdiffstats
path: root/lib/efi_loader/efi_console.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2018-09-04 14:59:11 +0200
committerAlexander Graf <agraf@suse.de>2018-09-23 21:55:29 +0200
commit40e3e75760b5b19b5eabb51286f6e1ed8ff453cf (patch)
treedada193816eebd8b718fc5e3ad3a3ffbdb208162 /lib/efi_loader/efi_console.c
parent0414359aa025273717188012a0f73c651b7037ce (diff)
downloadu-boot-40e3e75760b5b19b5eabb51286f6e1ed8ff453cf.tar.gz
u-boot-40e3e75760b5b19b5eabb51286f6e1ed8ff453cf.tar.xz
u-boot-40e3e75760b5b19b5eabb51286f6e1ed8ff453cf.zip
efi_loader: Add console handle references to in/out/err
We register the console in/out protocol on the loaded image handle, but never tell anyone about it in the systab. Because of this Shell.efi can not find the input protocol. So let's add a proper reference. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib/efi_loader/efi_console.c')
-rw-r--r--lib/efi_loader/efi_console.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c
index f5f3f256dd..277eb91e52 100644
--- a/lib/efi_loader/efi_console.c
+++ b/lib/efi_loader/efi_console.c
@@ -604,17 +604,23 @@ int efi_console_register(void)
r = efi_create_handle((efi_handle_t *)&efi_console_output_obj);
if (r != EFI_SUCCESS)
goto out_of_memory;
+
r = efi_add_protocol(efi_console_output_obj->handle,
&efi_guid_text_output_protocol, &efi_con_out);
if (r != EFI_SUCCESS)
goto out_of_memory;
+ systab.con_out_handle = efi_console_output_obj->handle;
+ systab.stderr_handle = efi_console_output_obj->handle;
+
r = efi_create_handle((efi_handle_t *)&efi_console_input_obj);
if (r != EFI_SUCCESS)
goto out_of_memory;
+
r = efi_add_protocol(efi_console_input_obj->handle,
&efi_guid_text_input_protocol, &efi_con_in);
if (r != EFI_SUCCESS)
goto out_of_memory;
+ systab.con_in_handle = efi_console_input_obj->handle;
/* Create console events */
r = efi_create_event(EVT_NOTIFY_WAIT, TPL_CALLBACK, efi_key_notify,