diff options
author | Tim Newsome <tim@sifive.com> | 2023-04-25 09:30:27 -0700 |
---|---|---|
committer | Tim Newsome <tim@sifive.com> | 2023-04-25 09:30:27 -0700 |
commit | f2c2ebbcd090f3d43e3883e9fbbf3641114b667c (patch) | |
tree | ca48278e85c397c684e273fa896527296ac80272 /src | |
parent | 4d274298b24f013f2211981b48500dd9bcffa98f (diff) | |
download | riscv-openocd-f2c2ebbcd090f3d43e3883e9fbbf3641114b667c.zip riscv-openocd-f2c2ebbcd090f3d43e3883e9fbbf3641114b667c.tar.gz riscv-openocd-f2c2ebbcd090f3d43e3883e9fbbf3641114b667c.tar.bz2 |
target/riscv: Add constants for vsatp, hgatp
Change-Id: I130a8f7a7abc294bbdf60e7e0ce0bccb72bf920a
Signed-off-by: Tim Newsome <tim@sifive.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/target/riscv/gdb_regs.h | 3 | ||||
-rw-r--r-- | src/target/riscv/riscv.h | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/target/riscv/gdb_regs.h b/src/target/riscv/gdb_regs.h index 08926b5..ea0c014 100644 --- a/src/target/riscv/gdb_regs.h +++ b/src/target/riscv/gdb_regs.h @@ -98,6 +98,9 @@ enum gdb_regno { GDB_REGNO_MEPC = CSR_MEPC + GDB_REGNO_CSR0, GDB_REGNO_MCAUSE = CSR_MCAUSE + GDB_REGNO_CSR0, GDB_REGNO_SATP = CSR_SATP + GDB_REGNO_CSR0, + GDB_REGNO_VSATP = CSR_VSATP + GDB_REGNO_CSR0, + GDB_REGNO_HGATP = CSR_HGATP + GDB_REGNO_CSR0, + GDB_REGNO_HSTATUS = CSR_HSTATUS + GDB_REGNO_CSR0, GDB_REGNO_MTOPI = CSR_MTOPI + GDB_REGNO_CSR0, GDB_REGNO_MTOPEI = CSR_MTOPEI + GDB_REGNO_CSR0, GDB_REGNO_CSR4095 = GDB_REGNO_CSR0 + 4095, diff --git a/src/target/riscv/riscv.h b/src/target/riscv/riscv.h index 59c3ec3..ac6d7ce 100644 --- a/src/target/riscv/riscv.h +++ b/src/target/riscv/riscv.h @@ -26,6 +26,8 @@ struct riscv_program; #define RISCV_SATP_MODE(xlen) ((xlen) == 32 ? SATP32_MODE : SATP64_MODE) #define RISCV_SATP_PPN(xlen) ((xlen) == 32 ? SATP32_PPN : SATP64_PPN) +#define RISCV_HGATP_MODE(xlen) ((xlen) == 32 ? HGATP32_MODE : HGATP64_MODE) +#define RISCV_HGATP_PPN(xlen) ((xlen) == 32 ? HGATP32_PPN : HGATP64_PPN) #define RISCV_PGSHIFT 12 # define PG_MAX_LEVEL 4 |