« Previous | Next » 

Revision 66a96d70

ID66a96d7018b9cbabb73c9b87b62a37e4cc46580a

Added by Peter Maydell about 11 years ago

versatile_pci: Implement the correct PCI IRQ mapping

Implement the correct IRQ mapping for the Versatile PCI controller; it
differs between realview and versatile boards, but the previous QEMU
implementation was correct only for the first PCI card on a versatile
board, since we weren't swizzling IRQs based on the slot number.

Since this change would otherwise break any uses of PCI on Linux kernels
which have an equivalent bug (since they have effectively only been
tested against QEMU, not real hardware), we implement a mechanism
for automatically detecting those broken kernels and switching back
to the old mapping. This works by looking at the values the kernel
writes to the PCI_INTERRUPT_LINE register in the config space, which
is effectively the interrupt number the kernel expects the device
to be using.

Signed-off-by: Peter Maydell <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences