Currently, we invalidate the cached miscregs in
TLB::unserialize(). The intended use of the drainResume() method is to
invalidate cached state and prepare the system to resume after a CPU
handover or (un)serialization. This patch moves the TLB miscregs
invalidation code to the drainResume() method to avoid surprising
behavior.
/*
- * Copyright (c) 2010 ARM Limited
+ * Copyright (c) 2010-2012 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
flushTlbMva++;
}
+void
+TLB::drainResume()
+{
+ // We might have unserialized something or switched CPUs, so make
+ // sure to re-read the misc regs.
+ miscRegValid = false;
+}
+
void
TLB::serialize(ostream &os)
{
for(int i = 0; i < min(size, num_entries); i++){
table[i].unserialize(cp, csprintf("%s.TlbEntry%d", section, i));
}
- miscRegValid = false;
}
void
/*
- * Copyright (c) 2010 ARM Limited
+ * Copyright (c) 2010-2012 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
Fault translateTiming(RequestPtr req, ThreadContext *tc,
Translation *translation, Mode mode);
+ void drainResume();
+
// Checkpointing
void serialize(std::ostream &os);
void unserialize(Checkpoint *cp, const std::string §ion);