changeset 4b7f60080149 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=4b7f60080149
description:
mem: Add privilege info to request class
This patch adds a flag in the request class that indicates if the
request
was made in privileged mode.
diffstat:
src/arch/arm/tlb.cc | 2 ++
src/mem/request.hh | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)
diffs (32 lines):
diff -r 7890c22dad25 -r 4b7f60080149 src/arch/arm/tlb.cc
--- a/src/arch/arm/tlb.cc Thu Oct 31 13:41:13 2013 -0500
+++ b/src/arch/arm/tlb.cc Thu Oct 31 13:41:13 2013 -0500
@@ -474,6 +474,8 @@
bool is_priv = isPriv && !(flags & UserMode);
req->setAsid(contextId.asid);
+ if (is_priv)
+ req->setFlags(Request::PRIVILEGED);
DPRINTF(TLBVerbose, "CPSR is priv:%d UserMode:%d\n",
isPriv, flags & UserMode);
diff -r 7890c22dad25 -r 4b7f60080149 src/mem/request.hh
--- a/src/mem/request.hh Thu Oct 31 13:41:13 2013 -0500
+++ b/src/mem/request.hh Thu Oct 31 13:41:13 2013 -0500
@@ -111,6 +111,8 @@
static const FlagsType MMAPPED_IPR = 0x00002000;
/** This request is a clear exclusive. */
static const FlagsType CLEAR_LL = 0x00004000;
+ /** This request is made in privileged mode. */
+ static const FlagsType PRIVILEGED = 0x00008000;
/** The request should not cause a memory access. */
static const FlagsType NO_ACCESS = 0x00080000;
@@ -539,6 +541,7 @@
bool isInstFetch() const { return _flags.isSet(INST_FETCH); }
bool isPrefetch() const { return _flags.isSet(PREFETCH); }
bool isLLSC() const { return _flags.isSet(LLSC); }
+ bool isPriv() const { return _flags.isSet(PRIVILEGED); }
bool isLocked() const { return _flags.isSet(LOCKED); }
bool isSwap() const { return _flags.isSet(MEM_SWAP|MEM_SWAP_COND); }
bool isCondSwap() const { return _flags.isSet(MEM_SWAP_COND); }
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev