43 #ifndef __ARCH_MIPS_LOCKED_MEM_HH__
44 #define __ARCH_MIPS_LOCKED_MEM_HH__
52 #include "arch/registers.hh"
55 #include "debug/LLSC.hh"
71 if (locked_addr == snoop_addr)
82 DPRINTF(LLSC,
"[cid:%i]: Load-Link Flag Set & Load-Link"
83 " Address set to %x.\n",
106 if (!lock_flag || (req->
getPaddr() & ~0xf) != lock_addr) {
116 int stCondFailures = xc->readStCondFailures();
118 xc->setStCondFailures(stCondFailures);
119 if (stCondFailures % 100000 == 0) {
120 warn(
"%i: context %d: %d consecutive "
121 "store conditional failures\n",
122 curTick(), xc->contextId(), stCondFailures);
126 DPRINTF(LLSC,
"[cid:%i]: Lock Flag Set, "
127 "Store Conditional Failed.\n",
129 }
else if ((req->
getPaddr() & ~0xf) != lock_addr) {
130 DPRINTF(LLSC,
"[cid:%i]: Load-Link Address Mismatch, "
131 "Store Conditional Failed.\n",
bool isUncacheable() const
Accessor functions for flags.
ContextID contextId() const
Accessor function for context ID.
void setExtraData(uint64_t extraData)
Accessor function for store conditional return value.
Declaration of a request, the overall memory request consisting of the parts of the request that are ...
void handleLockedSnoopHit(XC *xc)
void handleLockedSnoop(XC *xc, PacketPtr pkt, Addr cacheBlockMask)
void handleLockedRead(XC *xc, Request *req)
Tick curTick()
The current simulated tick.
bool handleLockedWrite(XC *xc, Request *req, Addr cacheBlockMask)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
Declaration of the Packet class.