From: jayaram <[email protected]> From: Desapogu Jayaramudu <[email protected]>
When the serial console is disabled in coreboot configuration, no display output is observed during boot. coreboot can expose serial console/debug-port information either through coreboot tables(lb_serial) in src/lib/coreboot_table.c or through ACPI DBG2 tables(RSDT/XSDT) during write_acpi_tables().When coreboot generates a DBG2 table,it is publishing UART/debug-port information (IO or MMIO) through ACPI for the operating system.By default coreboot assigned subtype (ACPI_DBG2_PORT_SERIAL_16550 = 0x12)for both IO/MEM in src/acpi/acpi.c. U-Boot as a coreboot payload consumes serial data either from coreboot table or ACPI DBG2.When serial console is disabled in coreboot config , the coreboot table contains no serial data.So U-boot fallback and check the ACPI DBG2 table for UART serial console using 'read_dbg2()' to find port type and subtype.Currently u-boot reads subtype as 0x12.But u-boot in include/acpi/acpi_table.h subtype defined as 0x0000 this value suppots only port I/O as per microsoft DBG2. For AMD platforms or any other platforms that use memory-mapped I/O,we see display issues when serial console is disabled in coreboot config. Fix this issue by ensuring DBG2 is correctly configured as a 16550-compatible UART, to support memory-mapped I/O in include/acpi/acpi_table.h and checking the correct subtype in drivers/serial/serial_coreboot.c. Signed-off-by: Desapogu Jayaramudu <[email protected]> --- drivers/serial/serial_coreboot.c | 2 +- include/acpi/acpi_table.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/serial/serial_coreboot.c b/drivers/serial/serial_coreboot.c index b1f69f6998cfa1..f6fc0fd8ae0f67 100644 --- a/drivers/serial/serial_coreboot.c +++ b/drivers/serial/serial_coreboot.c @@ -59,7 +59,7 @@ static int read_dbg2(struct ns16550_plat *plat) log_debug("Not a serial port\n"); return -EPROTOTYPE; } - if (dbg->port_subtype != ACPI_DBG2_16550_COMPATIBLE) { + if (dbg->port_subtype != ACPI_DBG2_16550_COMPATIBLE && dbg->port_subtype != ACPI_DBG2_16550_GAS) { log_debug("Incompatible serial port\n"); return -EPROTOTYPE; } diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h index 4895366a6188ec..aea608f0ffa7a0 100644 --- a/include/acpi/acpi_table.h +++ b/include/acpi/acpi_table.h @@ -668,6 +668,7 @@ struct __packed acpi_dmar { /* Subtypes for port_subtype field */ #define ACPI_DBG2_16550_COMPATIBLE 0x0000 +#define ACPI_DBG2_16550_GAS 0x0012 #define ACPI_DBG2_16550_SUBSET 0x0001 #define ACPI_DBG2_ARM_PL011 0x0003 #define ACPI_DBG2_ARM_SBSA_32BIT 0x000D -- 2.25.1

