diff options
author | Andrew Waterman <andrew@sifive.com> | 2020-02-20 15:27:54 -0800 |
---|---|---|
committer | Chih-Min Chao <chihmin.chao@sifive.com> | 2020-03-03 22:48:23 -0800 |
commit | a4f6ec0441285525130e07361213fae0b36b8b47 (patch) | |
tree | 39f8f7f547e9520e2f7ad9d72695403c10e5d2a1 /riscv/mmu.h | |
parent | 1a5610b1c59c4a1a266176194e3174725174aba2 (diff) | |
download | spike-a4f6ec0441285525130e07361213fae0b36b8b47.zip spike-a4f6ec0441285525130e07361213fae0b36b8b47.tar.gz spike-a4f6ec0441285525130e07361213fae0b36b8b47.tar.bz2 |
Disallow access to debug memory region unless in debug mode
... as recommended, but not required, by the spec.
Diffstat (limited to 'riscv/mmu.h')
-rw-r--r-- | riscv/mmu.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/riscv/mmu.h b/riscv/mmu.h index c200084..f73de59 100644 --- a/riscv/mmu.h +++ b/riscv/mmu.h @@ -339,6 +339,9 @@ private: tlb_entry_t fetch_slow_path(reg_t addr); void load_slow_path(reg_t addr, reg_t len, uint8_t* bytes); void store_slow_path(reg_t addr, reg_t len, const uint8_t* bytes); + bool mmio_load(reg_t addr, size_t len, uint8_t* bytes); + bool mmio_store(reg_t addr, size_t len, const uint8_t* bytes); + bool mmio_ok(reg_t addr, access_type type); reg_t translate(reg_t addr, reg_t len, access_type type); // ITLB lookup |