mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-03-15 19:31:32 +00:00
lib: sbi: Don't check SBI error range for legacy console getchar
The legacy console getchar SBI call returns character value in
the sbiret.error field so the "SBI_SUCCESS < ret" check in
sbi_ecall_handler() results in unwanted error prints for the
legacy console getchar SBI call. Let's suppress these unwanted
error prints.
Fixes: 67b2a40892
("lib: sbi: sbi_ecall: Check the range of
SBI error")
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
This commit is contained in:
parent
674e0199b2
commit
f5dfd99139
1 changed files with 3 additions and 1 deletions
|
@ -120,7 +120,9 @@ int sbi_ecall_handler(struct sbi_trap_regs *regs)
|
|||
trap.epc = regs->mepc;
|
||||
sbi_trap_redirect(regs, &trap);
|
||||
} else {
|
||||
if (ret < SBI_LAST_ERR || SBI_SUCCESS < ret) {
|
||||
if (ret < SBI_LAST_ERR ||
|
||||
(extension_id != SBI_EXT_0_1_CONSOLE_GETCHAR &&
|
||||
SBI_SUCCESS < ret)) {
|
||||
sbi_printf("%s: Invalid error %d for ext=0x%lx "
|
||||
"func=0x%lx\n", __func__, ret,
|
||||
extension_id, func_id);
|
||||
|
|
Loading…
Add table
Reference in a new issue