riscv: Add basic support for SBI v0.2
authorBin Meng <bmeng.cn@gmail.com>
Tue, 10 Mar 2020 02:35:28 +0000 (19:35 -0700)
committerAndes <uboot@andestech.com>
Tue, 17 Mar 2020 03:29:54 +0000 (11:29 +0800)
commitf58fc34a2b215a80adcf62c6e90793e23d6f915c
treeb9b68d294c66b95f6ffa2306f6e61e4c9b7a60a0
parent215c3a7701913a12ba6727efb83be80ad8ed659b
riscv: Add basic support for SBI v0.2

The SBI v0.2 introduces a base extension which is backward compatible
with v0.1. Implement all helper functions and minimum required SBI
calls from v0.2 for now. All other base extension function will be
added later as per need.

As v0.2 calling convention is backward compatible with v0.1, remove
the v0.1 helper functions and just use v0.2 calling convention.

Add a new Kconfig options CONFIG_SBI for the new SBI v0.2 codes, and
let CONFIG_SBI_IPI depend on it.

This commit is inspired from Linux kernel patch:
https://patchwork.kernel.org/patch/11407363/

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com>
arch/riscv/Kconfig
arch/riscv/include/asm/sbi.h
arch/riscv/lib/Makefile
arch/riscv/lib/sbi.c [new file with mode: 0644]