[coreboot] qemu ethernet fix for v3 (port from v2)

Cristi Magherusan Cristi.Magherusan at net.utcluj.ro
Tue Apr 21 14:12:16 CEST 2009


Hello,

I tried to port Ron's fix to v3, and now it seems ifconfig eth0 up
works, the IP address can be manually set, but DHCP fails and ping to
qemu's default gateway fails causing kernel's watchdog timer to expire.

This is the proposed patch:

--- mainboard/emulation/qemu-x86/vga.c  (revision 1164)
+++ mainboard/emulation/qemu-x86/vga.c  (working copy)
@@ -35,6 +35,9 @@
 
        dev->rom_address = 0xc0000;
 
+       /* not sure how these are routed in qemu */
+       static const unsigned char enetIrqs[4] = { 11, 0, 0, 0 };
+
        /*
         * FIXME: This should be in the Super I/O code some day,
         * but since QEMU has no Super I/O...
@@ -42,6 +45,14 @@
         * bits there. 
         */
        init_pc_keyboard(0x60, 0x64, &conf);
+       
+       /* FIXME: This may be the wrong place, but still...
+        * The PIRQ table is not working well for interrupt routing purposes. 
+        * so we'll just set the IRQ directly. 
+        */
+       printk(BIOS_INFO, "Fixing ethernet device IRQ\n");
+       pci_assign_irqs(0, 3, enetIrqs);
+
        /* now run the rom */
        pci_dev_init(dev);
 }


-- 
Ing. Cristi Măgherușan, System/Network Engineer
Technical University of Cluj-Napoca, Romania
http://cc.utcluj.ro  +40264 401247
-------------- next part --------------
A non-text attachment was scrubbed...
Name: coreboot-v3_qemu_ethernet.patch
Type: text/x-patch
Size: 910 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20090421/043f945d/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20090421/043f945d/attachment.sig>


More information about the coreboot mailing list