target/riscv: Add constants for vsatp, hgatp

Change-Id: I130a8f7a7abc294bbdf60e7e0ce0bccb72bf920a
Signed-off-by: Tim Newsome <tim@sifive.com>
This commit is contained in:
Tim Newsome 2023-04-25 09:30:27 -07:00
parent 4d274298b2
commit f2c2ebbcd0
2 changed files with 5 additions and 0 deletions

View File

@ -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,

View File

@ -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