diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-10-26 10:29:24 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-10-26 10:29:24 -0500 |
commit | e86d9b12b52a2e1cf9e18d55f471fa085911b166 (patch) | |
tree | c1cdec953a4ce7e7c5ce5490f8220fac943db385 /hw/fdc.c | |
parent | 0ec024f63696edb42c9841e756811ba31fd18ab8 (diff) | |
parent | 6db39ae2e250f15da17462444ea18a9fcef41e05 (diff) |
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Diffstat (limited to 'hw/fdc.c')
-rw-r--r-- | hw/fdc.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -434,6 +434,7 @@ static uint32_t fdctrl_read (void *opaque, uint32_t reg) FDCtrl *fdctrl = opaque; uint32_t retval; + reg &= 7; switch (reg) { case FD_REG_SRA: retval = fdctrl_read_statusA(fdctrl); @@ -471,6 +472,7 @@ static void fdctrl_write (void *opaque, uint32_t reg, uint32_t value) FLOPPY_DPRINTF("write reg%d: 0x%02x\n", reg & 7, value); + reg &= 7; switch (reg) { case FD_REG_DOR: fdctrl_write_dor(fdctrl, value); @@ -1945,6 +1947,18 @@ static int sun4m_fdc_init1(SysBusDevice *dev) return fdctrl_init_common(fdctrl); } +void fdc_get_bs(BlockDriverState *bs[], ISADevice *dev) +{ + FDCtrlISABus *isa = DO_UPCAST(FDCtrlISABus, busdev, dev); + FDCtrl *fdctrl = &isa->state; + int i; + + for (i = 0; i < MAX_FD; i++) { + bs[i] = fdctrl->drives[i].bs; + } +} + + static const VMStateDescription vmstate_isa_fdc ={ .name = "fdc", .version_id = 2, |