mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-10-23 04:11:14 +01:00
lib: sbi: Pass trap context pointer to sbi_ecall_handler()
To be consistent with other trap handlers, pass trap context pointer to sbi_ecall_handler(). Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Samuel Holland <samuel.holland@sifive.com> Tested-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Clément Léger <cleger@rivosinc.com>
This commit is contained in:
1 parent
43d346c0c1
commit
5b11f16c3c
3 files changed
+5
-4
No files matched your search
+2
-1
@@ -95,9 +95,10 @@ void sbi_ecall_unregister_extension(struct sbi_ecall_extension *ext)
|
||||
sbi_list_del_init(&ext->head);
|
||||
}
|
||||
|
||||
int sbi_ecall_handler(struct sbi_trap_regs *regs)
|
||||
int sbi_ecall_handler(struct sbi_trap_context *tcntx)
|
||||
{
|
||||
int ret = 0;
|
||||
struct sbi_trap_regs *regs = &tcntx->regs;
|
||||
struct sbi_ecall_extension *ext;
|
||||
unsigned long extension_id = regs->a7;
|
||||
unsigned long func_id = regs->a6;
|
||||
|
||||
+1
-1
@@ -299,7 +299,7 @@ struct sbi_trap_context *sbi_trap_handler(struct sbi_trap_context *tcntx)
|
||||
break;
|
||||
case CAUSE_SUPERVISOR_ECALL:
|
||||
case CAUSE_MACHINE_ECALL:
|
||||
rc = sbi_ecall_handler(regs);
|
||||
rc = sbi_ecall_handler(tcntx);
|
||||
msg = "ecall handler failed";
|
||||
break;
|
||||
case CAUSE_LOAD_ACCESS:
|
||||
|
||||
Reference in new issue
Block a user