Re: [sig-hypervisors] SBI Debug Console Extension Proposal (Draft v1)
On Thu, 2 Jun 2022, Schwarz, Konrad via lists.riscv.org wrote:
Hi Anup,From: sig-hypervisors@... <sig-hypervisors@...> On Behalf Of Anup Patel viaHere are my thoughts:
* API:This could be done. As an example Xen provides the hypercall
HYPERVISOR_console_io. The first parameter is the operation:
CONSOLEIO_write or CONSOLEIO_read.
The interface in RISC-V spec language would be something along these
struct sbiret sbi_debug_console_io(unsigned long operation, /* read or write */
unsigned long address,
unsigned long num_chars)
There is no memory area pre-registration required, however appropriate
checks on the validity of the address provided should always be done in
The good thing about getting rid of the pre-registration is that
multiple threads could make concurrent sbi_debug_console_io requests on
I think it might be a good idea in the guest-side implementation (e.g.
Linux or Zephyr) to choose a specific memory area for this. However, it
doesn't have to be part of the interface. I think it should be an
The firmware/hypervisor-side implementation of sbi_debug_console_io
can deal with any addresses provided as long as they are valid.