aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArd Biesheuvel <[email protected]>2019-12-24 16:10:16 +0100
committerIngo Molnar <[email protected]>2019-12-25 10:49:21 +0100
commitdc29da14ed94a005ed2a590ec86aa8a572fea4a9 (patch)
tree627c1b2946a7b339fe8a416da219a6c191754be9
parent2fcdad2a80a6d6fd0f77205108232d1adc709a84 (diff)
efi/libstub: Unify the efi_char16_printk implementations
Use a single implementation for efi_char16_printk() across all architectures. Signed-off-by: Ard Biesheuvel <[email protected]> Cc: Arvind Sankar <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: James Morse <[email protected]> Cc: Matt Fleming <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r--arch/x86/boot/compressed/eboot.c7
-rw-r--r--drivers/firmware/efi/libstub/arm-stub.c9
-rw-r--r--drivers/firmware/efi/libstub/efi-stub-helper.c9
3 files changed, 9 insertions, 16 deletions
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index 3a7c900b9c66..5fb12827bdc2 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -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)
{
diff --git a/drivers/firmware/efi/libstub/arm-stub.c b/drivers/firmware/efi/libstub/arm-stub.c
index 47f072ac3f30..b44b1bd4d480 100644
--- a/drivers/firmware/efi/libstub/arm-stub.c
+++ b/drivers/firmware/efi/libstub/arm-stub.c
@@ -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;
diff --git a/drivers/firmware/efi/libstub/efi-stub-helper.c b/drivers/firmware/efi/libstub/efi-stub-helper.c
index 9bb74ad4b7fe..f74b514789d7 100644
--- a/drivers/firmware/efi/libstub/efi-stub-helper.c
+++ b/drivers/firmware/efi/libstub/efi-stub-helper.c
@@ -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);
+}