[PATCH 1/2] lib: sbi_trap: Add helper to get GVA in sbi_trap_regs
Andrew Jones
ajones at ventanamicro.com
Mon Sep 5 06:06:49 PDT 2022
On Fri, Sep 02, 2022 at 11:48:34PM +0800, Vivian Wang wrote:
> The GVA bit is in mstatus on RV64, and in mstatush in RV32. Refactor
> code handling this in sbi_trap_handler into a helper function to extract
> GVA from sbi_trap_regs, so that future code accessing GVA can be
> XLEN-agnostic.
>
> Signed-off-by: Vivian Wang <dramforever at live.com>
> ---
> include/sbi/sbi_trap.h | 18 ++++++++++++++++++
> lib/sbi/sbi_trap.c | 14 +-------------
> 2 files changed, 19 insertions(+), 13 deletions(-)
>
Reviewed-by: Andrew Jones <ajones at ventanamicro.com>
More information about the opensbi
mailing list