Re: Proposal: Magic number in boot register


atishp@...
 

On Tue, 2020-06-16 at 09:54 -0400, Jonathan Behrens wrote:
Hi everyone,

To start off discussion about requirements that should go into the
platform spec, I propose a simple change to current software:

When entering S-mode for the first time, the a2 register should
contain the value 0x54414c5058494e55 ("UNIXPLAT").

The intention here is that software should be able to look for this
value and know that it has been booted in a Supervisor Execution
Environment that is compliant with the Unix-class platform spec. This
would distinguish both from old implementations that only support SBI
v0.1, but also possible future execution environments designed by
other groups.
For SBI version, supervisor systems should use "sbi_get_spec_version"
API to identify what is the SBI version of the SBI implementation. For
v0.1, the above call will return a -ve value indicating that this is a
v0.1.

That's how linux kernel currently detects the SBI version dynamically.


Jonathan
--
Regards,
Atish

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