summaryrefslogtreecommitdiff
path: root/src/dev/intel_8254_timer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/dev/intel_8254_timer.cc')
-rw-r--r--src/dev/intel_8254_timer.cc58
1 files changed, 28 insertions, 30 deletions
diff --git a/src/dev/intel_8254_timer.cc b/src/dev/intel_8254_timer.cc
index 63bb6e8af..75600fb72 100644
--- a/src/dev/intel_8254_timer.cc
+++ b/src/dev/intel_8254_timer.cc
@@ -71,22 +71,21 @@ Intel8254Timer::writeControl(const CtrlReg data)
}
void
-Intel8254Timer::serialize(const string &base, ostream &os)
+Intel8254Timer::serialize(const string &base, CheckpointOut &cp) const
{
// serialize the counters
- counter[0]->serialize(base + ".counter0", os);
- counter[1]->serialize(base + ".counter1", os);
- counter[2]->serialize(base + ".counter2", os);
+ counter[0]->serialize(base + ".counter0", cp);
+ counter[1]->serialize(base + ".counter1", cp);
+ counter[2]->serialize(base + ".counter2", cp);
}
void
-Intel8254Timer::unserialize(const string &base, Checkpoint *cp,
- const string &section)
+Intel8254Timer::unserialize(const string &base, CheckpointIn &cp)
{
// unserialze the counters
- counter[0]->unserialize(base + ".counter0", cp, section);
- counter[1]->unserialize(base + ".counter1", cp, section);
- counter[2]->unserialize(base + ".counter2", cp, section);
+ counter[0]->unserialize(base + ".counter0", cp);
+ counter[1]->unserialize(base + ".counter1", cp);
+ counter[2]->unserialize(base + ".counter2", cp);
}
void
@@ -229,39 +228,38 @@ Intel8254Timer::Counter::outputHigh()
}
void
-Intel8254Timer::Counter::serialize(const string &base, ostream &os)
+Intel8254Timer::Counter::serialize(const string &base, CheckpointOut &cp) const
{
- paramOut(os, base + ".initial_count", initial_count);
- paramOut(os, base + ".latched_count", latched_count);
- paramOut(os, base + ".period", period);
- paramOut(os, base + ".mode", mode);
- paramOut(os, base + ".output_high", output_high);
- paramOut(os, base + ".latch_on", latch_on);
- paramOut(os, base + ".read_byte", read_byte);
- paramOut(os, base + ".write_byte", write_byte);
+ paramOut(cp, base + ".initial_count", initial_count);
+ paramOut(cp, base + ".latched_count", latched_count);
+ paramOut(cp, base + ".period", period);
+ paramOut(cp, base + ".mode", mode);
+ paramOut(cp, base + ".output_high", output_high);
+ paramOut(cp, base + ".latch_on", latch_on);
+ paramOut(cp, base + ".read_byte", read_byte);
+ paramOut(cp, base + ".write_byte", write_byte);
Tick event_tick_offset = 0;
if (event.scheduled())
event_tick_offset = event.when() - curTick();
- paramOut(os, base + ".event_tick_offset", event_tick_offset);
+ paramOut(cp, base + ".event_tick_offset", event_tick_offset);
}
void
-Intel8254Timer::Counter::unserialize(const string &base, Checkpoint *cp,
- const string &section)
+Intel8254Timer::Counter::unserialize(const string &base, CheckpointIn &cp)
{
- paramIn(cp, section, base + ".initial_count", initial_count);
- paramIn(cp, section, base + ".latched_count", latched_count);
- paramIn(cp, section, base + ".period", period);
- paramIn(cp, section, base + ".mode", mode);
- paramIn(cp, section, base + ".output_high", output_high);
- paramIn(cp, section, base + ".latch_on", latch_on);
- paramIn(cp, section, base + ".read_byte", read_byte);
- paramIn(cp, section, base + ".write_byte", write_byte);
+ paramIn(cp, base + ".initial_count", initial_count);
+ paramIn(cp, base + ".latched_count", latched_count);
+ paramIn(cp, base + ".period", period);
+ paramIn(cp, base + ".mode", mode);
+ paramIn(cp, base + ".output_high", output_high);
+ paramIn(cp, base + ".latch_on", latch_on);
+ paramIn(cp, base + ".read_byte", read_byte);
+ paramIn(cp, base + ".write_byte", write_byte);
Tick event_tick_offset = 0;
assert(!event.scheduled());
- paramIn(cp, section, base + ".event_tick_offset", event_tick_offset);
+ paramIn(cp, base + ".event_tick_offset", event_tick_offset);
offset = event_tick_offset;
}