summaryrefslogtreecommitdiff
path: root/src/dev/arm/pl011.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/dev/arm/pl011.cc
parent432fa0aad6092d6a9252f6a9c83c8b36509c1341 (diff)
downloadgem5-a1e82259759ce7290269aeca6742098f1adbf2fd.tar.xz
ARM: Add checkpointing support
Diffstat (limited to 'src/dev/arm/pl011.cc')
-rw-r--r--src/dev/arm/pl011.cc42
1 files changed, 40 insertions, 2 deletions
diff --git a/src/dev/arm/pl011.cc b/src/dev/arm/pl011.cc
index 555636f04..d8ea9409b 100644
--- a/src/dev/arm/pl011.cc
+++ b/src/dev/arm/pl011.cc
@@ -274,13 +274,51 @@ Pl011::generateInterrupt()
void
Pl011::serialize(std::ostream &os)
{
- panic("Need to implement serialization\n");
+ DPRINTF(Checkpoint, "Serializing Arm PL011\n");
+ SERIALIZE_SCALAR(control);
+ SERIALIZE_SCALAR(fbrd);
+ SERIALIZE_SCALAR(ibrd);
+ SERIALIZE_SCALAR(lcrh);
+ SERIALIZE_SCALAR(ifls);
+
+ uint16_t imsc_serial = imsc;
+ SERIALIZE_SCALAR(imsc_serial);
+
+ uint16_t rawInt_serial = rawInt;
+ SERIALIZE_SCALAR(rawInt_serial);
+
+ uint16_t maskInt_serial = maskInt;
+ SERIALIZE_SCALAR(maskInt_serial);
+
+ SERIALIZE_SCALAR(endOnEOT);
+ SERIALIZE_SCALAR(intDelay);
}
void
Pl011::unserialize(Checkpoint *cp, const std::string &section)
{
- panic("Need to implement serialization\n");
+ DPRINTF(Checkpoint, "Unserializing Arm PL011\n");
+
+ UNSERIALIZE_SCALAR(control);
+ UNSERIALIZE_SCALAR(fbrd);
+ UNSERIALIZE_SCALAR(ibrd);
+ UNSERIALIZE_SCALAR(lcrh);
+ UNSERIALIZE_SCALAR(ifls);
+
+ uint16_t imsc_serial;
+ UNSERIALIZE_SCALAR(imsc_serial);
+ imsc = imsc_serial;
+
+ uint16_t rawInt_serial;
+ UNSERIALIZE_SCALAR(rawInt_serial);
+ rawInt = rawInt_serial;
+
+ uint16_t maskInt_serial;
+ UNSERIALIZE_SCALAR(maskInt_serial);
+ maskInt = maskInt_serial;
+
+ UNSERIALIZE_SCALAR(endOnEOT);
+ UNSERIALIZE_SCALAR(intDelay);
}
Pl011 *