From 4a8523a788fb1c80a2f65a5d65fa36db85398397 Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich rminnich" Date: Tue, 7 Apr 2009 02:18:13 +0000 Subject: [PATCH] This is a bit of an emergency fix for qemu. Ethernet routing has not been working. Given all the limitations of PIRQ routing we keep it simple and just set the IRQ directly. Most BIOSes are doing setup this way anyways, since there are so many errors in PIRQ tables. Signed-off-by: Ronald G. Minnich git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4080 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/mainboard/emulation/qemu-x86/mainboard.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/mainboard/emulation/qemu-x86/mainboard.c b/src/mainboard/emulation/qemu-x86/mainboard.c index 7e3273a43e..5ee62e9df7 100644 --- a/src/mainboard/emulation/qemu-x86/mainboard.c +++ b/src/mainboard/emulation/qemu-x86/mainboard.c @@ -7,7 +7,10 @@ #include #include "chip.h" -static void vga_init(device_t dev) +/* not sure how these are routed in qemu */ +static const unsigned char enetIrqs[4] = { 11, 0, 0, 0 }; + +static void qemu_init(device_t dev) { /* The VGA OPROM already lives at 0xc0000, * force coreboot to use it. @@ -22,13 +25,19 @@ static void vga_init(device_t dev) * emulate a SuperIO chip */ init_pc_keyboard(0x60, 0x64, 0); + + /* The PIRQ table is not working well for interrupt routing purposes. + * so we'll just set the IRQ directly. + */ + printk_info("setting ethernet\n"); + pci_assign_irqs(0, 3, enetIrqs); } static struct device_operations vga_operations = { .read_resources = pci_dev_read_resources, .set_resources = pci_dev_set_resources, .enable_resources = pci_dev_enable_resources, - .init = vga_init, + .init = qemu_init, .ops_pci = 0, };