summaryrefslogtreecommitdiff
path: root/src/dev/arm/gic.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/gic.cc
parent432fa0aad6092d6a9252f6a9c83c8b36509c1341 (diff)
downloadgem5-a1e82259759ce7290269aeca6742098f1adbf2fd.tar.xz
ARM: Add checkpointing support
Diffstat (limited to 'src/dev/arm/gic.cc')
-rw-r--r--src/dev/arm/gic.cc44
1 files changed, 42 insertions, 2 deletions
diff --git a/src/dev/arm/gic.cc b/src/dev/arm/gic.cc
index eff7d94bb..ee8008144 100644
--- a/src/dev/arm/gic.cc
+++ b/src/dev/arm/gic.cc
@@ -495,13 +495,53 @@ Gic::addressRanges(AddrRangeList &range_list)
void
Gic::serialize(std::ostream &os)
{
- panic("Need to implement serialization\n");
+ DPRINTF(Checkpoint, "Serializing Arm GIC\n");
+
+ SERIALIZE_SCALAR(distAddr);
+ SERIALIZE_SCALAR(cpuAddr);
+ SERIALIZE_SCALAR(distPioDelay);
+ SERIALIZE_SCALAR(cpuPioDelay);
+ SERIALIZE_SCALAR(enabled);
+ SERIALIZE_SCALAR(itLines);
+ SERIALIZE_SCALAR(itLinesLog2);
+ SERIALIZE_ARRAY(intEnabled, 32);
+ SERIALIZE_ARRAY(pendingInt, 32);
+ SERIALIZE_ARRAY(activeInt, 32);
+ SERIALIZE_ARRAY(iccrpr, 8);
+ SERIALIZE_ARRAY(intPriority, 1020);
+ SERIALIZE_ARRAY(cpuTarget, 1020);
+ SERIALIZE_ARRAY(intConfig, 64);
+ SERIALIZE_ARRAY(cpuEnabled, 8);
+ SERIALIZE_ARRAY(cpuPriority, 8);
+ SERIALIZE_ARRAY(cpuBpr, 8);
+ SERIALIZE_ARRAY(cpuHighestInt, 8);
+ SERIALIZE_SCALAR(irqEnable);
}
void
Gic::unserialize(Checkpoint *cp, const std::string &section)
{
- panic("Need to implement serialization\n");
+ DPRINTF(Checkpoint, "Unserializing Arm GIC\n");
+
+ UNSERIALIZE_SCALAR(distAddr);
+ UNSERIALIZE_SCALAR(cpuAddr);
+ UNSERIALIZE_SCALAR(distPioDelay);
+ UNSERIALIZE_SCALAR(cpuPioDelay);
+ UNSERIALIZE_SCALAR(enabled);
+ UNSERIALIZE_SCALAR(itLines);
+ UNSERIALIZE_SCALAR(itLinesLog2);
+ UNSERIALIZE_ARRAY(intEnabled, 32);
+ UNSERIALIZE_ARRAY(pendingInt, 32);
+ UNSERIALIZE_ARRAY(activeInt, 32);
+ UNSERIALIZE_ARRAY(iccrpr, 8);
+ UNSERIALIZE_ARRAY(intPriority, 1020);
+ UNSERIALIZE_ARRAY(cpuTarget, 1020);
+ UNSERIALIZE_ARRAY(intConfig, 64);
+ UNSERIALIZE_ARRAY(cpuEnabled, 8);
+ UNSERIALIZE_ARRAY(cpuPriority, 8);
+ UNSERIALIZE_ARRAY(cpuBpr, 8);
+ UNSERIALIZE_ARRAY(cpuHighestInt, 8);
+ UNSERIALIZE_SCALAR(irqEnable);
}
Gic *