Merge #104
104: SBI mode r=almindor a=pgraubner
Introducing Supervisor Binary Interface (SBI) compatibility as a build-time feature. Main goal is to allow riscv-rt based implementations to be bootstrapped by a SBI-firmware (like in `qemu-system-riscv64`).
* Introduce compiler switches for assembly in order to switch between machine mode / supervisor mode
* Introduce cargo feature for conditional compilation
* Patch lib.rs for supervisor-mode compatibility
The only interface this PR is braking is `mp_hook`, which needs a mhartid replacement for smode. The hart id is passed by the caller.
Tested with `qemu-system-riscv64`.
See also documentation/features/sbi for further implementation details.
Co-authored-by:
Pablo Graubner <2234137+pgraubner@users.noreply.github.com>
Please register or sign in to comment