diff options
author | Jerry Zhao <jerryz123@berkeley.edu> | 2023-01-02 16:44:27 -0800 |
---|---|---|
committer | Jerry Zhao <jerryz123@berkeley.edu> | 2023-01-03 10:09:20 -0800 |
commit | 76ee37a1af218bce3caaa33046302c95f368f58d (patch) | |
tree | b9154c2deaef7670fbd537f0e98d163ab964b012 /riscv/mmu.cc | |
parent | ad5fcd96e9731073c58c64e5fa4fecfd3ad5e8a5 (diff) | |
download | riscv-isa-sim-76ee37a1af218bce3caaa33046302c95f368f58d.zip riscv-isa-sim-76ee37a1af218bce3caaa33046302c95f368f58d.tar.gz riscv-isa-sim-76ee37a1af218bce3caaa33046302c95f368f58d.tar.bz2 |
Specify addresses are physical for simif_t member functions
Diffstat (limited to 'riscv/mmu.cc')
-rw-r--r-- | riscv/mmu.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/riscv/mmu.cc b/riscv/mmu.cc index ddf277b..d04e3e2 100644 --- a/riscv/mmu.cc +++ b/riscv/mmu.cc @@ -128,37 +128,37 @@ reg_t reg_from_bytes(size_t len, const uint8_t* bytes) abort(); } -bool mmu_t::mmio_ok(reg_t addr, access_type UNUSED type) +bool mmu_t::mmio_ok(reg_t paddr, access_type UNUSED type) { // Disallow access to debug region when not in debug mode - if (addr >= DEBUG_START && addr <= DEBUG_END && proc && !proc->state.debug_mode) + if (paddr >= DEBUG_START && paddr <= DEBUG_END && proc && !proc->state.debug_mode) return false; return true; } -bool mmu_t::mmio_fetch(reg_t addr, size_t len, uint8_t* bytes) +bool mmu_t::mmio_fetch(reg_t paddr, size_t len, uint8_t* bytes) { - if (!mmio_ok(addr, FETCH)) + if (!mmio_ok(paddr, FETCH)) return false; - return sim->mmio_fetch(addr, len, bytes); + return sim->mmio_fetch(paddr, len, bytes); } -bool mmu_t::mmio_load(reg_t addr, size_t len, uint8_t* bytes) +bool mmu_t::mmio_load(reg_t paddr, size_t len, uint8_t* bytes) { - if (!mmio_ok(addr, LOAD)) + if (!mmio_ok(paddr, LOAD)) return false; - return sim->mmio_load(addr, len, bytes); + return sim->mmio_load(paddr, len, bytes); } -bool mmu_t::mmio_store(reg_t addr, size_t len, const uint8_t* bytes) +bool mmu_t::mmio_store(reg_t paddr, size_t len, const uint8_t* bytes) { - if (!mmio_ok(addr, STORE)) + if (!mmio_ok(paddr, STORE)) return false; - return sim->mmio_store(addr, len, bytes); + return sim->mmio_store(paddr, len, bytes); } void mmu_t::check_triggers(triggers::operation_t operation, reg_t address, std::optional<reg_t> data) |