Skip to content

fix(arch/riscv64): prefer DBCN over the deprecated legacy SBI console - #402

Merged
liulog merged 1 commit into
syswonder:devfrom
yydawx:fix/riscv64-sbi-console
Sep 29, 2026
Merged

liulog merged 1 commit into
syswonder:devfrom
yydawx:fix/riscv64-sbi-console

Conversation

@yydawx

@yydawx yydawx commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Closes #401

The riscv64 console only used the legacy SBI console extension (EID 0x01/0x02), so firmwares implementing just DBCN (e.g. RustSBI) stayed silent, banner included.

Probe DBCN once on first use, prefer it, fall back to legacy. Guest-facing EID 0x01/0x02 are unchanged and now share the same backend.

Verified on QEMU virt + OpenSBI v1.8.

@github-actions github-actions Bot added riscv64 bug Something isn't working labels Sep 28, 2026
@yydawx
yydawx force-pushed the fix/riscv64-sbi-console branch from 2c558b2 to f596f28 Compare September 29, 2026 02:35
@liulog
liulog self-requested a review September 29, 2026 02:47
@liulog

liulog commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

LGTM!

I think the current implementation is fine; it achieves the goal of compatibility.

Since DBCN supports outputting more characters at once, future possibilities—such as routing hvisor's own logs through DBCN or exposing DBCN capabilities to Guest VMs—can be addressed in other PRs.

@yydawx

yydawx commented Sep 29, 2026

Copy link
Copy Markdown
Contributor Author

Thanks! I would finish rustsbi issue first. I would like to write down some follow issues , we may discuss at tomorrow meeting or later! Thanks for your time again!

@liulog
liulog merged commit be9ba59 into syswonder:dev Sep 29, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working riscv64

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RISC-V] Console only uses the deprecated legacy SBI interface, silent on firmwares without it

2 participants