summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system/RubyPort.cc
diff options
context:
space:
mode:
authorSomayeh Sardashti <somayeh@cs.wisc.edu>2011-03-28 10:49:45 -0500
committerSomayeh Sardashti <somayeh@cs.wisc.edu>2011-03-28 10:49:45 -0500
commitc8bbfed93752c2c79d36bb9dedbc2208b856dae6 (patch)
treec33a164e435603a4424f81f7f09ec50b5f01e455 /src/mem/ruby/system/RubyPort.cc
parentef987a4064f1e81fd1b61f3de03834a51658645f (diff)
downloadgem5-c8bbfed93752c2c79d36bb9dedbc2208b856dae6.tar.xz
This patch supports cache flushing in MOESI_hammer
Diffstat (limited to 'src/mem/ruby/system/RubyPort.cc')
-rw-r--r--src/mem/ruby/system/RubyPort.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/mem/ruby/system/RubyPort.cc b/src/mem/ruby/system/RubyPort.cc
index 92627740f..6d5cb71bf 100644
--- a/src/mem/ruby/system/RubyPort.cc
+++ b/src/mem/ruby/system/RubyPort.cc
@@ -244,6 +244,8 @@ RubyPort::M5Port::recvTiming(PacketPtr pkt)
// Note: M5 packets do not differentiate ST from RMW_Write
//
type = RubyRequestType_ST;
+ } else if (pkt->isFlush()) {
+ type = RubyRequestType_FLUSH;
} else {
panic("Unsupported ruby packet type\n");
}
@@ -335,7 +337,7 @@ RubyPort::M5Port::hitCallback(PacketPtr pkt)
//
// Unless specified at configuraiton, all responses except failed SC
- // operations access M5 physical memory.
+ // and Flush operations access M5 physical memory.
//
bool accessPhysMem = access_phys_mem;
@@ -361,11 +363,19 @@ RubyPort::M5Port::hitCallback(PacketPtr pkt)
pkt->convertLlToRead();
}
}
+
+ //
+ // Flush requests don't access physical memory
+ //
+ if (pkt->isFlush()) {
+ accessPhysMem = false;
+ }
+
DPRINTF(RubyPort, "Hit callback needs response %d\n", needsResponse);
if (accessPhysMem) {
ruby_port->physMemPort->sendAtomic(pkt);
- } else {
+ } else if (needsResponse) {
pkt->makeResponse();
}