[PATCH v3 0/4] Add support for SBI v0.2

From: Atish Patra
Date: Mon Nov 18 2019 - 17:57:08 EST


The Supervisor Binary Interface(SBI) specification[1] now defines a
base extension that provides extendability to add future extensions
while maintaining backward compatibility with previous versions.
The new version is defined as 0.2 and older version is marked as 0.1.

This series adds support v0.2 and a unified calling convention
implementation between 0.1 and 0.2. It also adds minimal SBI functions
from 0.2 as well to keep the series lean.

[1] https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc

The base support for SBI v0.2 is already available in OpenSBI v0.5.
This series needs following additional patches in OpenSBI.

http://lists.infradead.org/pipermail/opensbi/2019-November/000704.html

Tested on both BBL, OpenSBI with/without the above patch series.

Changes from v2->v3.
1. Moved v0.1 extensions to a new config.
2. Added support for relacement extensions of v0.1 extensions.

Changes from v1->v2
1. Removed the legacy calling convention.
2. Moved all SBI related calls to sbi.c.
3. Moved all SBI related macros to uapi.

Atish Patra (4):
RISC-V: Mark existing SBI as 0.1 SBI.
RISC-V: Add basic support for SBI v0.2
RISC-V: Introduce a new config for SBI v0.1
RISC-V: Implement SBI v0.2 replacement extensions

arch/riscv/Kconfig | 6 +
arch/riscv/include/asm/sbi.h | 163 +++++++++--------
arch/riscv/kernel/Makefile | 1 +
arch/riscv/kernel/sbi.c | 330 +++++++++++++++++++++++++++++++++++
arch/riscv/kernel/setup.c | 2 +
5 files changed, 431 insertions(+), 71 deletions(-)
create mode 100644 arch/riscv/kernel/sbi.c

--
2.23.0