diff options
author | Karel Gardas <karel@functional.vision> | 2023-04-16 23:01:58 +0200 |
---|---|---|
committer | Karel Gardas <karel@functional.vision> | 2023-04-29 20:41:23 +0200 |
commit | bf53ff2de2c2dab5b3e2186eac5310e78b38e413 (patch) | |
tree | 2655fff7f0369e59e0474b155de28f647b0b5c56 /bsps/x86_64/amd64/console/console.c | |
parent | bsps/amd64: increase CPU alignment to 16 (diff) | |
download | rtems-bf53ff2de2c2dab5b3e2186eac5310e78b38e413.tar.bz2 |
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
Diffstat (limited to 'bsps/x86_64/amd64/console/console.c')
-rw-r--r-- | bsps/x86_64/amd64/console/console.c | 11 |
1 files changed, 9 insertions, 2 deletions
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 <bsp/console-termios.h> #include <rtems/score/cpuimpl.h> +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 |