qemu-e2k/include/hw/ide
Mark Cave-Ayland fd6a543d19 ide/pci: introduce pci_ide_update_mode() function
This function reads the value of the PCI_CLASS_PROG register for PCI IDE
controllers and configures the PCI BARs and/or IDE ioports accordingly.

In the case where we switch to legacy mode, the PCI BARs are set to return zero
(as suggested in the "PCI IDE Controller" specification), the legacy IDE ioports
are enabled, and the PCI interrupt pin cleared to indicate legacy IRQ routing.

Conversely when we switch to native mode, the legacy IDE ioports are disabled
and the PCI interrupt pin set to indicate native IRQ routing. The contents of
the PCI BARs are unspecified, but this is not an issue since if a PCI IDE
controller has been switched to native mode then its BARs will need to be
programmed.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-ID: <20231116103355.588580-3-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2023-11-21 12:45:21 +01:00
..
ahci.h nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
internal.h ide/ioport: move ide_portio_list[] and ide_portio_list2[] definitions to IDE core 2023-11-21 12:45:21 +01:00
isa.h hw/ide/isa: Extract TYPE_ISA_IDE declarations to 'hw/ide/isa.h' 2023-02-27 22:29:02 +01:00
mmio.h hw/ide/mmio: Extract TYPE_MMIO_IDE declarations to 'hw/ide/mmio.h' 2023-02-27 22:29:02 +01:00
pci.h ide/pci: introduce pci_ide_update_mode() function 2023-11-21 12:45:21 +01:00
piix.h hw/ide/piix: Introduce TYPE_ macros for PIIX IDE controllers 2022-10-31 11:32:07 +01:00