summaryrefslogtreecommitdiff
path: root/src/arch/x86/interrupts.cc
diff options
context:
space:
mode:
authorJoel Hestness <hestness@cs.utexas.edu>2011-02-06 22:14:17 -0800
committerJoel Hestness <hestness@cs.utexas.edu>2011-02-06 22:14:17 -0800
commit911ccef6c05fff4832245414baa7b2a67955c35a (patch)
tree77da5042ec5220811edbf7d429731053d58a6c0e /src/arch/x86/interrupts.cc
parent38140b5519d7fb925e7a5c53be72399243112c80 (diff)
downloadgem5-911ccef6c05fff4832245414baa7b2a67955c35a.tar.xz
x86: Add checkpointing capability to arch components
Add checkpointing capability to the x86 interrupt device and the TLBs
Diffstat (limited to 'src/arch/x86/interrupts.cc')
-rw-r--r--src/arch/x86/interrupts.cc59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/arch/x86/interrupts.cc b/src/arch/x86/interrupts.cc
index 61800e1ea..9b2d42a16 100644
--- a/src/arch/x86/interrupts.cc
+++ b/src/arch/x86/interrupts.cc
@@ -706,6 +706,65 @@ X86ISA::Interrupts::updateIntrInfo(ThreadContext *tc)
}
}
+void
+X86ISA::Interrupts::serialize(std::ostream &os)
+{
+ SERIALIZE_ARRAY(regs, NUM_APIC_REGS);
+ SERIALIZE_SCALAR(clock);
+ SERIALIZE_SCALAR(pendingSmi);
+ SERIALIZE_SCALAR(smiVector);
+ SERIALIZE_SCALAR(pendingNmi);
+ SERIALIZE_SCALAR(nmiVector);
+ SERIALIZE_SCALAR(pendingExtInt);
+ SERIALIZE_SCALAR(extIntVector);
+ SERIALIZE_SCALAR(pendingInit);
+ SERIALIZE_SCALAR(initVector);
+ SERIALIZE_SCALAR(pendingStartup);
+ SERIALIZE_SCALAR(startupVector);
+ SERIALIZE_SCALAR(startedUp);
+ SERIALIZE_SCALAR(pendingUnmaskableInt);
+ SERIALIZE_SCALAR(pendingIPIs);
+ SERIALIZE_SCALAR(IRRV);
+ SERIALIZE_SCALAR(ISRV);
+ bool apicTimerEventScheduled = apicTimerEvent.scheduled();
+ SERIALIZE_SCALAR(apicTimerEventScheduled);
+ Tick apicTimerEventTick = apicTimerEvent.when();
+ SERIALIZE_SCALAR(apicTimerEventTick);
+}
+
+void
+X86ISA::Interrupts::unserialize(Checkpoint *cp, const std::string &section)
+{
+ UNSERIALIZE_ARRAY(regs, NUM_APIC_REGS);
+ UNSERIALIZE_SCALAR(clock);
+ UNSERIALIZE_SCALAR(pendingSmi);
+ UNSERIALIZE_SCALAR(smiVector);
+ UNSERIALIZE_SCALAR(pendingNmi);
+ UNSERIALIZE_SCALAR(nmiVector);
+ UNSERIALIZE_SCALAR(pendingExtInt);
+ UNSERIALIZE_SCALAR(extIntVector);
+ UNSERIALIZE_SCALAR(pendingInit);
+ UNSERIALIZE_SCALAR(initVector);
+ UNSERIALIZE_SCALAR(pendingStartup);
+ UNSERIALIZE_SCALAR(startupVector);
+ UNSERIALIZE_SCALAR(startedUp);
+ UNSERIALIZE_SCALAR(pendingUnmaskableInt);
+ UNSERIALIZE_SCALAR(pendingIPIs);
+ UNSERIALIZE_SCALAR(IRRV);
+ UNSERIALIZE_SCALAR(ISRV);
+ bool apicTimerEventScheduled;
+ UNSERIALIZE_SCALAR(apicTimerEventScheduled);
+ if (apicTimerEventScheduled) {
+ Tick apicTimerEventTick;
+ UNSERIALIZE_SCALAR(apicTimerEventTick);
+ if (apicTimerEvent.scheduled()) {
+ reschedule(apicTimerEvent, apicTimerEventTick, true);
+ } else {
+ schedule(apicTimerEvent, apicTimerEventTick);
+ }
+ }
+}
+
X86ISA::Interrupts *
X86LocalApicParams::create()
{