diff options
author | Richard Strong <r.d.strong@gmail.com> | 2008-12-09 10:34:08 -0800 |
---|---|---|
committer | Richard Strong <r.d.strong@gmail.com> | 2008-12-09 10:34:08 -0800 |
commit | dae531c0494bc6142ae3febc3623a4514a727614 (patch) | |
tree | 82b1b52d5081313a059928b8d7106e2cd1daf9c2 /src | |
parent | d0c0c25ebc082576d29257c51e4aee96b378f0c6 (diff) | |
download | gem5-dae531c0494bc6142ae3febc3623a4514a727614.tar.xz |
IDE: Fix serialization for the IDE controller.
Diffstat (limited to 'src')
-rw-r--r-- | src/dev/ide_ctrl.cc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/dev/ide_ctrl.cc b/src/dev/ide_ctrl.cc index ced7686c7..454bafac1 100644 --- a/src/dev/ide_ctrl.cc +++ b/src/dev/ide_ctrl.cc @@ -524,9 +524,11 @@ IdeController::Channel::serialize(std::ostream &os) SERIALIZE_SCALAR(cmdSize); SERIALIZE_SCALAR(ctrlAddr); SERIALIZE_SCALAR(ctrlSize); - SERIALIZE_SCALAR((uint8_t)bmiRegs.command); + uint8_t command = bmiRegs.command; + SERIALIZE_SCALAR(command); SERIALIZE_SCALAR(bmiRegs.reserved0); - SERIALIZE_SCALAR((uint8_t)bmiRegs.status); + uint8_t status = bmiRegs.status; + SERIALIZE_SCALAR(status); SERIALIZE_SCALAR(bmiRegs.reserved1); SERIALIZE_SCALAR(bmiRegs.bmidtp); SERIALIZE_SCALAR(selectBit); @@ -559,16 +561,17 @@ void IdeController::Channel::unserialize( Checkpoint *cp, const std::string §ion) { - uint8_t temp; UNSERIALIZE_SCALAR(cmdAddr); UNSERIALIZE_SCALAR(cmdSize); UNSERIALIZE_SCALAR(ctrlAddr); UNSERIALIZE_SCALAR(ctrlSize); - UNSERIALIZE_SCALAR(temp); - bmiRegs.command = temp; + uint8_t command; + UNSERIALIZE_SCALAR(command); + bmiRegs.command = command; UNSERIALIZE_SCALAR(bmiRegs.reserved0); - UNSERIALIZE_SCALAR(temp); - bmiRegs.status = temp; + uint8_t status; + UNSERIALIZE_SCALAR(status); + bmiRegs.status = status; UNSERIALIZE_SCALAR(bmiRegs.reserved1); UNSERIALIZE_SCALAR(bmiRegs.bmidtp); UNSERIALIZE_SCALAR(selectBit); |