summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-05-29 14:59:36 +0200
committerPatrick Georgi <patrick@georgi-clan.de>2013-06-05 12:49:00 +0200
commit082d2a0ab7a1feabaa4486c19bb981444e402a70 (patch)
tree94f85823cdd58fc8d9fcc95375d10878e611948d /src
parentfd39ddd63528514ddc62a03bee7bafc8bd98e6d7 (diff)
qemu: fix IRQ routing setup
Do the setup for all PCI slots, not only the third. Also remove the bogus message, as slot 3 may carry any device, not only NICs. This makes IRQ setup simliar to SeaBIOS. SeaBIOS assignments (with patch for logging added, and a bunch of pci devices for testing purposes): PCI IRQ [piix]: bdf=00:01.3 pin=1 line=10 PCI IRQ [piix]: bdf=00:03.0 pin=1 line=11 PCI IRQ [piix]: bdf=00:04.0 pin=1 line=11 PCI IRQ [piix]: bdf=00:05.0 pin=1 line=10 PCI IRQ [piix]: bdf=00:06.0 pin=1 line=10 PCI IRQ [piix]: bdf=00:1d.0 pin=1 line=10 PCI IRQ [piix]: bdf=00:1d.1 pin=2 line=10 PCI IRQ [piix]: bdf=00:1d.2 pin=3 line=11 PCI IRQ [piix]: bdf=00:1d.7 pin=4 line=11 Coreboot assignments without this patch: Assigning IRQ 11 to 0:3.0 Coreboot assignments with this patch: Assigning IRQ 10 to 0:1.3 Assigning IRQ 11 to 0:3.0 Assigning IRQ 11 to 0:4.0 Assigning IRQ 10 to 0:5.0 Assigning IRQ 10 to 0:6.0 Assigning IRQ 10 to 0:1d.0 Assigning IRQ 10 to 0:1d.1 Assigning IRQ 11 to 0:1d.2 Assigning IRQ 11 to 0:1d.7 Change-Id: Ie96be39185f2f1cbde3c9fc50e29faff59c28493 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-on: http://review.coreboot.org/3334 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/emulation/qemu-x86/mainboard.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mainboard/emulation/qemu-x86/mainboard.c b/src/mainboard/emulation/qemu-x86/mainboard.c
index ae92654e7b..f651b99094 100644
--- a/src/mainboard/emulation/qemu-x86/mainboard.c
+++ b/src/mainboard/emulation/qemu-x86/mainboard.c
@@ -18,7 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
@@ -26,8 +25,10 @@
#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[] = {
+ 11, 10, 10, 11,
+ 11, 10, 10, 11,
+};
static void qemu_nb_init(device_t dev)
{
@@ -44,11 +45,9 @@ 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 + (i % 4));
}
static struct device_operations nb_operations = {