pirq table consistency

Stefan Reinauer stepan at suse.de
Tue Oct 28 10:56:01 CET 2003


Hi,

If Linux detects an inconsistent pirq table, it will refuse to use it.
The attached patch fixes the pirq table in case LinuxBIOS finds a
problem. 

Since there was kind of a common sense that pirq tables et al should be
generated by LinuxBIOS instead of coping with hard codes, this might be
a first but very small step.

If I get no objections, I'd like to check it into the freebios2 cvs
soon.

  Stefan


-- 
     Stefan Reinauer, SUSE LINUX AG
Teamleader Architecture Development
-------------- next part --------------
Index: src/arch/i386/boot/pirq_routing.c
===================================================================
RCS file: /cvsroot/freebios/freebios2/src/arch/i386/boot/pirq_routing.c,v
retrieving revision 1.4
diff -u -r1.4 pirq_routing.c
--- src/arch/i386/boot/pirq_routing.c	30 Jul 2003 03:05:19 -0000	1.4
+++ src/arch/i386/boot/pirq_routing.c	28 Oct 2003 15:56:48 -0000
@@ -14,7 +14,11 @@
 
 #if defined(IRQ_SLOT_COUNT)
 	if (sizeof(intel_irq_routing_table) != intel_irq_routing_table.size) {
-		printk_warning("Inconsistent IRQ routing table size\n");
+		printk_warning("Inconsistent IRQ routing table size (0x%x/0x%x)\n",
+				sizeof(intel_irq_routing_table),
+				intel_irq_routing_table.size
+				);
+		intel_irq_routing_table.size=sizeof(intel_irq_routing_table);
 	}
 #endif
 
@@ -35,6 +39,7 @@
 		printk_warning("%s:%6d:%s() - "
 		       "checksum is: 0x%02x but should be: 0x%02x\n",
 		       __FILE__, __LINE__, __FUNCTION__, rt->checksum, sum);
+		rt->checksum = sum;
 	}
 
 	if (rt->signature != PIRQ_SIGNATURE || rt->version != PIRQ_VERSION ||


More information about the coreboot mailing list