summaryrefslogtreecommitdiff
path: root/src/mem/physical.cc
diff options
context:
space:
mode:
authorAli Saidi <Ali.Saidi@ARM.com>2010-11-08 13:58:25 -0600
committerAli Saidi <Ali.Saidi@ARM.com>2010-11-08 13:58:25 -0600
commita1e82259759ce7290269aeca6742098f1adbf2fd (patch)
tree2f93b2fe1d64c24cac0e5405f9f5a7b388c57592 /src/mem/physical.cc
parent432fa0aad6092d6a9252f6a9c83c8b36509c1341 (diff)
downloadgem5-a1e82259759ce7290269aeca6742098f1adbf2fd.tar.xz
ARM: Add checkpointing support
Diffstat (limited to 'src/mem/physical.cc')
-rw-r--r--src/mem/physical.cc30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/mem/physical.cc b/src/mem/physical.cc
index 889794db6..c24300cad 100644
--- a/src/mem/physical.cc
+++ b/src/mem/physical.cc
@@ -1,4 +1,16 @@
/*
+ * Copyright (c) 2010 ARM Limited
+ * All rights reserved
+ *
+ * The license below extends only to copyright in the software and shall
+ * not be construed as granting a license to any other intellectual
+ * property including but not limited to intellectual property relating
+ * to a hardware implementation of the functionality of the software
+ * licensed hereunder. You may use the software subject to the license
+ * terms below provided that you ensure that this notice is replicated
+ * unmodified and in its entirety in all distributions of the software,
+ * modified or unmodified, in source code or in binary form.
+ *
* Copyright (c) 2001-2005 The Regents of The University of Michigan
* All rights reserved.
*
@@ -500,6 +512,18 @@ PhysicalMemory::serialize(ostream &os)
if (gzclose(compressedMem))
fatal("Close failed on physical memory checkpoint file '%s'\n",
filename);
+
+ list<LockedAddr>::iterator i = lockedAddrList.begin();
+
+ vector<Addr> lal_addr;
+ vector<int> lal_cid;
+ while (i != lockedAddrList.end()) {
+ lal_addr.push_back(i->addr);
+ lal_cid.push_back(i->contextId);
+ i++;
+ }
+ arrayParamOut(os, "lal_addr", lal_addr);
+ arrayParamOut(os, "lal_cid", lal_cid);
}
void
@@ -579,6 +603,12 @@ PhysicalMemory::unserialize(Checkpoint *cp, const string &section)
fatal("Close failed on physical memory checkpoint file '%s'\n",
filename);
+ vector<Addr> lal_addr;
+ vector<int> lal_cid;
+ arrayParamIn(cp, section, "lal_addr", lal_addr);
+ arrayParamIn(cp, section, "lal_cid", lal_cid);
+ for(int i = 0; i < lal_addr.size(); i++)
+ lockedAddrList.push_front(LockedAddr(lal_addr[i], lal_cid[i]));
}
PhysicalMemory *