Skip to contentSkip to conversation

ACPI: SPCR: Add support for DBG2 RISC-V SBI port subtype

PATCH In review [email protected] 2 participants 2 messages Sep 10, 2025 – Sep 11, 2025 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: SPCR: Add support for DBG2 RISC-V SBI port subtype

From: Chen Pei <[email protected]>

The commit 4aca2bef90bd1296 ("ACPICA: Headers: Add RISC-V SBI Subtype to DBG2") has added the definition of ACPI_DBG2_RISCV_SBI_CON.

This patch continues to implement its function so that the parameters of uart can be configured correctly. Subsequent calls to setup_earlycon to reuse the earlycon based on sbi.

---
 drivers/acpi/spcr.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/acpi/spcr.c +3 -0
index cd36a97b0ea2..208d6bbc65e0 100644
@@ -141,6 +141,9 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
 	case ACPI_DBG2_16550_NVIDIA:
 		uart = "uart";
 		break;
+	case ACPI_DBG2_RISCV_SBI_CON:
+		uart = "sbi";
+		break;
 	default:
 		err = -ENOENT;
 		goto done;
Signature · 1 line
2.49.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 20 lines · On Wed, Sep 10, 2025 at 5:42 PM <[email protected]> wrote:

From: Chen Pei <[email protected]>

The commit 4aca2bef90bd1296 ("ACPICA: Headers: Add RISC-V SBI Subtype to DBG2") has added the definition of ACPI_DBG2_RISCV_SBI_CON.

This patch continues to implement its function so that the parameters of uart can be configured correctly. Subsequent calls to setup_earlycon to reuse the earlycon based on sbi.

---
 drivers/acpi/spcr.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/acpi/spcr.c +0 -0
index cd36a97b0ea2..208d6bbc65e0 100644

drivers/acpi/spcr.c int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console) · line 146

Quoted 6 lines
drivers/acpi/spcr.c +3 -0
@@ -141,6 +141,9 @@ int __init acpi_parse_spcr(bool enable_earlycon, bool enable_console)
        case ACPI_DBG2_16550_NVIDIA:
                uart = "uart";
                break;
+       case ACPI_DBG2_RISCV_SBI_CON:
+               uart = "sbi";
+               break;

Yes, SPCR lacks ACPI_DBG2_RISCV_SBI_CON, and ACPICA has adopted it. So, it's time to add ACPI_DBG2_RISCV_SBI_CON support in spcr.c. It would solve the UEFI + ACPI early debug problem.

LGTM!

Quoted 6 lines
drivers/acpi/spcr.c +0 -1
        default:
                err = -ENOENT;
                goto done;
--

2.49.0

Signature · 2 lines
Best Regards
 Guo Ren