summaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
authorLisa Hsu <Lisa.Hsu@amd.com>2010-01-19 22:03:44 -0800
committerLisa Hsu <Lisa.Hsu@amd.com>2010-01-19 22:03:44 -0800
commitd6da17251774a34b2835b71332cfaa682d979c3f (patch)
treeb71fb3f0d8c4acd2e9e4ac762e2421a7b841e6b2 /src/mem
parent0484432a7ca177d52fa98746b16c92805df73189 (diff)
downloadgem5-d6da17251774a34b2835b71332cfaa682d979c3f.tar.xz
util: do checkpoint aggregation more cleanly, fix last changeset.
1) Move alpha-specific code out of page_table.cc:serialize(). 2) Begin serializing M5_pid and unserializing it, but adding an function to do optional paramIn so that old checkpoints don't need to be fixed up. 3) Fix up alpha startup code so that the unserialized M5_pid value is properly written to DTB_IPR_ASN. 4) Fix the memory unserialize that I forgot somehow in the last changeset. 5) Add in an agg_se.py to handle aggregated checkpoints. --bench foo-bar plus positional arguments foo bar are the only changes in usage from se.py. Note this aggregation stuff has only been tested for Alpha and nothing else, though it should take a very minimal amount of work to get it to work with another ISA.
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/page_table.cc10
-rw-r--r--src/mem/physical.cc8
2 files changed, 2 insertions, 16 deletions
diff --git a/src/mem/page_table.cc b/src/mem/page_table.cc
index 88cfdfeb7..bcaf5582a 100644
--- a/src/mem/page_table.cc
+++ b/src/mem/page_table.cc
@@ -223,15 +223,5 @@ PageTable::unserialize(Checkpoint *cp, const std::string &section)
pTable[vaddr] = *entry;
++i;
}
-
- process->M5_pid = pTable[vaddr].asn;
-
-#if THE_ISA == ALPHA_ISA
- // The IPR_DTB_ASN misc reg must be set in Alpha for the tlb to work
- // correctly
- int id = process->contextIds[0];
- ThreadContext *tc = process->system->getThreadContext(id);
- tc->setMiscRegNoEffect(IPR_DTB_ASN, process->M5_pid << 57);
-#endif
}
diff --git a/src/mem/physical.cc b/src/mem/physical.cc
index 121a6e447..081fbb4cb 100644
--- a/src/mem/physical.cc
+++ b/src/mem/physical.cc
@@ -540,12 +540,8 @@ PhysicalMemory::unserialize(Checkpoint *cp, const string &section)
/* Only copy bytes that are non-zero, so we don't give the VM system hell */
while (curSize < params()->range.size()) {
bytesRead = gzread(compressedMem, tempPage, chunkSize);
- if (bytesRead != chunkSize &&
- bytesRead != params()->range.size() - curSize)
- fatal("Read failed on physical memory checkpoint file '%s'"
- " got %d bytes, expected %d or %d bytes\n",
- filename, bytesRead, chunkSize,
- params()->range.size() - curSize);
+ if (bytesRead == 0)
+ break;
assert(bytesRead % sizeof(long) == 0);