changeset 9141d87c7f71 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=9141d87c7f71
description:
        sim, arm: add checkpoint upgrader for d02b45a5

        The insertion of CONTEXTIDR_EL2 in the ARM miscellaneous registers
        obsoletes old checkpoints.

diffstat:

 src/sim/serialize.hh |   2 +-
 util/cpt_upgrader.py |  13 +++++++++++++
 2 files changed, 14 insertions(+), 1 deletions(-)

diffs (42 lines):

diff -r cba0f26038b4 -r 9141d87c7f71 src/sim/serialize.hh
--- a/src/sim/serialize.hh      Mon Jun 01 19:44:19 2015 +0100
+++ b/src/sim/serialize.hh      Mon Jun 01 18:05:11 2015 -0500
@@ -59,7 +59,7 @@
  * SimObject shouldn't cause the version number to increase, only changes to
  * existing objects such as serializing/unserializing more state, changing 
sizes
  * of serialized arrays, etc. */
-static const uint64_t gem5CheckpointVersion = 0x000000000000000d;
+static const uint64_t gem5CheckpointVersion = 0x000000000000000e;
 
 template <class T>
 void paramOut(std::ostream &os, const std::string &name, const T &param);
diff -r cba0f26038b4 -r 9141d87c7f71 util/cpt_upgrader.py
--- a/util/cpt_upgrader.py      Mon Jun 01 19:44:19 2015 +0100
+++ b/util/cpt_upgrader.py      Mon Jun 01 18:05:11 2015 -0500
@@ -602,6 +602,18 @@
                 cpt.set(sec, 'intRegs', ' '.join(intRegs))
                 cpt.set(sec, 'ccRegs',  ' '.join(ccRegs))
 
+# Checkpoint version E adds the ARM CONTEXTIDR_EL2 miscreg.
+def from_D(cpt):
+    if cpt.get('root','isa') == 'arm':
+        for sec in cpt.sections():
+            import re
+            # Search for all ISA sections
+            if re.search('.*sys.*\.cpu.*\.isa$', sec):
+                miscRegs = cpt.get(sec, 'miscRegs').split()
+                # CONTEXTIDR_EL2 defaults to 0b11111100000000000001
+                miscRegs[599:599] = [0xFC001]
+                cpt.set(sec, 'miscRegs', ' '.join(str(x) for x in miscRegs))
+
 migrations = []
 migrations.append(from_0)
 migrations.append(from_1)
@@ -616,6 +628,7 @@
 migrations.append(from_A)
 migrations.append(from_B)
 migrations.append(from_C)
+migrations.append(from_D)
 
 verbose_print = False
 
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to