From bf53ff2de2c2dab5b3e2186eac5310e78b38e413 Mon Sep 17 00:00:00 2001 From: Karel Gardas Date: Sun, 16 Apr 2023 23:01:58 +0200 Subject: bsps/amd64: add a new EFI-based variant of AMD64 BSP The new amd64efi BSP supports: - multiboot2 boot format. Runs well with GRUB. - console based on either EFI simple text output or GOP-based framebuffer - clock based on EFI event/timer API - early console using either hard-wired PC-AT serial or just memory buffer - with EFI support disabled the BSP is more or less equivalent to amd64 BSP with multiboot2 support --- bsps/x86_64/amd64/console/console.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'bsps/x86_64/amd64/console/console.c') diff --git a/bsps/x86_64/amd64/console/console.c b/bsps/x86_64/amd64/console/console.c index 5408c57fe7..cc650fcb65 100644 --- a/bsps/x86_64/amd64/console/console.c +++ b/bsps/x86_64/amd64/console/console.c @@ -30,6 +30,9 @@ #include #include +void +uart0_output_char(char); + static uint8_t amd64_uart_get_register(uintptr_t addr, uint8_t i) { return inport_byte(addr + i); @@ -61,12 +64,16 @@ const console_device console_device_table[] = { }; const size_t console_device_count = RTEMS_ARRAY_SIZE(console_device_table); -static void output_char(char c) +void uart0_output_char(char c) { rtems_termios_device_context *ctx = console_device_table[0].context; ns16550_polled_putchar(ctx, c); } -BSP_output_char_function_type BSP_output_char = output_char; +#ifndef BSP_USE_EFI_BOOT_SERVICES + +BSP_output_char_function_type BSP_output_char = uart0_output_char; BSP_polling_getchar_function_type BSP_poll_char = NULL; + +#endif -- cgit v1.2.3