lib: sbi: Implement System Reset (SRST) SBI extension
authorAnup Patel <anup.patel@wdc.com>
Tue, 24 Nov 2020 08:50:19 +0000 (14:20 +0530)
committerAnup Patel <anup@brainfault.org>
Tue, 1 Dec 2020 11:41:11 +0000 (17:11 +0530)
commit548d03e577490f74af8b57706655e5d81c9b94a1
treef8854349e7f544d05886c38c18c320d0dafbc0da
parent5c429ae2133e1a82b81403146a3e38e2b4b8350e
lib: sbi: Implement System Reset (SRST) SBI extension

The SBI SRST extension has been accepted and merged in the latest
SBI v0.3-draft specification.
(Refer, https://github.com/riscv/riscv-sbi-doc)

It allows to S-mode software to request system shutdown, cold reboot,
and warm reboot.

This patch implements SBI SRST extension as a replacement of the
legacy sbi_shutdown() call of SBI v0.1 specification.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
include/sbi/sbi_ecall.h
lib/sbi/sbi_ecall.c
lib/sbi/sbi_ecall_replace.c