Re: SBI Debug Console Extension Proposal (Draft v3)


Darius Rad
 

On Mon, Jul 25, 2022 at 10:04:52AM +0530, Anup Patel wrote:

Function: Console Puts (FID #0)
-------------------------------

struct sbiret sbi_debug_console_puts(unsigned long addr_lo,
unsigned long addr_hi,
unsigned long num_chars)

Print a specified input string on the debug console.

The physical base address and size of the string to be printed is
derived from parameters as follows:
1) `addr_lo` parameter specifies the lower XLEN bits of the string
physical base address.
2) `addr_hi` parameter specifies the string physical base address
right shifted by XLEN.
It is really necessary to have two long parameters for a physical address
on RV64? Clearly this is necessary for RV32, where the maximum physical
address is greater than XLEN, but that is not the case for RV64.

Why not use long long, which is 8 bytes on both RV32 and RV64 (on the
respective ABIs, that is)? Or use a different function signature for RV32
and RV64, with two parameters for the former and one for the latter?

3) `num_chars` parameter specifies the size of the string as the
number of characters (or bytes).
// darius

Join tech-unixplatformspec@lists.riscv.org to automatically receive all group messages.