=?gb2312?b?tPC4tA==?=: for all k8 builders

Eric W. Biederman ebiederman at lnxi.com
Mon Dec 8 16:51:01 CET 2003


YhLu <YhLu at tyan.com> writes:

> Eric, 
> 
> I mean in the amdk8_scan_chains, you need to put
> 
> 
> >                 config_busses &= 0x000fc88;
> >                 config_busses |=
> >                         (3 << 0) |  /* rw enable, no device compare */
> >                         (( nodeid & 7) << 4) |
> >                         (( link & 3 ) << 8) |
> >                         ((dev->link[link].secondary) << 16) |
> >                         ((dev->link[link].subordinate) << 24);
> >                 f1_write_config32(config_reg, config_busses);
> 
> before 
> 
>                /* Now we can scan all of the subordinate busses i.e. the
> > chain on the hypertranport link */
> >                 max = hypertransport_scan_chain(&dev->link[link], max);
> 

Right.  Sorry. That is what I thought I had done (and actually did in my
internal tree).  Somehow I modified the wrong line...

I have fixed that and committed it.  

This is the diff.  Let's see what idiot mistake I will make this time...

Index: northbridge.c
===================================================================
RCS file: /cvsroot/freebios/freebios2/src/northbridge/amd/amdk8/northbridge.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- northbridge.c	6 Dec 2003 00:11:56 -0000	1.9
+++ northbridge.c	8 Dec 2003 21:48:01 -0000	1.10
@@ -5,6 +5,7 @@
 #include <part/sizeram.h>
 #include <device/device.h>
 #include <device/pci.h>
+#include <device/pci_ids.h>
 #include <device/hypertransport.h>
 #include <device/chip.h>
 #include <stdlib.h>
@@ -233,8 +234,12 @@
 			((unsigned int)(dev->link[link].subordinate) << 16));
 		pci_write_config32(dev, dev->link[link].cap + 0x14, busses);
 
-		config_busses &= 0x0000ffff;
-		config_busses |= ((dev->link[link].secondary) << 16) |
+		config_busses &= 0x000fc88;
+		config_busses |= 
+			(3 << 0) |  /* rw enable, no device compare */
+			(( nodeid & 7) << 4) | 
+			(( link & 3 ) << 8) |  
+			((dev->link[link].secondary) << 16) |
 			((dev->link[link].subordinate) << 24);
 		f1_write_config32(config_reg, config_busses);
 
@@ -256,13 +261,7 @@
 			((unsigned int) (dev->link[link].subordinate) << 16);
 		pci_write_config32(dev, dev->link[link].cap + 0x14, busses);
 
-		config_busses &= 0x000fc88;
-		config_busses |= 
-			(3 << 0) |  /* rw enable, no device compare */
-			(( nodeid & 7) << 4) | 
-			(( link & 3 ) << 8) |  
-			((dev->link[link].secondary) << 16) |
-			((dev->link[link].subordinate) << 24);
+		config_busses = (config_busses & 0x00ffffff) | (dev->link[link].subordinate << 24);
 		f1_write_config32(config_reg, config_busses);
 #if 1
 		printk_debug("Hypertransport scan link done\n");
@@ -469,7 +468,7 @@
 unsigned int amdk8_scan_root_bus(device_t root, unsigned int max)
 {
 	unsigned reg;
-	/* Unmap all of HT chains */
+	/* Unmap all of the HT chains */
 	for(reg = 0xe0; reg <= 0xec; reg += 4) {
 		f1_write_config32(reg, 0);
 	}






More information about the coreboot mailing list