diff options
Diffstat (limited to 'dev')
-rw-r--r-- | dev/ide_disk.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/dev/ide_disk.cc b/dev/ide_disk.cc index 0d553fb83..3d7bd19c0 100644 --- a/dev/ide_disk.cc +++ b/dev/ide_disk.cc @@ -135,7 +135,6 @@ IdeDisk::reset(int id) memset(&curPrd.entry, 0, sizeof(PrdEntry_t)); cmdReg.error = 1; - dmaInterfaceBytes = 0; curPrdAddr = 0; curSector = 0; @@ -211,7 +210,7 @@ IdeDisk::bytesInDmaPage(Addr curAddr, uint32_t bytesLeft) uint16_t IdeDisk::read(const Addr &offset, RegType_t type) { - uint16_t data = 0; + uint16_t data; DevAction_t action = ACT_NONE; if (type == COMMAND_BLOCK) { @@ -256,6 +255,9 @@ IdeDisk::read(const Addr &offset, RegType_t type) data = status; } + else { + panic("Invalid IDE register type: %#x\n", type); + } if (action != ACT_NONE) updateState(action); @@ -787,7 +789,7 @@ IdeDisk::intrPost() intrPending = true; // talk to controller to set interrupt - if (ctrl){ + if (ctrl) { ctrl->bmi_regs[BMIS0] |= IDEINTS; ctrl->intrPost(); } |