diff options
author | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2016-08-15 12:00:35 +0100 |
---|---|---|
committer | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2016-08-15 12:00:35 +0100 |
commit | 698767e5384a664b3bad52c9b40d62daf0eabbfc (patch) | |
tree | 2cb02cf387574c233367bfd6602b9ac271815384 /src/cpu/simple | |
parent | 608a37c844829715c2a15ef079f7dd8db428779b (diff) | |
download | gem5-698767e5384a664b3bad52c9b40d62daf0eabbfc.tar.xz |
cpu, arch: fix the type used for the request flags
Change-Id: I183b9942929c873c3272ce6d1abd4ebc472c7132
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/cpu/simple')
-rw-r--r-- | src/cpu/simple/atomic.cc | 11 | ||||
-rw-r--r-- | src/cpu/simple/atomic.hh | 8 | ||||
-rw-r--r-- | src/cpu/simple/base.hh | 7 | ||||
-rw-r--r-- | src/cpu/simple/exec_context.hh | 7 | ||||
-rw-r--r-- | src/cpu/simple/timing.cc | 7 | ||||
-rw-r--r-- | src/cpu/simple/timing.hh | 7 |
6 files changed, 27 insertions, 20 deletions
diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc index a8e97f14c..8dd81ae0b 100644 --- a/src/cpu/simple/atomic.cc +++ b/src/cpu/simple/atomic.cc @@ -334,8 +334,8 @@ AtomicSimpleCPU::AtomicCPUDPort::recvFunctionalSnoop(PacketPtr pkt) } 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; @@ -422,15 +422,16 @@ AtomicSimpleCPU::readMem(Addr addr, uint8_t * data, } 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; diff --git a/src/cpu/simple/atomic.hh b/src/cpu/simple/atomic.hh index 098ecd759..cdc1890de 100644 --- a/src/cpu/simple/atomic.hh +++ b/src/cpu/simple/atomic.hh @@ -45,6 +45,7 @@ #include "cpu/simple/base.hh" #include "cpu/simple/exec_context.hh" +#include "mem/request.hh" #include "params/AtomicSimpleCPU.hh" #include "sim/probe/probe.hh" @@ -202,12 +203,13 @@ class AtomicSimpleCPU : public BaseSimpleCPU 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; diff --git a/src/cpu/simple/base.hh b/src/cpu/simple/base.hh index 9164a2960..15ab2aba4 100644 --- a/src/cpu/simple/base.hh +++ b/src/cpu/simple/base.hh @@ -143,12 +143,13 @@ class BaseSimpleCPU : public BaseCPU 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; diff --git a/src/cpu/simple/exec_context.hh b/src/cpu/simple/exec_context.hh index f9d80d0d5..430790c09 100644 --- a/src/cpu/simple/exec_context.hh +++ b/src/cpu/simple/exec_context.hh @@ -53,6 +53,7 @@ #include "cpu/simple/base.hh" #include "cpu/static_inst_fwd.hh" #include "cpu/translation.hh" +#include "mem/request.hh" class BaseSimpleCPU; @@ -286,19 +287,19 @@ class SimpleExecContext : public ExecContext { { 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); } diff --git a/src/cpu/simple/timing.cc b/src/cpu/simple/timing.cc index 515d6b23c..65fea15ee 100644 --- a/src/cpu/simple/timing.cc +++ b/src/cpu/simple/timing.cc @@ -409,14 +409,15 @@ TimingSimpleCPU::buildSplitPacket(PacketPtr &pkt1, PacketPtr &pkt2, 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; @@ -489,7 +490,7 @@ TimingSimpleCPU::handleWritePacket() 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; diff --git a/src/cpu/simple/timing.hh b/src/cpu/simple/timing.hh index 035f05158..eebf884ca 100644 --- a/src/cpu/simple/timing.hh +++ b/src/cpu/simple/timing.hh @@ -279,12 +279,13 @@ class TimingSimpleCPU : public BaseSimpleCPU 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); |