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.
This commit is contained in:
Brad Beckmann 2011-02-06 22:14:18 -08:00
parent 17b4ef52bb
commit 9782ca5def

View file

@ -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);