mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 23:41:23 +01:00
lib: sbi: Set gva when creating sbi_trap_info
In some cases the sbi_trap_info argument passed to sbi_trap_redirect is created from scratch by filling its fields. Since we previously added a gva field to struct sbi_trap_info, initialize gva in these cases also. Suggested-by: Andrew Jones <ajones@ventanamicro.com> Signed-off-by: Vivian Wang <dramforever@live.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -30,6 +30,7 @@ static int truly_illegal_insn(ulong insn, struct sbi_trap_regs *regs)
|
||||
trap.tval = insn;
|
||||
trap.tval2 = 0;
|
||||
trap.tinst = 0;
|
||||
trap.gva = 0;
|
||||
|
||||
return sbi_trap_redirect(regs, &trap);
|
||||
}
|
||||
|
Reference in New Issue
Block a user