summaryrefslogtreecommitdiff
path: root/src/dev/ide_ctrl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/dev/ide_ctrl.cc')
-rw-r--r--src/dev/ide_ctrl.cc62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/dev/ide_ctrl.cc b/src/dev/ide_ctrl.cc
index d931fab2b..3e6086265 100644
--- a/src/dev/ide_ctrl.cc
+++ b/src/dev/ide_ctrl.cc
@@ -555,14 +555,14 @@ IdeController::write(PacketPtr pkt)
}
void
-IdeController::serialize(std::ostream &os)
+IdeController::serialize(CheckpointOut &cp) const
{
// Serialize the PciDevice base class
- PciDevice::serialize(os);
+ PciDevice::serialize(cp);
// Serialize channels
- primary.serialize("primary", os);
- secondary.serialize("secondary", os);
+ primary.serialize("primary", cp);
+ secondary.serialize("secondary", cp);
// Serialize config registers
SERIALIZE_SCALAR(primaryTiming);
@@ -580,31 +580,32 @@ IdeController::serialize(std::ostream &os)
}
void
-IdeController::Channel::serialize(const std::string &base, std::ostream &os)
+IdeController::Channel::serialize(const std::string &base,
+ CheckpointOut &cp) const
{
- paramOut(os, base + ".cmdAddr", cmdAddr);
- paramOut(os, base + ".cmdSize", cmdSize);
- paramOut(os, base + ".ctrlAddr", ctrlAddr);
- paramOut(os, base + ".ctrlSize", ctrlSize);
+ paramOut(cp, base + ".cmdAddr", cmdAddr);
+ paramOut(cp, base + ".cmdSize", cmdSize);
+ paramOut(cp, base + ".ctrlAddr", ctrlAddr);
+ paramOut(cp, base + ".ctrlSize", ctrlSize);
uint8_t command = bmiRegs.command;
- paramOut(os, base + ".bmiRegs.command", command);
- paramOut(os, base + ".bmiRegs.reserved0", bmiRegs.reserved0);
+ paramOut(cp, base + ".bmiRegs.command", command);
+ paramOut(cp, base + ".bmiRegs.reserved0", bmiRegs.reserved0);
uint8_t status = bmiRegs.status;
- paramOut(os, base + ".bmiRegs.status", status);
- paramOut(os, base + ".bmiRegs.reserved1", bmiRegs.reserved1);
- paramOut(os, base + ".bmiRegs.bmidtp", bmiRegs.bmidtp);
- paramOut(os, base + ".selectBit", selectBit);
+ paramOut(cp, base + ".bmiRegs.status", status);
+ paramOut(cp, base + ".bmiRegs.reserved1", bmiRegs.reserved1);
+ paramOut(cp, base + ".bmiRegs.bmidtp", bmiRegs.bmidtp);
+ paramOut(cp, base + ".selectBit", selectBit);
}
void
-IdeController::unserialize(Checkpoint *cp, const std::string &section)
+IdeController::unserialize(CheckpointIn &cp)
{
// Unserialize the PciDevice base class
- PciDevice::unserialize(cp, section);
+ PciDevice::unserialize(cp);
// Unserialize channels
- primary.unserialize("primary", cp, section);
- secondary.unserialize("secondary", cp, section);
+ primary.unserialize("primary", cp);
+ secondary.unserialize("secondary", cp);
// Unserialize config registers
UNSERIALIZE_SCALAR(primaryTiming);
@@ -622,23 +623,22 @@ IdeController::unserialize(Checkpoint *cp, const std::string &section)
}
void
-IdeController::Channel::unserialize(const std::string &base, Checkpoint *cp,
- const std::string &section)
+IdeController::Channel::unserialize(const std::string &base, CheckpointIn &cp)
{
- paramIn(cp, section, base + ".cmdAddr", cmdAddr);
- paramIn(cp, section, base + ".cmdSize", cmdSize);
- paramIn(cp, section, base + ".ctrlAddr", ctrlAddr);
- paramIn(cp, section, base + ".ctrlSize", ctrlSize);
+ paramIn(cp, base + ".cmdAddr", cmdAddr);
+ paramIn(cp, base + ".cmdSize", cmdSize);
+ paramIn(cp, base + ".ctrlAddr", ctrlAddr);
+ paramIn(cp, base + ".ctrlSize", ctrlSize);
uint8_t command;
- paramIn(cp, section, base +".bmiRegs.command", command);
+ paramIn(cp, base +".bmiRegs.command", command);
bmiRegs.command = command;
- paramIn(cp, section, base + ".bmiRegs.reserved0", bmiRegs.reserved0);
+ paramIn(cp, base + ".bmiRegs.reserved0", bmiRegs.reserved0);
uint8_t status;
- paramIn(cp, section, base + ".bmiRegs.status", status);
+ paramIn(cp, base + ".bmiRegs.status", status);
bmiRegs.status = status;
- paramIn(cp, section, base + ".bmiRegs.reserved1", bmiRegs.reserved1);
- paramIn(cp, section, base + ".bmiRegs.bmidtp", bmiRegs.bmidtp);
- paramIn(cp, section, base + ".selectBit", selectBit);
+ paramIn(cp, base + ".bmiRegs.reserved1", bmiRegs.reserved1);
+ paramIn(cp, base + ".bmiRegs.bmidtp", bmiRegs.bmidtp);
+ paramIn(cp, base + ".selectBit", selectBit);
select(selectBit);
}