diff options
Diffstat (limited to 'lib/efi_loader/efi_console.c')
-rw-r--r-- | lib/efi_loader/efi_console.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c index 95e632394fa..5ebce4b544d 100644 --- a/lib/efi_loader/efi_console.c +++ b/lib/efi_loader/efi_console.c @@ -442,10 +442,24 @@ static void EFIAPI efi_console_timer_notify(struct efi_event *event, EFI_EXIT(EFI_SUCCESS); } + +static struct efi_object efi_console_control_obj = + EFI_PROTOCOL_OBJECT(efi_guid_console_control, &efi_console_control); +static struct efi_object efi_console_output_obj = + EFI_PROTOCOL_OBJECT(EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID, &efi_con_out); +static struct efi_object efi_console_input_obj = + EFI_PROTOCOL_OBJECT(EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID, &efi_con_in); + /* This gets called from do_bootefi_exec(). */ int efi_console_register(void) { efi_status_t r; + + /* 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); + list_add_tail(&efi_console_input_obj.link, &efi_obj_list); + r = efi_create_event(EVT_NOTIFY_WAIT, TPL_CALLBACK, efi_key_notify, NULL, &efi_con_in.wait_for_key); if (r != EFI_SUCCESS) { |