ide: remove magic constants from the device register
commit0c7515e1c47372ae5d53f2e281b2ccd425ebbcc6
authorJohn Snow <jsnow@redhat.com>
Fri, 24 Jul 2020 05:22:58 +0000 (24 01:22 -0400)
committerJohn Snow <jsnow@redhat.com>
Thu, 1 Oct 2020 17:04:16 +0000 (1 13:04 -0400)
tree43880fdaf697d981f71910e5c1d9291e128a1caf
parent14ee9b53adc2f2e7f60f8ee0e906489785c8db13
ide: remove magic constants from the device register

(In QEMU, we call this the "select" register.)

My memory isn't good enough to memorize what these magic runes
do. Label them to prevent mixups from happening in the future.

Side note: I assume it's safe to always set 0xA0 even though ATA2 claims
these bits are reserved, because ATA3 immediately reinstated that these
bits should be always on. ATA4 and subsequent specs only claim that the
fields are obsolete, so I assume it's safe to leave these set and that
it should work with the widest array of guests.

Signed-off-by: John Snow <jsnow@redhat.com>
hw/ide/core.c
include/hw/ide/internal.h