Skip to content

Commit

Permalink
target/riscv: Add the HGATP register masks
Browse files Browse the repository at this point in the history
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
  • Loading branch information
alistair23 authored and palmer-dabbelt committed May 24, 2019
1 parent d28b15a commit e064311
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions target/riscv/cpu_bits.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,17 @@
#define CSR_HIDELEG 0xa03
#define CSR_HGATP 0xa80

#if defined(TARGET_RISCV32)
#define HGATP_MODE SATP32_MODE
#define HGATP_ASID SATP32_ASID
#define HGATP_PPN SATP32_PPN
#endif
#if defined(TARGET_RISCV64)
#define HGATP_MODE SATP64_MODE
#define HGATP_ASID SATP64_ASID
#define HGATP_PPN SATP64_PPN
#endif

/* Performance Counters */
#define CSR_MHPMCOUNTER3 0xb03
#define CSR_MHPMCOUNTER4 0xb04
Expand Down

0 comments on commit e064311

Please sign in to comment.