[coreboot-gerrit] New patch to review for coreboot: b27c38c qemu: fix IRQ routing setup

Gerd Hoffmann (kraxel@redhat.com) gerrit at coreboot.org
Wed May 29 17:08:43 CEST 2013


Gerd Hoffmann (kraxel at redhat.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3334

-gerrit

commit b27c38c53d5a2653caa85d81e5c2979620d5a64d
Author: Gerd Hoffmann <kraxel at redhat.com>
Date:   Wed May 29 14:59:36 2013 +0200

    qemu: fix IRQ routing setup
    
    Do it for all PCI slots, not only 3.  Also remove the bogous message,
    slot 3 may carry any device, not only NICs.
    
    Change-Id: Ie96be39185f2f1cbde3c9fc50e29faff59c28493
    Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
 src/mainboard/emulation/qemu-x86/mainboard.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/mainboard/emulation/qemu-x86/mainboard.c b/src/mainboard/emulation/qemu-x86/mainboard.c
index ae92654..4f86e16 100644
--- a/src/mainboard/emulation/qemu-x86/mainboard.c
+++ b/src/mainboard/emulation/qemu-x86/mainboard.c
@@ -26,8 +26,7 @@
 #include <pc80/keyboard.h>
 #include <arch/io.h>
 
-/* not sure how these are routed in qemu */
-static const unsigned char enetIrqs[4] = { 11, 0, 0, 0 };
+static const unsigned char qemu_i440fx_irqs[4] = { 10, 10, 11, 11 };
 
 static void qemu_nb_init(device_t dev)
 {
@@ -44,11 +43,10 @@ static void qemu_nb_init(device_t dev)
 	 */
 	pc_keyboard_init(0);
 
-	/* The PIRQ table is not working well for interrupt routing purposes.
-	 * so we'll just set the IRQ directly.
-	 */
-	printk(BIOS_INFO, "Setting up ethernet...\n");
-	pci_assign_irqs(0, 3, enetIrqs);
+	/* setup IRQ routing */
+	for (i = 0; i < 32; i++) {
+	    pci_assign_irqs(0, i, qemu_i440fx_irqs);
+	}
 }
 
 static struct device_operations nb_operations = {



More information about the coreboot-gerrit mailing list