qemu-e2k/hw/ide
John Snow be8c9423de ide: model HOB correctly
I have been staring at this FIXME for years and I never knew what it
meant. I finally stumbled across it!

When writing to the command registers, the old value is shifted into a
HOB copy of the register and the new value is written into the primary
register. When reading registers, the value retrieved is dependent on
the HOB bit in the CONTROL register.

By setting bit 7 (0x80) in CONTROL, any register read will, if it has
one, yield the HOB value for that register instead.

Our code has a problem: We were using bit 7 of the DEVICE register to
model this. We use bus->cmd roughly as the control register already, as
it stores the value from ide_ctrl_write.

Lastly, all command register writes reset the HOB, so fix that, too.

Signed-off-by: John Snow <jsnow@redhat.com>
2020-10-01 13:04:16 -04:00
..
ahci_internal.h ahci: Move QOM macros to header 2020-08-27 14:04:54 -04:00
ahci-allwinner.c ahci: Move QOM macro to header 2020-08-27 14:04:54 -04:00
ahci.c hw/ide/ahci: Do not dma_memory_unmap(NULL) 2020-10-01 13:04:16 -04:00
atapi.c hw/ide/atapi: Replace magic '512' value by BDRV_SECTOR_SIZE 2020-09-01 11:27:26 +02:00
cmd646.c cmd646-ide: use qdev gpio rather than qemu_allocate_irqs() 2020-03-27 14:30:08 -04:00
core.c ide: model HOB correctly 2020-10-01 13:04:16 -04:00
ich.c ahci: Rename ICH_AHCI to ICH9_AHCI 2020-09-09 13:20:22 -04:00
ioport.c ide: rename cmd_write to ctrl_write 2020-10-01 13:04:16 -04:00
isa.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
Kconfig
macio.c ide: rename cmd_write to ctrl_write 2020-10-01 13:04:16 -04:00
meson.build meson: convert hw/ide 2020-08-21 06:30:30 -04:00
microdrive.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
mmio.c ide: rename cmd_write to ctrl_write 2020-10-01 13:04:16 -04:00
pci.c ide: rename cmd_write to ctrl_write 2020-10-01 13:04:16 -04:00
piix.c hw: Remove unnecessary DEVICE() cast 2020-05-15 07:08:52 +02:00
qdev.c qom: Put name parameter before value / visitor parameter 2020-07-10 15:18:08 +02:00
sii3112.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
trace-events ide: rename cmd_write to ctrl_write 2020-10-01 13:04:16 -04:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
via.c