changeset 237ea6324ece in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=237ea6324ece
description:
ARM: Handle case where new TLB size is different from previous TLB size.
After a checkpoint we need to make sure that we restore the right
number of entries.
diffstat:
src/arch/arm/tlb.cc | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (24 lines):
diff -r 9a3c002dab3e -r 237ea6324ece src/arch/arm/tlb.cc
--- a/src/arch/arm/tlb.cc Thu Jun 16 15:08:11 2011 -0500
+++ b/src/arch/arm/tlb.cc Thu Jun 16 15:08:12 2011 -0500
@@ -264,6 +264,9 @@
DPRINTF(Checkpoint, "Serializing Arm TLB\n");
SERIALIZE_SCALAR(_attr);
+
+ int num_entries = size;
+ SERIALIZE_SCALAR(num_entries);
for(int i = 0; i < size; i++){
nameOut(os, csprintf("%s.TlbEntry%d", name(), i));
table[i].serialize(os);
@@ -276,7 +279,9 @@
DPRINTF(Checkpoint, "Unserializing Arm TLB\n");
UNSERIALIZE_SCALAR(_attr);
- for(int i = 0; i < size; i++){
+ int num_entries;
+ UNSERIALIZE_SCALAR(num_entries);
+ for(int i = 0; i < min(size, num_entries); i++){
table[i].unserialize(cp, csprintf("%s.TlbEntry%d", section, i));
}
miscRegValid = false;
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev