summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRonald G. Minnich rminnich <Ronald G. Minnich rminnich@gmail.com>2009-04-07 02:18:13 +0000
committerRonald G. Minnich <rminnich@gmail.com>2009-04-07 02:18:13 +0000
commit4a8523a788fb1c80a2f65a5d65fa36db85398397 (patch)
tree5cf85f0f0bb4d4e4b81db2fcfb4a30027b33efe7 /src
parentb3b7db777df142e98827c61b528c0daf3877488b (diff)
downloadcoreboot-4a8523a788fb1c80a2f65a5d65fa36db85398397.tar.xz
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 <rminnich@gmail.com Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4080 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/emulation/qemu-x86/mainboard.c13
1 files 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 <arch/io.h>
#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,
};