From 780808133b756261c1c1a0aacb4c7067fc97857b Mon Sep 17 00:00:00 2001 From: Desapogu Jayaramudu Date: Thu, 30 Jul 2026 09:13:16 +0530 Subject: [PATCH] serial: coreboot: Accept DBG2 subtype 0x12 U-Boot running as a coreboot payload obtains serial console information either from the coreboot table or from the ACPI DBG2 table. When serial console support is disabled in coreboot, the coreboot table does not contain serial information. In this case U-Boot falls back to parsing the DBG2 table. Some AMD platforms or any other platforms that uses memory-mapped I/O advertise the debug UART using DBG2 subtype 0x0012 ("16550-compatible with parameters defined in Generic Address Structure"). U-Boot currently accepts only subtype 0x0000, causing DBG2 UART detection to fail and leaving no console output. Accept subtype 0x0012 as well and keep the existing handling logic. Signed-off-by: Desapogu Jayaramudu Reviewed-by: Simon Glass --- drivers/serial/serial_coreboot.c | 3 ++- include/acpi/acpi_table.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/serial/serial_coreboot.c b/drivers/serial/serial_coreboot.c index b1f69f6998c..89da11ffa52 100644 --- a/drivers/serial/serial_coreboot.c +++ b/drivers/serial/serial_coreboot.c @@ -59,7 +59,8 @@ 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_WITH_GAS) { log_debug("Incompatible serial port\n"); return -EPROTOTYPE; } diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h index 4895366a618..ac50ea10312 100644 --- a/include/acpi/acpi_table.h +++ b/include/acpi/acpi_table.h @@ -674,6 +674,7 @@ struct __packed acpi_dmar { #define ACPI_DBG2_ARM_SBSA_GENERIC 0x000E #define ACPI_DBG2_ARM_DCC 0x000F #define ACPI_DBG2_BCM2835 0x0010 +#define ACPI_DBG2_16550_WITH_GAS 0x0012 /* 16550-compatible UART with GAS */ #define ACPI_DBG2_1394_STANDARD 0x0000