All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] acpi: fix no display when serial console is disabled in coreboot config
@ 2026-07-15 13:40 Desapogu Jayaramudu
  2026-07-17 13:49 ` Simon Glass
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Desapogu Jayaramudu @ 2026-07-15 13:40 UTC (permalink / raw)
  To: sjg, trini; +Cc: u-boot, jayaram, Desapogu Jayaramudu

From: jayaram <jayaram@BLRJDESAPOG1.amd.com>

From: Desapogu Jayaramudu <jayaramudu.desapogu@amd.com>

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 <jayaramudu.desapogu@amd.com>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-07-28  5:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-15 13:40 [PATCH v2] acpi: fix no display when serial console is disabled in coreboot config Desapogu Jayaramudu
2026-07-17 13:49 ` Simon Glass
2026-07-20 15:48 ` [PATCH v3] serial: coreboot: Accept DBG2 subtype 0x12 Desapogu Jayaramudu
2026-07-27 16:44   ` Tom Rini
2026-07-28  5:02 ` [PATCH v4] " Desapogu Jayaramudu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.