summaryrefslogtreecommitdiff
path: root/mem
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2006-04-11 19:35:30 -0400
committerAli Saidi <saidi@eecs.umich.edu>2006-04-11 19:35:30 -0400
commit08d9e0ea7ad5f6a0addd711bc4ff14cff2789170 (patch)
tree90685e915bb3cf7bd2e0f8e39837643abc1787af /mem
parent194fb50fbd3f00577ce129762c9a8f13c721e4ad (diff)
downloadgem5-08d9e0ea7ad5f6a0addd711bc4ff14cff2789170.tar.xz
change how much of the param string is copied into the kenel
Set locked flag if required make SC always return success -- this needs to be fixed at some point fix a couple of things FS executes a bit of console code before dying a horrible death arch/alpha/linux/system.cc: only need to copy the length of the os flags param, not 256 bytes cpu/simple/cpu.cc: Set the physical flag if required Make LL/SC always return success mem/bus.cc: add some dprintfs and change a assert to a panic mem/port.cc: delete the buffer with the [] operator mem/request.hh: add a function to reset a request --HG-- extra : convert_revision : f2b78ddad33c7f6ffe1c48791d86609ff1d10d46
Diffstat (limited to 'mem')
-rw-r--r--mem/bus.cc12
-rw-r--r--mem/port.cc2
-rw-r--r--mem/request.hh6
3 files changed, 16 insertions, 4 deletions
diff --git a/mem/bus.cc b/mem/bus.cc
index 8e8bc2203..8031dae96 100644
--- a/mem/bus.cc
+++ b/mem/bus.cc
@@ -31,7 +31,8 @@
*/
-#include "bus.hh"
+#include "base/trace.hh"
+#include "mem/bus.hh"
#include "sim/builder.hh"
/** Function called by the port when the bus is recieving a Timing
@@ -57,8 +58,11 @@ Bus::findPort(Addr addr, int id)
dest_id = portList[i].portId;
found = true;
}
+ i++;
}
- assert(dest_id != -1 && "Unable to find destination");
+ if (dest_id == -1)
+ panic("Unable to find destination for addr: %llx", addr);
+
// we shouldn't be sending this back to where it came from
assert(dest_id != id);
@@ -99,11 +103,15 @@ Bus::recvStatusChange(Port::Status status, int id)
assert(snoops.size() == 0);
// or multiple ranges
assert(ranges.size() == 1);
+
DevMap dm;
dm.portId = id;
dm.range = ranges.front();
+ DPRINTF(MMU, "Adding range %llx - %llx for id %d\n", dm.range.start,
+ dm.range.end, id);
portList.push_back(dm);
+ DPRINTF(MMU, "port list has %d entries\n", portList.size());
}
void
diff --git a/mem/port.cc b/mem/port.cc
index d19d8146c..d312f3e3c 100644
--- a/mem/port.cc
+++ b/mem/port.cc
@@ -72,5 +72,5 @@ Port::memsetBlob(Addr addr, uint8_t val, int size)
memset(buf, val, size);
blobHelper(addr, buf, size, Write);
- delete buf;
+ delete [] buf;
}
diff --git a/mem/request.hh b/mem/request.hh
index 90c46646e..6bcfd9c5b 100644
--- a/mem/request.hh
+++ b/mem/request.hh
@@ -63,9 +63,13 @@ class Request
{
//@todo Make Accesor functions, make these private.
public:
- /** Cunstructor, needs a bool to signify if it is/isn't Cpu Request. */
+ /** Constructor, needs a bool to signify if it is/isn't Cpu Request. */
Request(bool isCpu);
+ /** reset the request to it's initial state so it can be reused by the
+ * CPU.*/
+ void reset(bool isCpu);
+
//First non-cpu request fields
private:
/** The physical address of the request. */