Skip to content

Commit

Permalink
efi/libstub: Unify the efi_char16_printk implementations
Browse files Browse the repository at this point in the history
Use a single implementation for efi_char16_printk() across all
architectures.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Arvind Sankar <nivedita@alum.mit.edu>
Cc: Borislav Petkov <bp@alien8.de>
Cc: James Morse <james.morse@arm.com>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: https://lkml.kernel.org/r/20191224151025.32482-17-ardb@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Ard Biesheuvel authored and Ingo Molnar committed Dec 25, 2019
1 parent 2fcdad2 commit dc29da1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
7 changes: 0 additions & 7 deletions arch/x86/boot/compressed/eboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,6 @@ static void setup_boot_services##bits(struct efi_config *c) \
BOOT_SERVICES(32);
BOOT_SERVICES(64);

void efi_char16_printk(efi_system_table_t *table, efi_char16_t *str)
{
efi_call_proto(efi_simple_text_output_protocol, output_string,
((efi_simple_text_output_protocol_t *)(unsigned long)
efi_early->text_output), str);
}

static efi_status_t
preserve_pci_rom_image(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom)
{
Expand Down
9 changes: 0 additions & 9 deletions drivers/firmware/efi/libstub/arm-stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,6 @@ __pure efi_system_table_t *efi_system_table(void)
return sys_table;
}

void efi_char16_printk(efi_system_table_t *sys_table_arg,
efi_char16_t *str)
{
efi_simple_text_output_protocol_t *out;

out = (efi_simple_text_output_protocol_t *)sys_table_arg->con_out;
out->output_string(out, str);
}

static struct screen_info *setup_graphics(efi_system_table_t *sys_table_arg)
{
efi_guid_t gop_proto = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID;
Expand Down
9 changes: 9 additions & 0 deletions drivers/firmware/efi/libstub/efi-stub-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -955,3 +955,12 @@ void *get_efi_config_table(efi_system_table_t *sys_table, efi_guid_t guid)
}
return NULL;
}

void efi_char16_printk(efi_system_table_t *table, efi_char16_t *str)
{
efi_call_proto(efi_simple_text_output_protocol,
output_string,
efi_table_attr(efi_system_table, con_out,
efi_system_table()),
str);
}

0 comments on commit dc29da1

Please sign in to comment.