On Thu, 2009-04-23 at 00:51 +0200, Peter Stuge wrote:
> (No need to cc me. Thanks!)
> 
> Cristi Magherusan wrote:
> > > dmesg output
> > 
> > Hello,
> > 
> > Thanks, here you have the outputs you requested, and these are the
> > more interesting parts, IMHO. I'll try to change the v3 IRQ to 5
> > instead of 11, to see what happens next.
> 
> All right! Keep us posted.
> 
> 
> > dmesg in v3:
> > 
> > Apr 22 16:12:52 avatt user.warn kernel: PCI: No IRQ known for interrupt pin 
> > A of device 0000:00:03.0. Please try using pci=biosirq.
> 
> Yeah, this is bad.
> 
> 
> > Apr 22 16:12:52 avatt user.info kernel: pcnet32: PCnet/PCI II 79C970A at 
> > 0x1000, 52 54 00 12 34 56 assigned IRQ 0.
> 
> IRQ 0 will not work.
> 
> 
> In recent kernels it's possible to enable quite a lot of PCI and x86
> init debugging. If the next change doesn't work that may give more
> useful information.
> 

Hello,

The attached patch makes use of the(slightly adapted) irq routing
implementation from v2, and sets the irq to 5 instead of 11(as Ron did
before).
Now the card appears in /proc/interrupts (it wasn't with 11), the
interface raises, but ping and dhcp still fail.

Any ideas?

Cristi




-- 
Ing. Cristi Măgherușan, System/Network Engineer
Technical University of Cluj-Napoca, Romania
http://cc.utcluj.ro  +40264 401247
Index: mainboard/emulation/qemu-x86/defconfig
===================================================================
--- mainboard/emulation/qemu-x86/defconfig	(revision 1164)
+++ mainboard/emulation/qemu-x86/defconfig	(working copy)
@@ -33,6 +33,7 @@
 CONFIG_CPU_I586=y
 CONFIG_OPTION_TABLE=y
 # CONFIG_SMP is not set
+CONFIG_PIRQ_TABLE=y
 CONFIG_CARBASE=0x8f000
 CONFIG_CARSIZE=0x1000
 
Index: mainboard/emulation/qemu-x86/irq_tables.h
===================================================================
--- mainboard/emulation/qemu-x86/irq_tables.h	(revision 0)
+++ mainboard/emulation/qemu-x86/irq_tables.h	(revision 0)
@@ -0,0 +1,31 @@
+/* This file was generated by getpir.c, do not modify! 
+   (but if you do, please run checkpir on it to verify)
+ * Contains the IRQ Routing Table dumped directly from your memory, which BIOS sets up
+ *
+ * Documentation at : http://www.microsoft.com/hwdev/busbios/PCIIRQ.HTM
+*/
+
+#include <pirq_routing.h>
+
+const struct irq_routing_table intel_irq_routing_table = {
+	PIRQ_SIGNATURE,  /* u32 signature */
+	PIRQ_VERSION,    /* u16 version   */
+	32+16*6,	 /* there can be total 6 devices on the bus */
+	0x00,		 /* Where the interrupt router lies (bus) */
+	(0x01<<3)|0x0,   /* Where the interrupt router lies (dev) */
+	0,		 /* IRQs devoted exclusively to PCI usage */
+	0x8086,		 /* Vendor */
+	0x7000,		 /* Device */
+	0,		 /* Crap (miniport) */
+	{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* u8 rfu[11] */
+	0x7,         /*  u8 checksum , this hase to set to some value that would give 0 after the sum of all bytes for this structure (including checksum) */
+	{
+		/* bus,     dev|fn,   {link, bitmap}, {link, bitmap}, {link, bitmap}, {link, bitmap},  slot, rfu */
+		{0x00,(0x01<<3)|0x0, {{0x60, 0xdef8}, {0x61, 0xdef8}, {0x62, 0xdef8}, {0x63, 0x0def8}}, 0x0, 0x0},
+		{0x00,(0x02<<3)|0x0, {{0x61, 0xdef8}, {0x62, 0xdef8}, {0x63, 0xdef8}, {0x60, 0x0def8}}, 0x1, 0x0},
+		{0x00,(0x03<<3)|0x0, {{0x62, 0xdef8}, {0x63, 0xdef8}, {0x60, 0xdef8}, {0x61, 0x0def8}}, 0x2, 0x0},
+		{0x00,(0x04<<3)|0x0, {{0x63, 0xdef8}, {0x60, 0xdef8}, {0x61, 0xdef8}, {0x62, 0x0def8}}, 0x3, 0x0},
+		{0x00,(0x05<<3)|0x0, {{0x60, 0xdef8}, {0x61, 0xdef8}, {0x62, 0xdef8}, {0x63, 0x0def8}}, 0x4, 0x0},
+		{0x00,(0x06<<3)|0x0, {{0x61, 0xdef8}, {0x62, 0xdef8}, {0x63, 0xdef8}, {0x60, 0x0def8}}, 0x5, 0x0},
+	}
+};
Index: mainboard/emulation/qemu-x86/vga.c
===================================================================
--- 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);
 }

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to