* [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
* Re: [PATCH v2] acpi: fix no display when serial console is disabled in coreboot config
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-28 5:02 ` [PATCH v4] " Desapogu Jayaramudu
2 siblings, 0 replies; 5+ messages in thread
From: Simon Glass @ 2026-07-17 13:49 UTC (permalink / raw)
To: jayaramudu.desapogu; +Cc: sjg, trini, u-boot
Hi Desapogu,
On 2026-07-15T13:40:49, Desapogu Jayaramudu <jayaramudu.desapogu@amd.com> wrote:
> acpi: fix no display when serial console is disabled in coreboot config
>
> 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
> [...]
>
> drivers/serial/serial_coreboot.c | 2 +-
> include/acpi/acpi_table.h | 1 +
> 2 files changed, 2 insertions(+), 1 deletion(-)
> acpi: fix no display when serial console is disabled in coreboot config
The change is mostly in drivers/serial, so please use a 'serial:
coreboot:' prefix. The subject is also over the 60-character limit -
something like 'serial: coreboot: Accept DBG2 subtype 0x12' would do.
> From: Desapogu Jayaramudu <jayaramudu.desapogu@amd.com>
The commit author is 'jayaram <jayaram@BLRJDESAPOG1.amd.com>', which
looks like a local machine account. Please can you set git user.name
and user.email to match your Signed-off-by, so this From: line is not
needed.
> 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
Please can you tidy up the commit message: add a space after full
stops and commas ('DBG2.When', 'config ,'), use 'U-Boot' consistently
and wrap lines at 72 columns.
> diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h
> @@ -668,6 +668,7 @@ struct __packed acpi_dmar {
> #define ACPI_DBG2_16550_COMPATIBLE 0x0000
> +#define ACPI_DBG2_16550_GAS 0x0012
> #define ACPI_DBG2_16550_SUBSET 0x0001
Please keep this list sorted by value (after ACPI_DBG2_BCM2835) and
use a tab for alignment like the other entries. The DBG2 spec calls
0x0012 '16550-compatible with parameters defined in Generic Address
Structure', so perhaps ACPI_DBG2_16550_WITH_GAS, with a short comment
giving the spec description.
> diff --git a/drivers/serial/serial_coreboot.c b/drivers/serial/serial_coreboot.c
> @@ -59,7 +59,7 @@ static int read_dbg2(struct ns16550_plat *plat)
> - if (dbg->port_subtype != ACPI_DBG2_16550_COMPATIBLE) {
> + if (dbg->port_subtype != ACPI_DBG2_16550_COMPATIBLE && dbg->port_subtype != ACPI_DBG2_16550_GAS) {
Just to check the semantics: for subtype 0x12 the access parameters
are supposed to come from the GAS, yet the code below still hard-codes
plat->reg_width = 4 (with the comment that coreboot sets bit_width to
0) and derives reg_shift from access_size with a coreboot-specific
adjustment. Does coreboot fill in the GAS the same way for 0x12 on
your AMD platforms? If the GAS values are valid for this subtype, it
would be better to honour them (bit_width, access_size) rather than
relying on the workaround. What do you think? This could be a
follow-up patch, if needed.
Also please wrap this line to stay within 80 columns, e.g.
if (dbg->port_subtype != ACPI_DBG2_16550_COMPATIBLE &&
dbg->port_subtype != ACPI_DBG2_16550_WITH_GAS) {
Regards,
Simon
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3] serial: coreboot: Accept DBG2 subtype 0x12
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 ` Desapogu Jayaramudu
2026-07-27 16:44 ` Tom Rini
2026-07-28 5:02 ` [PATCH v4] " Desapogu Jayaramudu
2 siblings, 1 reply; 5+ messages in thread
From: Desapogu Jayaramudu @ 2026-07-20 15:48 UTC (permalink / raw)
To: sjg, trini; +Cc: u-boot, Desapogu Jayaramudu
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 <jayaramudu.desapogu@amd.com>
---
v3:
- Change subject prefix to "serial: coreboot:"
- Shorten commit subject
- Remove extra From: line by fixing git author identity
- Rework commit message formatting and wrapping
- Rename subtype constant to ACPI_DBG2_16550_WITH_GAS
- Add comment describing DBG2 subtype 0x12
- Keep subtype definitions sorted by value
- Wrap long conditional to stay within 80 columns
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 b1f69f6998cfa1..cb07173a80c0cc 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 4895366a6188ec..825652798166a4 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_WITH_GAS 0x0012 /* 16550-compatible UART with GAS */
#define ACPI_DBG2_1394_STANDARD 0x0000
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v3] serial: coreboot: Accept DBG2 subtype 0x12
2026-07-20 15:48 ` [PATCH v3] serial: coreboot: Accept DBG2 subtype 0x12 Desapogu Jayaramudu
@ 2026-07-27 16:44 ` Tom Rini
0 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2026-07-27 16:44 UTC (permalink / raw)
To: Desapogu Jayaramudu; +Cc: sjg, u-boot
[-- Attachment #1: Type: text/plain, Size: 2727 bytes --]
On Mon, Jul 20, 2026 at 09:18:26PM +0530, Desapogu Jayaramudu wrote:
> 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 <jayaramudu.desapogu@amd.com>
> ---
> v3:
> - Change subject prefix to "serial: coreboot:"
> - Shorten commit subject
> - Remove extra From: line by fixing git author identity
> - Rework commit message formatting and wrapping
> - Rename subtype constant to ACPI_DBG2_16550_WITH_GAS
> - Add comment describing DBG2 subtype 0x12
> - Keep subtype definitions sorted by value
> - Wrap long conditional to stay within 80 columns
>
> 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 b1f69f6998cfa1..cb07173a80c0cc 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 4895366a6188ec..825652798166a4 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_WITH_GAS 0x0012 /* 16550-compatible UART with GAS */
>
> #define ACPI_DBG2_1394_STANDARD 0x0000
This doesn't compile now. You reference ACPI_DBG2_16550_WITH_GAS and add
ACPI_DBG2_WITH_GAS so can you please do a v4 which compiles and you've
tested still resolves the issue? Thanks.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v4] serial: coreboot: Accept DBG2 subtype 0x12
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-28 5:02 ` Desapogu Jayaramudu
2 siblings, 0 replies; 5+ messages in thread
From: Desapogu Jayaramudu @ 2026-07-28 5:02 UTC (permalink / raw)
To: sjg, trini; +Cc: u-boot, Desapogu Jayaramudu
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 <jayaramudu.desapogu@amd.com>
---
v4:
- changed macro ACPI_DBG2_WITH_GAS to ACPI_DBG2_16550_WITH_GAS
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 b1f69f6998cfa1..2976853f397745 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 4895366a6188ec..ac50ea10312e28 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
--
2.43.0
^ 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.