Skip to content

Commit

Permalink
riscv: rename sbadaddr to stval
Browse files Browse the repository at this point in the history
RISC-V Privileged Architectures V1.10 renamed and generalized sbadaddr
to stval. binutils >= 2.43 dropped support for sbadaddr alias.

JIRA: RTOS-913
  • Loading branch information
badochov committed Sep 10, 2024
1 parent 9db2e1c commit d54fa74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hal/riscv64/_interrupts.S
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ _interrupts_dispatch:

csrr t0, sstatus
csrr t1, sepc
csrr t2, sbadaddr
csrr t2, stval
csrr t3, scause

sd t0, 256(sp)
Expand Down
4 changes: 2 additions & 2 deletions hal/riscv64/exceptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ typedef struct _exc_context_t {

u64 sstatus;
u64 sepc;
u64 sbadaddr;
u64 stval;
u64 scause;
} exc_context_t;

Expand Down Expand Up @@ -131,7 +131,7 @@ void hal_exceptionsDumpContext(char *buff, exc_context_t *ctx, int n)

i += hal_i2s(" sstatus : ", &buff[i], (u64)ctx->sstatus, 16, 1);
i += hal_i2s(" sepc : ", &buff[i], (u64)ctx->sepc, 16, 1);
i += hal_i2s(" sbaddaddr : ", &buff[i], (u64)ctx->sbadaddr, 16, 1);
i += hal_i2s(" stval : ", &buff[i], (u64)ctx->stval, 16, 1);
i += hal_i2s(" scause : ", &buff[i], (u64)ctx->scause, 16, 1);

buff[i++] = '\n';
Expand Down

0 comments on commit d54fa74

Please sign in to comment.