diff options
Diffstat (limited to 'src/arch/riscv')
-rw-r--r-- | src/arch/riscv/locked_mem.hh | 4 | ||||
-rw-r--r-- | src/arch/riscv/tlb.cc | 13 | ||||
-rw-r--r-- | src/arch/riscv/tlb.hh | 13 |
3 files changed, 16 insertions, 14 deletions
diff --git a/src/arch/riscv/locked_mem.hh b/src/arch/riscv/locked_mem.hh index 1583258a8..b1cde34c6 100644 --- a/src/arch/riscv/locked_mem.hh +++ b/src/arch/riscv/locked_mem.hh @@ -82,7 +82,7 @@ handleLockedSnoop(XC *xc, PacketPtr pkt, Addr cacheBlockMask) template <class XC> inline void -handleLockedRead(XC *xc, RequestPtr req) +handleLockedRead(XC *xc, const RequestPtr &req) { locked_addrs.push(req->getPaddr() & ~0xF); DPRINTF(LLSC, "[cid:%d]: Reserved address %x.\n", @@ -94,7 +94,7 @@ handleLockedSnoopHit(XC *xc) {} template <class XC> inline bool -handleLockedWrite(XC *xc, RequestPtr req, Addr cacheBlockMask) +handleLockedWrite(XC *xc, const RequestPtr &req, Addr cacheBlockMask) { // Normally RISC-V uses zero to indicate success and nonzero to indicate // failure (right now only 1 is reserved), but in gem5 zero indicates diff --git a/src/arch/riscv/tlb.cc b/src/arch/riscv/tlb.cc index 0c5962ece..ffb135c5a 100644 --- a/src/arch/riscv/tlb.cc +++ b/src/arch/riscv/tlb.cc @@ -143,7 +143,7 @@ TLB::probeEntry(Addr vpn, uint8_t asn) const } inline Fault -TLB::checkCacheability(RequestPtr &req) +TLB::checkCacheability(const RequestPtr &req) { Addr VAddrUncacheable = 0xA0000000; // In MIPS, cacheability is controlled by certain bits of the virtual @@ -283,7 +283,7 @@ TLB::regStats() } Fault -TLB::translateInst(RequestPtr req, ThreadContext *tc) +TLB::translateInst(const RequestPtr &req, ThreadContext *tc) { if (FullSystem) panic("translateInst not implemented in RISC-V.\n"); @@ -298,7 +298,7 @@ TLB::translateInst(RequestPtr req, ThreadContext *tc) } Fault -TLB::translateData(RequestPtr req, ThreadContext *tc, bool write) +TLB::translateData(const RequestPtr &req, ThreadContext *tc, bool write) { if (FullSystem) panic("translateData not implemented in RISC-V.\n"); @@ -324,7 +324,7 @@ TLB::translateData(RequestPtr req, ThreadContext *tc, bool write) } Fault -TLB::translateAtomic(RequestPtr req, ThreadContext *tc, Mode mode) +TLB::translateAtomic(const RequestPtr &req, ThreadContext *tc, Mode mode) { if (mode == Execute) return translateInst(req, tc); @@ -333,7 +333,7 @@ TLB::translateAtomic(RequestPtr req, ThreadContext *tc, Mode mode) } void -TLB::translateTiming(RequestPtr req, ThreadContext *tc, +TLB::translateTiming(const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode) { assert(translation); @@ -341,7 +341,8 @@ TLB::translateTiming(RequestPtr req, ThreadContext *tc, } Fault -TLB::finalizePhysical(RequestPtr req, ThreadContext *tc, Mode mode) const +TLB::finalizePhysical(const RequestPtr &req, + ThreadContext *tc, Mode mode) const { return NoFault; } diff --git a/src/arch/riscv/tlb.hh b/src/arch/riscv/tlb.hh index ce63fd33a..5d6c9dfc0 100644 --- a/src/arch/riscv/tlb.hh +++ b/src/arch/riscv/tlb.hh @@ -103,7 +103,7 @@ class TLB : public BaseTLB // static helper functions... really static bool validVirtualAddress(Addr vaddr); - static Fault checkCacheability(RequestPtr &req); + static Fault checkCacheability(const RequestPtr &req); // Checkpointing void serialize(CheckpointOut &cp) const override; @@ -112,16 +112,17 @@ class TLB : public BaseTLB void regStats() override; Fault translateAtomic( - RequestPtr req, ThreadContext *tc, Mode mode) override; + const RequestPtr &req, ThreadContext *tc, Mode mode) override; void translateTiming( - RequestPtr req, ThreadContext *tc, + const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode) override; Fault finalizePhysical( - RequestPtr req, ThreadContext *tc, Mode mode) const override; + const RequestPtr &req, + ThreadContext *tc, Mode mode) const override; private: - Fault translateInst(RequestPtr req, ThreadContext *tc); - Fault translateData(RequestPtr req, ThreadContext *tc, bool write); + Fault translateInst(const RequestPtr &req, ThreadContext *tc); + Fault translateData(const RequestPtr &req, ThreadContext *tc, bool write); }; } |