diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-09-01 15:24:29 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-09-09 07:02:02 +0300 |
commit | bef63d68489a3026f2fdf4c07a8915d3dcdf14cd (patch) | |
tree | 7c9f625c6cd267bb9be4282a460260efb7d52fb8 /lib/sbi | |
parent | dcb10c0056f37d3de6ce2794b8e6f7c322ac4d46 (diff) | |
download | opensbi-bef63d68489a3026f2fdf4c07a8915d3dcdf14cd.tar.xz |
include: Rename ECALL defines to match latest RISC-V spec
We rename CAUSE_HYPERVISOR_ECALL to CAUSE_SUPERVISOR_ECALL and
CAUSE_SUPERVISOR_ECALL to CAUSE_VIRTUAL_SUPERVISOR_ECALL so that
it matches latest RISC-V privilege spec.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'lib/sbi')
-rw-r--r-- | lib/sbi/sbi_hart.c | 2 | ||||
-rw-r--r-- | lib/sbi/sbi_trap.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c index 2211c3c..d788918 100644 --- a/lib/sbi/sbi_hart.c +++ b/lib/sbi/sbi_hart.c @@ -108,7 +108,7 @@ static int delegate_traps(struct sbi_scratch *scratch, u32 hartid) * from VS-mode), Guest page faults and Virtual interrupts. */ if (misa_extension('H')) { - exceptions |= (1U << CAUSE_SUPERVISOR_ECALL); + exceptions |= (1U << CAUSE_VIRTUAL_SUPERVISOR_ECALL); exceptions |= (1U << CAUSE_FETCH_GUEST_PAGE_FAULT); exceptions |= (1U << CAUSE_LOAD_GUEST_PAGE_FAULT); exceptions |= (1U << CAUSE_VIRTUAL_INST_FAULT); diff --git a/lib/sbi/sbi_trap.c b/lib/sbi/sbi_trap.c index 8fe6753..b8bb20c 100644 --- a/lib/sbi/sbi_trap.c +++ b/lib/sbi/sbi_trap.c @@ -251,7 +251,7 @@ void sbi_trap_handler(struct sbi_trap_regs *regs) rc = sbi_misaligned_store_handler(mtval, mtval2, mtinst, regs); msg = "misaligned store handler failed"; break; - case CAUSE_HYPERVISOR_ECALL: + case CAUSE_SUPERVISOR_ECALL: rc = sbi_ecall_handler(regs); msg = "ecall handler failed"; break; |