[coreboot] [v2] r4080 - trunk/coreboot-v2/src/mainboard/emulation/qemu-x86

svn at coreboot.org svn at coreboot.org
Tue Apr 7 04:18:13 CEST 2009


Author: rminnich
Date: 2009-04-07 04:18:13 +0200 (Tue, 07 Apr 2009)
New Revision: 4080

Modified:
   trunk/coreboot-v2/src/mainboard/emulation/qemu-x86/mainboard.c
Log:
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 at gmail.com
Acked-by: Ronald G. Minnich <rminnich at gmail.com>



Modified: trunk/coreboot-v2/src/mainboard/emulation/qemu-x86/mainboard.c
===================================================================
--- trunk/coreboot-v2/src/mainboard/emulation/qemu-x86/mainboard.c	2009-04-06 23:28:22 UTC (rev 4079)
+++ trunk/coreboot-v2/src/mainboard/emulation/qemu-x86/mainboard.c	2009-04-07 02:18:13 UTC (rev 4080)
@@ -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 @@
 	 * 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,
 };
 





More information about the coreboot mailing list