summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2011-02-06 22:14:18 -0800
committerBrad Beckmann <Brad.Beckmann@amd.com>2011-02-06 22:14:18 -0800
commit9782ca5defac34d8e6acfb8304ed2f35908f7a72 (patch)
tree95d4d547130cfebf759f7b585e3f49a0654d67bc /src
parent17b4ef52bb9b31f7d57a499eac1d1656bb5df679 (diff)
downloadgem5-9782ca5defac34d8e6acfb8304ed2f35908f7a72.tar.xz
ruby: Assert for x86 misaligned access
This patch ensures only aligned access are passed to ruby and includes a fix to the DPRINTF address print.
Diffstat (limited to 'src')
-rw-r--r--src/mem/ruby/system/RubyPort.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mem/ruby/system/RubyPort.cc b/src/mem/ruby/system/RubyPort.cc
index ea1ff04f0..b3225cdca 100644
--- a/src/mem/ruby/system/RubyPort.cc
+++ b/src/mem/ruby/system/RubyPort.cc
@@ -226,6 +226,9 @@ RubyPort::M5Port::recvTiming(PacketPtr pkt)
pkt->getSize(), pc, type,
RubyAccessMode_Supervisor, pkt);
+ assert(Address(ruby_request.paddr).getOffset() + ruby_request.len <=
+ RubySystem::getBlockSizeBytes());
+
// Submit the ruby request
RequestStatus requestStatus = ruby_port->makeRequest(ruby_request);
@@ -237,7 +240,7 @@ RubyPort::M5Port::recvTiming(PacketPtr pkt)
}
DPRINTF(MemoryAccess,
- "Request for address #x did not issue because %s\n",
+ "Request for address %#x did not issue because %s\n",
pkt->getAddr(), RequestStatus_to_string(requestStatus));
SenderState* senderState = safe_cast<SenderState*>(pkt->senderState);