summaryrefslogtreecommitdiff
path: root/src/mem/cache/mshr_queue.cc
diff options
context:
space:
mode:
authorGiacomo Gabrielli <Giacomo.Gabrielli@arm.com>2014-01-24 15:29:30 -0600
committerGiacomo Gabrielli <Giacomo.Gabrielli@arm.com>2014-01-24 15:29:30 -0600
commitaefe9cc624902fe26535028f86ba3a45f555bcf0 (patch)
tree4d775f34b34eeafc0c596b95aa071cc52fb94283 /src/mem/cache/mshr_queue.cc
parent7f835a59f1c342eb1c170973ad53c493cc38e978 (diff)
downloadgem5-aefe9cc624902fe26535028f86ba3a45f555bcf0.tar.xz
mem: Add support for a security bit in the memory system
This patch adds the basic building blocks required to support e.g. ARM TrustZone by discerning secure and non-secure memory accesses.
Diffstat (limited to 'src/mem/cache/mshr_queue.cc')
-rw-r--r--src/mem/cache/mshr_queue.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/mem/cache/mshr_queue.cc b/src/mem/cache/mshr_queue.cc
index d8cc5f40a..3150b4f5d 100644
--- a/src/mem/cache/mshr_queue.cc
+++ b/src/mem/cache/mshr_queue.cc
@@ -62,13 +62,13 @@ MSHRQueue::MSHRQueue(const std::string &_label,
}
MSHR *
-MSHRQueue::findMatch(Addr addr) const
+MSHRQueue::findMatch(Addr addr, bool is_secure) const
{
MSHR::ConstIterator i = allocatedList.begin();
MSHR::ConstIterator end = allocatedList.end();
for (; i != end; ++i) {
MSHR *mshr = *i;
- if (mshr->addr == addr) {
+ if (mshr->addr == addr && mshr->isSecure == is_secure) {
return mshr;
}
}
@@ -76,7 +76,7 @@ MSHRQueue::findMatch(Addr addr) const
}
bool
-MSHRQueue::findMatches(Addr addr, vector<MSHR*>& matches) const
+MSHRQueue::findMatches(Addr addr, bool is_secure, vector<MSHR*>& matches) const
{
// Need an empty vector
assert(matches.empty());
@@ -85,7 +85,7 @@ MSHRQueue::findMatches(Addr addr, vector<MSHR*>& matches) const
MSHR::ConstIterator end = allocatedList.end();
for (; i != end; ++i) {
MSHR *mshr = *i;
- if (mshr->addr == addr) {
+ if (mshr->addr == addr && mshr->isSecure == is_secure) {
retval = true;
matches.push_back(mshr);
}
@@ -113,19 +113,19 @@ MSHRQueue::checkFunctional(PacketPtr pkt, Addr blk_addr)
MSHR *
-MSHRQueue::findPending(Addr addr, int size) const
+MSHRQueue::findPending(Addr addr, int size, bool is_secure) const
{
MSHR::ConstIterator i = readyList.begin();
MSHR::ConstIterator end = readyList.end();
for (; i != end; ++i) {
MSHR *mshr = *i;
- if (mshr->addr < addr) {
- if (mshr->addr + mshr->size > addr) {
- return mshr;
- }
- } else {
- if (addr + size > mshr->addr) {
- return mshr;
+ if (mshr->isSecure == is_secure) {
+ if (mshr->addr < addr) {
+ if (mshr->addr + mshr->size > addr)
+ return mshr;
+ } else {
+ if (addr + size > mshr->addr)
+ return mshr;
}
}
}