[sig-hypervisors] [RISC-V] [tech-unixplatformspec] SBI Debug Console Extension Proposal (Draft v1)
Schwarz, Konrad
konrad.schwarz at siemens.com
Fri Jun 3 00:49:04 PDT 2022
> From: sig-hypervisors at lists.riscv.org <sig-hypervisors at lists.riscv.org> On Behalf Of Anup Patel via
> lists.riscv.org
> Sent: Friday, June 3, 2022 5:01
> We have legacy SBI v0.1 calls where most of them are replaced by
> newer SBI v0.2 (or higher) calls. Only the SBI v0.1 putchar() does not
> have a replacement. This putchar() was being used in various cases
> for early prints from OSes and bootloaders.
>
> The SBI debug console extension is an attempt to replace the legacy
> SBI v0.1 putchar(). The use of shared memory in this proposal is
> motivated by the need to allow users to print multiple characters in
> one SBI call.
As I pointed out in an earlier message, the design using a shared memory block
is a hindrance. Instead, each call should provide a pointer to the (virtual)
address of the character buffer.
> The legacy SBI v0.1 also had a getchar() call which is deprecated and
> does not need any newer SBI call replacing it because it is expected
> all platforms (including virtual platforms emulated by hypervisors) will
> have a proper interrupt driver console for supervisor software. The
> proposed SBI debug console extension only tries to provide a solution
> for early prints.
Consider the case where we have more VMs than physical UARTs -- this
will actually be the norm in most deployments.
(To counter the argument that the hypervisor can provide virtual UARTs
for its guests, note that a dedicated para-virtualized interface is much more
efficient than trapping individual memory accesses to simulated HW registers).
By making the interface a bit richer, as discussed in my earlier proposal,
a hypervisor can cover a much larger set of use cases.
--
Konrad
More information about the opensbi
mailing list