Signed-off-by: Marc Bertens <[email protected]>

Hi all,

Here is the patch just for the pirq_routing() function. Its made
specific to the CONFIG_NORTHBRIDGE_INTEL_440BX if that is to generic 
please replace by CONFIG_BOARD_NOKIA_IP530. 

Put the following extras in the file; 
- added header accordingly "Common License Header" that was missing.
- corrected a printk() warning of the compiler.
- added the correction for the i440BX by AND the link value with 0x5F
 so that always the value is kept below 0x5F. That AND value should be
 0x03 i think because the link value cannot be greater than 3. But i'm
 not sure about that, thats why i used the current solution.

The other patches will follow to day.

Marc 



On Wed, 2010-05-26 at 15:14 -0600, Myles Watson wrote:
> On Wed, May 26, 2010 at 2:15 PM, mbertens <[email protected]> wrote:
> > On Wed, 2010-05-26 at 11:00 -0600, Myles Watson wrote:
> >> +                     // fix made by Marc Bertens <[email protected]>
> >> +                     if (link > 0x5f) {
> >> +                             // This is basically for the 440BX
> >> +                             link -= 0x5f;
> >> +                     }
> >>
> >> I'd prefer this to be guarded by
> >> #if CONFIG_NORTHBRIDGE_INTEL_440BX (or whatever the correct one is)
> > I was thinking of it to put it that way, but i'd. But i will make the
> > changes to the code.
> >>

Index: src/arch/i386/boot/pirq_routing.c
===================================================================
--- src/arch/i386/boot/pirq_routing.c	(revision 5593)
+++ src/arch/i386/boot/pirq_routing.c	(working copy)
@@ -1,3 +1,23 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2000-2010 Coreboot project
+ * Copyright (C) 2010 Marc Bertens <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
 #include <console/console.h>
 #include <arch/pirq_routing.h>
 #include <string.h>
@@ -64,7 +84,13 @@

 	rt_curr = (uint8_t*)addr;
 	rt_orig = (uint8_t*)&intel_irq_routing_table;
-	printk(BIOS_INFO, "Verifing copy of Interrupt Routing Table at 0x%08x... ", addr);
+	/**
+	 * fix made by Marc Bertens <[email protected]>
+	 *
+	 * The compiler was putting out a warning that the 'addr' value
+	 * was of the unsigned int long type but the printk() was using '%08x'
+	 */
+	printk(BIOS_INFO, "Verifing copy of Interrupt Routing Table at 0x%08lx... ", addr);
 	for (i = 0; i < intel_irq_routing_table.size; i++) {
 		if (*(rt_curr + i) != *(rt_orig + i)) {
 			printk(BIOS_INFO, "failed\n");
@@ -121,7 +147,24 @@

 			printk(BIOS_DEBUG, "INT: %c link: %x bitmap: %x  ",
 				'A' + j, link, bitmap);
-
+#if CONFIG_NORTHBRIDGE_INTEL_I440BX == 1
+			/**
+			  * fix made by Marc Bertens <[email protected]>
+			  *
+			  * this was done for the Northbridge i440BX, due to the fact
+			  * that the values in the PIRQ table needs to be 60, 61, 62
+			  * and 63. This was passed to me by Idwer Vollering <[email protected]>
+			  * and Peter Stuge <[email protected]> helped with this
+			  * fix, so that the IRQ routing is done.
+			  */
+			if (link > 0x5f) {
+				/**
+				 * as if the maximum value can be 0x5F we should
+				 * AND it instead of substracting, my opinion.
+				 */
+				link &= 0x5F;
+			}
+#endif
 			if (!bitmap|| !link || link > 4) {

 				printk(BIOS_DEBUG, "not routed\n");
-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to