aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2013-02-15 14:11:35 -0700
committerKevin O'Connor <kevin@koconnor.net>2013-02-18 13:51:11 -0500
commit555a21362c43e54469237c876a01cb3c43add118 (patch)
tree4013603fd43209ce55ac2f5307e9f302383dabf3
parent4cf2067f7cbf42be809e40e98a34cd00897667b0 (diff)
downloadseabios-555a21362c43e54469237c876a01cb3c43add118.tar.gz
seabios q35: Enable all PIRQn IRQs at startup
We seem to use the IRQEN bit of the PIRQn registers interchangeably to select APIC mode or to disable an IRQ. I can't decide if we're intending to disable the IRQ or select APIC mode here, but in either case it prevents PIC mode assigned devices from working. When seabios writes IRQEN to these registers, qemu interprets that as APIC mode, so while the boot ROM driver is waiting for an interrupt on ISA compatible IRQ 10 or 11, KVM is injecting interrupts to APIC pins 16 - 23. Devices on the root bus use PIRQE:H while the root ports use PIRQA:D. Enable them all so we don't limit where we support boot ROMs. The guest will later disable unused IRQs with the ACPI _DIS method. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
-rw-r--r--src/pciinit.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/pciinit.c b/src/pciinit.c
index d757ab6..306b125 100644
--- a/src/pciinit.c
+++ b/src/pciinit.c
@@ -142,11 +142,9 @@ void mch_isa_bridge_setup(struct pci_device *dev, void *arg)
/* activate irq remapping in LPC */
/* PIRQ[A-D] routing */
- pci_config_writeb(bdf, ICH9_LPC_PIRQA_ROUT + i,
- irq | ICH9_LPC_PIRQ_ROUT_IRQEN);
+ pci_config_writeb(bdf, ICH9_LPC_PIRQA_ROUT + i, irq);
/* PIRQ[E-H] routing */
- pci_config_writeb(bdf, ICH9_LPC_PIRQE_ROUT + i,
- irq | ICH9_LPC_PIRQ_ROUT_IRQEN);
+ pci_config_writeb(bdf, ICH9_LPC_PIRQE_ROUT + i, irq);
}
outb(elcr[0], ICH9_LPC_PORT_ELCR1);
outb(elcr[1], ICH9_LPC_PORT_ELCR2);