mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
efi_loader: expose protocols via GUID
shim.efi (or rather gnu-efi's LibLocateProtocol() which shim.efi uses) resolves protocols via efi_locate_handle() so the console protocols need to be added to the efi object list. Signed-off-by: Rob Clark <robdclark@gmail.com> [agraf: whitespace fixes] Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:

committed by
Alexander Graf

parent
641833db4a
commit
a17e62cc53
@ -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) {
|
||||
|
Reference in New Issue
Block a user