diff options
author | Atish Patra <atish.patra@wdc.com> | 2019-03-13 21:08:31 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2019-03-14 18:14:22 +0300 |
commit | 6c39ea99ee681de9e33004aa0075771be351a8cb (patch) | |
tree | 3a6165b284ecaa26d5895d196314b7b7e276802e /lib | |
parent | 312850148ad702cd9cc5bfd3537ed23ac4d851fe (diff) | |
download | opensbi-6c39ea99ee681de9e33004aa0075771be351a8cb.tar.xz |
lib: Return ENOTSUPP incase of invalid SBI function ID
OpenSBI should show error trace only if any valid SBI function
does not perform as expected.
However, OpenSBI should show notify the caller with a negative
error if given SBI function ID is not valid.
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sbi_ecall.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sbi_ecall.c b/lib/sbi_ecall.c index 6312469..94c6e77 100644 --- a/lib/sbi_ecall.c +++ b/lib/sbi_ecall.c @@ -86,6 +86,8 @@ int sbi_ecall_handler(u32 hartid, ulong mcause, ret = 0; break; default: + regs->a0 = SBI_ENOTSUPP; + ret = 0; break; }; |