case MISCREG_ATS1HR:
case MISCREG_ATS1HW:
{
- unsigned flags = 0;
+ Request::Flags flags = 0;
BaseTLB::Mode mode = BaseTLB::Read;
TLB::ArmTranslationType tranType = TLB::NormalTran;
Fault fault;
case MISCREG_AT_S1E3W_Xt:
{
RequestPtr req = new Request;
- unsigned flags = 0;
+ Request::Flags flags = 0;
BaseTLB::Mode mode = BaseTLB::Read;
TLB::ArmTranslationType tranType = TLB::NormalTran;
Fault fault;
#include "debug/TLB.hh"
#include "debug/TLBVerbose.hh"
#include "mem/page_table.hh"
+#include "mem/request.hh"
#include "params/ArmTLB.hh"
#include "sim/full_system.hh"
#include "sim/process.hh"
vaddr = purifyTaggedAddr(vaddr_tainted, tc, aarch64EL, ttbcr);
else
vaddr = vaddr_tainted;
- uint32_t flags = req->getFlags();
+ Request::Flags flags = req->getFlags();
bool is_fetch = (mode == Execute);
bool is_write = (mode == Write);
TLB::checkPermissions(TlbEntry *te, RequestPtr req, Mode mode)
{
Addr vaddr = req->getVaddr(); // 32-bit don't have to purify
- uint32_t flags = req->getFlags();
+ Request::Flags flags = req->getFlags();
bool is_fetch = (mode == Execute);
bool is_write = (mode == Write);
bool is_priv = isPriv && !(flags & UserMode);
Addr vaddr_tainted = req->getVaddr();
Addr vaddr = purifyTaggedAddr(vaddr_tainted, tc, aarch64EL, ttbcr);
- uint32_t flags = req->getFlags();
+ Request::Flags flags = req->getFlags();
bool is_fetch = (mode == Execute);
bool is_write = (mode == Write);
bool is_priv M5_VAR_USED = isPriv && !(flags & UserMode);
vaddr = purifyTaggedAddr(vaddr_tainted, tc, aarch64EL, ttbcr);
else
vaddr = vaddr_tainted;
- uint32_t flags = req->getFlags();
+ Request::Flags flags = req->getFlags();
bool is_fetch = (mode == Execute);
bool is_write = (mode == Write);
isPriv, flags & UserMode, isSecure, tranType & S1S2NsTran);
DPRINTF(TLB, "translateFs addr %#x, mode %d, st2 %d, scr %#x sctlr %#x "
- "flags %#x tranType 0x%x\n", vaddr_tainted, mode, isStage2,
+ "flags %#lx tranType 0x%x\n", vaddr_tainted, mode, isStage2,
scr, sctlr, flags, tranType);
if ((req->isInstFetch() && (!sctlr.i)) ||
template <class XC, class MemT>
Fault
initiateMemRead(XC *xc, Trace::InstRecord *traceData, Addr addr,
- MemT &mem, unsigned flags)
+ MemT &mem, Request::Flags flags)
{
return xc->initiateMemRead(addr, sizeof(MemT), flags);
}
template <class XC, class MemT>
Fault
readMemAtomic(XC *xc, Trace::InstRecord *traceData, Addr addr, MemT &mem,
- unsigned flags)
+ Request::Flags flags)
{
memset(&mem, 0, sizeof(mem));
Fault fault = xc->readMem(addr, (uint8_t *)&mem, sizeof(MemT), flags);
template <class XC, class MemT>
Fault
writeMemTiming(XC *xc, Trace::InstRecord *traceData, MemT mem, Addr addr,
- unsigned flags, uint64_t *res)
+ Request::Flags flags, uint64_t *res)
{
if (traceData) {
traceData->setData(mem);
template <class XC, class MemT>
Fault
writeMemAtomic(XC *xc, Trace::InstRecord *traceData, const MemT &mem,
- Addr addr, unsigned flags, uint64_t *res)
+ Addr addr, Request::Flags flags, uint64_t *res)
{
if (traceData) {
traceData->setData(mem);
template <class XC>
Fault
initiateMemRead(XC *xc, Trace::InstRecord *traceData, Addr addr,
- unsigned dataSize, unsigned flags)
+ unsigned dataSize, Request::Flags flags)
{
return xc->initiateMemRead(addr, dataSize, flags);
}
template <class XC>
Fault
readMemAtomic(XC *xc, Trace::InstRecord *traceData, Addr addr, uint64_t &mem,
- unsigned dataSize, unsigned flags)
+ unsigned dataSize, Request::Flags flags)
{
memset(&mem, 0, sizeof(mem));
Fault fault = xc->readMem(addr, (uint8_t *)&mem, dataSize, flags);
template <class XC>
Fault
writeMemTiming(XC *xc, Trace::InstRecord *traceData, uint64_t mem,
- unsigned dataSize, Addr addr, unsigned flags, uint64_t *res)
+ unsigned dataSize, Addr addr, Request::Flags flags,
+ uint64_t *res)
{
if (traceData) {
traceData->setData(mem);
template <class XC>
Fault
writeMemAtomic(XC *xc, Trace::InstRecord *traceData, uint64_t mem,
- unsigned dataSize, Addr addr, unsigned flags, uint64_t *res)
+ unsigned dataSize, Addr addr, Request::Flags flags,
+ uint64_t *res)
{
if (traceData) {
traceData->setData(mem);
TLB::translate(RequestPtr req, ThreadContext *tc, Translation *translation,
Mode mode, bool &delayedResponse, bool timing)
{
- uint32_t flags = req->getFlags();
+ Request::Flags flags = req->getFlags();
int seg = flags & SegmentFlagMask;
bool storeCheck = flags & (StoreCheck << FlagShift);
#include "cpu/static_inst.hh"
#include "cpu/translation.hh"
#include "mem/packet.hh"
+#include "mem/request.hh"
#include "sim/byteswap.hh"
#include "sim/system.hh"
cpu->demapPage(vaddr, asn);
}
- Fault initiateMemRead(Addr addr, unsigned size, unsigned flags);
+ Fault initiateMemRead(Addr addr, unsigned size, Request::Flags flags);
- Fault writeMem(uint8_t *data, unsigned size,
- Addr addr, unsigned flags, uint64_t *res);
+ Fault writeMem(uint8_t *data, unsigned size, Addr addr,
+ Request::Flags flags, uint64_t *res);
/** Splits a request in two if it crosses a dcache block. */
void splitRequest(RequestPtr req, RequestPtr &sreqLow,
template<class Impl>
Fault
-BaseDynInst<Impl>::initiateMemRead(Addr addr, unsigned size, unsigned flags)
+BaseDynInst<Impl>::initiateMemRead(Addr addr, unsigned size,
+ Request::Flags flags)
{
instFlags[ReqMade] = true;
Request *req = NULL;
template<class Impl>
Fault
-BaseDynInst<Impl>::writeMem(uint8_t *data, unsigned size,
- Addr addr, unsigned flags, uint64_t *res)
+BaseDynInst<Impl>::writeMem(uint8_t *data, unsigned size, Addr addr,
+ Request::Flags flags, uint64_t *res)
{
if (traceData)
traceData->setMem(addr, size, flags);
}
Fault
-CheckerCPU::readMem(Addr addr, uint8_t *data, unsigned size, unsigned flags)
+CheckerCPU::readMem(Addr addr, uint8_t *data, unsigned size,
+ Request::Flags flags)
{
Fault fault = NoFault;
int fullSize = size;
Fault
CheckerCPU::writeMem(uint8_t *data, unsigned size,
- Addr addr, unsigned flags, uint64_t *res)
+ Addr addr, Request::Flags flags, uint64_t *res)
{
Fault fault = NoFault;
bool checked_flags = false;
#include "cpu/simple_thread.hh"
#include "cpu/static_inst.hh"
#include "debug/Checker.hh"
+#include "mem/request.hh"
#include "params/CheckerCPU.hh"
#include "sim/eventq.hh"
}
Fault readMem(Addr addr, uint8_t *data, unsigned size,
- unsigned flags) override;
- Fault writeMem(uint8_t *data, unsigned size,
- Addr addr, unsigned flags, uint64_t *res) override;
+ Request::Flags flags) override;
+ Fault writeMem(uint8_t *data, unsigned size, Addr addr,
+ Request::Flags flags, uint64_t *res) override;
unsigned int readStCondFailures() const override {
return thread->readStCondFailures();
#include "cpu/base.hh"
#include "cpu/static_inst_fwd.hh"
#include "cpu/translation.hh"
+#include "mem/request.hh"
/**
* The ExecContext is an abstract base class the provides the
* should never be called).
*/
virtual Fault readMem(Addr addr, uint8_t *data, unsigned int size,
- unsigned int flags)
+ Request::Flags flags)
{
panic("ExecContext::readMem() should be overridden\n");
}
* should never be called).
*/
virtual Fault initiateMemRead(Addr addr, unsigned int size,
- unsigned int flags)
+ Request::Flags flags)
{
panic("ExecContext::initiateMemRead() should be overridden\n");
}
* For timing-mode contexts, initiate a timing memory write operation.
*/
virtual Fault writeMem(uint8_t *data, unsigned int size, Addr addr,
- unsigned int flags, uint64_t *res) = 0;
+ Request::Flags flags, uint64_t *res) = 0;
/**
* Sets the number of consecutive store conditional failures.
#include "cpu/minor/pipeline.hh"
#include "cpu/base.hh"
#include "cpu/simple_thread.hh"
+#include "mem/request.hh"
#include "debug/MinorExecute.hh"
namespace Minor
}
Fault
- initiateMemRead(Addr addr, unsigned int size, unsigned int flags)
+ initiateMemRead(Addr addr, unsigned int size, Request::Flags flags)
{
execute.getLSQ().pushRequest(inst, true /* load */, nullptr,
size, addr, flags, NULL);
Fault
writeMem(uint8_t *data, unsigned int size, Addr addr,
- unsigned int flags, uint64_t *res)
+ Request::Flags flags, uint64_t *res)
{
execute.getLSQ().pushRequest(inst, false /* store */, data,
size, addr, flags, res);
void
LSQ::pushRequest(MinorDynInstPtr inst, bool isLoad, uint8_t *data,
- unsigned int size, Addr addr, unsigned int flags, uint64_t *res)
+ unsigned int size, Addr addr, Request::Flags flags,
+ uint64_t *res)
{
bool needs_burst = transferNeedsBurst(addr, size, lineWidth);
LSQRequestPtr request;
/** Single interface for readMem/writeMem to issue requests into
* the LSQ */
void pushRequest(MinorDynInstPtr inst, bool isLoad, uint8_t *data,
- unsigned int size, Addr addr, unsigned int flags, uint64_t *res);
+ unsigned int size, Addr addr, Request::Flags flags,
+ uint64_t *res);
/** Push a predicate failed-representing request into the queues just
* to maintain commit order */
}
Fault
-AtomicSimpleCPU::readMem(Addr addr, uint8_t * data,
- unsigned size, unsigned flags)
+AtomicSimpleCPU::readMem(Addr addr, uint8_t * data, unsigned size,
+ Request::Flags flags)
{
SimpleExecContext& t_info = *threadInfo[curThread];
SimpleThread* thread = t_info.thread;
}
Fault
-AtomicSimpleCPU::initiateMemRead(Addr addr, unsigned size, unsigned flags)
+AtomicSimpleCPU::initiateMemRead(Addr addr, unsigned size,
+ Request::Flags flags)
{
panic("initiateMemRead() is for timing accesses, and should "
"never be called on AtomicSimpleCPU.\n");
}
Fault
-AtomicSimpleCPU::writeMem(uint8_t *data, unsigned size,
- Addr addr, unsigned flags, uint64_t *res)
+AtomicSimpleCPU::writeMem(uint8_t *data, unsigned size, Addr addr,
+ Request::Flags flags, uint64_t *res)
{
SimpleExecContext& t_info = *threadInfo[curThread];
SimpleThread* thread = t_info.thread;
#include "cpu/simple/base.hh"
#include "cpu/simple/exec_context.hh"
+#include "mem/request.hh"
#include "params/AtomicSimpleCPU.hh"
#include "sim/probe/probe.hh"
void suspendContext(ThreadID thread_num) override;
Fault readMem(Addr addr, uint8_t *data, unsigned size,
- unsigned flags) override;
+ Request::Flags flags) override;
- Fault initiateMemRead(Addr addr, unsigned size, unsigned flags) override;
+ Fault initiateMemRead(Addr addr, unsigned size,
+ Request::Flags flags) override;
Fault writeMem(uint8_t *data, unsigned size,
- Addr addr, unsigned flags, uint64_t *res) override;
+ Addr addr, Request::Flags flags, uint64_t *res) override;
void regProbePoints() override;
void startup() override;
virtual Fault readMem(Addr addr, uint8_t* data, unsigned size,
- unsigned flags) = 0;
+ Request::Flags flags) = 0;
- virtual Fault initiateMemRead(Addr addr, unsigned size, unsigned flags) = 0;
+ virtual Fault initiateMemRead(Addr addr, unsigned size,
+ Request::Flags flags) = 0;
virtual Fault writeMem(uint8_t* data, unsigned size, Addr addr,
- unsigned flags, uint64_t* res) = 0;
+ Request::Flags flags, uint64_t* res) = 0;
void countInst();
Counter totalInsts() const override;
#include "cpu/simple/base.hh"
#include "cpu/static_inst_fwd.hh"
#include "cpu/translation.hh"
+#include "mem/request.hh"
class BaseSimpleCPU;
{ panic("BaseSimpleCPU::getEA() not implemented\n"); }
Fault readMem(Addr addr, uint8_t *data, unsigned int size,
- unsigned int flags) override
+ Request::Flags flags) override
{
return cpu->readMem(addr, data, size, flags);
}
Fault initiateMemRead(Addr addr, unsigned int size,
- unsigned int flags) override
+ Request::Flags flags) override
{
return cpu->initiateMemRead(addr, size, flags);
}
Fault writeMem(uint8_t *data, unsigned int size, Addr addr,
- unsigned int flags, uint64_t *res) override
+ Request::Flags flags, uint64_t *res) override
{
return cpu->writeMem(data, size, addr, flags, res);
}
Fault
TimingSimpleCPU::readMem(Addr addr, uint8_t *data,
- unsigned size, unsigned flags)
+ unsigned size, Request::Flags flags)
{
panic("readMem() is for atomic accesses, and should "
"never be called on TimingSimpleCPU.\n");
}
Fault
-TimingSimpleCPU::initiateMemRead(Addr addr, unsigned size, unsigned flags)
+TimingSimpleCPU::initiateMemRead(Addr addr, unsigned size,
+ Request::Flags flags)
{
SimpleExecContext &t_info = *threadInfo[curThread];
SimpleThread* thread = t_info.thread;
Fault
TimingSimpleCPU::writeMem(uint8_t *data, unsigned size,
- Addr addr, unsigned flags, uint64_t *res)
+ Addr addr, Request::Flags flags, uint64_t *res)
{
SimpleExecContext &t_info = *threadInfo[curThread];
SimpleThread* thread = t_info.thread;
void suspendContext(ThreadID thread_num) override;
Fault readMem(Addr addr, uint8_t *data, unsigned size,
- unsigned flags) override;
+ Request::Flags flags) override;
- Fault initiateMemRead(Addr addr, unsigned size, unsigned flags) override;
+ Fault initiateMemRead(Addr addr, unsigned size,
+ Request::Flags flags) override;
Fault writeMem(uint8_t *data, unsigned size,
- Addr addr, unsigned flags, uint64_t *res) override;
+ Addr addr, Request::Flags flags, uint64_t *res) override;
void fetch();
void sendFetch(const Fault &fault, RequestPtr req, ThreadContext *tc);