Author: sduplichan
Date: Wed Mar  9 00:01:46 2011
New Revision: 6439
URL: https://tracker.coreboot.org/trac/coreboot/changeset/6439

Log:
Enable mahogany_fam10 and Kino family 10h to run the SB HT link at the expected 
HT3 frequency and width by matching the BUID swap list to the production BIOS. 
In addition, the BUID swap list has been moved into the project-specific file 
romstage.c for the other 13 AMD family 10h projects as well. For projects using 
a desktop AMD family 10h processor, pasting in the mahogany_fam10 swap list 
will likely allow HT3 operation. This should be confirmed on real hardware 
before commiting any swap list change. A different swap list will be needed for 
server projects. For serengeti_cheetah_fam10, a reference BIOS swap list to try 
is: 0x00, 0x0A, 0x00, 0x06, 0xFF, 0x0A, 0x06, 0xFF.

The patch makes these changes:

1) Remove the BUID swap list from ht_wrapper.c and put it in each of 15
   romstage.c files where it is used (AMD family 10h projects).
2) Add a prototype to amdfam10.h.
3) Modify the swap list and test in real hardware for mahogany_fam10 and
   kino family 10h and confirm HT3 operation for the SB link.

Abuild tested.

Signed-off-by: Scott Duplichan <sc...@notabs.org>
Acked-by: Stefan Reinauer <stefan.reina...@coreboot.org>

Modified:
   trunk/src/mainboard/amd/bimini_fam10/romstage.c
   trunk/src/mainboard/amd/mahogany_fam10/romstage.c
   trunk/src/mainboard/amd/serengeti_cheetah_fam10/romstage.c
   trunk/src/mainboard/amd/tilapia_fam10/romstage.c
   trunk/src/mainboard/asus/m4a78-em/romstage.c
   trunk/src/mainboard/asus/m4a785-m/romstage.c
   trunk/src/mainboard/gigabyte/ma785gmt/romstage.c
   trunk/src/mainboard/gigabyte/ma78gm/romstage.c
   trunk/src/mainboard/hp/dl165_g6_fam10/romstage.c
   trunk/src/mainboard/iei/kino-780am2-fam10/romstage.c
   trunk/src/mainboard/jetway/pa78vm5/romstage.c
   trunk/src/mainboard/msi/ms9652_fam10/romstage.c
   trunk/src/mainboard/supermicro/h8dmr_fam10/romstage.c
   trunk/src/mainboard/supermicro/h8qme_fam10/romstage.c
   trunk/src/mainboard/tyan/s2912_fam10/romstage.c
   trunk/src/northbridge/amd/amdfam10/amdfam10.h
   trunk/src/northbridge/amd/amdht/ht_wrapper.c

Modified: trunk/src/mainboard/amd/bimini_fam10/romstage.c
==============================================================================
--- trunk/src/mainboard/amd/bimini_fam10/romstage.c     Tue Mar  8 21:49:18 
2011        (r6438)
+++ trunk/src/mainboard/amd/bimini_fam10/romstage.c     Wed Mar  9 00:01:46 
2011        (r6439)
@@ -237,3 +237,34 @@
        post_cache_as_ram();    // BSP switch stack to ram, copy then execute 
LB.
        post_code(0x43);        // Should never see this post code.
 }
+
+/**
+ * BOOL AMD_CB_ManualBUIDSwapList(u8 Node, u8 Link, u8 **List)
+ * Description:
+ *     This routine is called every time a non-coherent chain is processed.
+ *     BUID assignment may be controlled explicitly on a non-coherent chain. 
Provide a
+ *     swap list. The first part of the list controls the BUID assignment and 
the
+ *     second part of the list provides the device to device linking.  Device 
orientation
+ *     can be detected automatically, or explicitly.  See documentation for 
more details.
+ *
+ *     Automatic non-coherent init assigns BUIDs starting at 1 and 
incrementing sequentially
+ *     based on each device's unit count.
+ *
+ * Parameters:
+ *     @param[in]  u8  node    = The node on which this chain is located
+ *     @param[in]  u8  link    = The link on the host for this chain
+ *     @param[out] u8** list   = supply a pointer to a list
+ *     @param[out] BOOL result = true to use a manual list
+ *                               false to initialize the link automatically
+ */
+BOOL AMD_CB_ManualBUIDSwapList (u8 node, u8 link, const u8 **List)
+{
+       static const u8 swaplist[] = { 0xFF, CONFIG_HT_CHAIN_UNITID_BASE, 
CONFIG_HT_CHAIN_END_UNITID_BASE, 0xFF };
+       /* If the BUID was adjusted in early_ht we need to do the manual 
override */
+               if ((node == 0) && (link == 0)) {       /* BSP SB link */
+                       *List = swaplist;
+                       return 1;
+               }
+
+       return 0;
+}

Modified: trunk/src/mainboard/amd/mahogany_fam10/romstage.c
==============================================================================
--- trunk/src/mainboard/amd/mahogany_fam10/romstage.c   Tue Mar  8 21:49:18 
2011        (r6438)
+++ trunk/src/mainboard/amd/mahogany_fam10/romstage.c   Wed Mar  9 00:01:46 
2011        (r6439)
@@ -232,3 +232,34 @@
        post_cache_as_ram();    // BSP switch stack to ram, copy then execute 
LB.
        post_code(0x43);        // Should never see this post code.
 }
+
+/**
+ * BOOL AMD_CB_ManualBUIDSwapList(u8 Node, u8 Link, u8 **List)
+ * Description:
+ *     This routine is called every time a non-coherent chain is processed.
+ *     BUID assignment may be controlled explicitly on a non-coherent chain. 
Provide a
+ *     swap list. The first part of the list controls the BUID assignment and 
the
+ *     second part of the list provides the device to device linking.  Device 
orientation
+ *     can be detected automatically, or explicitly.  See documentation for 
more details.
+ *
+ *     Automatic non-coherent init assigns BUIDs starting at 1 and 
incrementing sequentially
+ *     based on each device's unit count.
+ *
+ * Parameters:
+ *     @param[in]  u8  node    = The node on which this chain is located
+ *     @param[in]  u8  link    = The link on the host for this chain
+ *     @param[out] u8** list   = supply a pointer to a list
+ *     @param[out] BOOL result = true to use a manual list
+ *                               false to initialize the link automatically
+ */
+BOOL AMD_CB_ManualBUIDSwapList (u8 node, u8 link, const u8 **List)
+{
+       static const u8 swaplist[] = {0, 1, 0xFF, 0, 0xFF};
+       /* If the BUID was adjusted in early_ht we need to do the manual 
override */
+               if ((node == 0) && (link == 0)) {       /* BSP SB link */
+                       *List = swaplist;
+                       return 1;
+               }
+
+       return 0;
+}

Modified: trunk/src/mainboard/amd/serengeti_cheetah_fam10/romstage.c
==============================================================================
--- trunk/src/mainboard/amd/serengeti_cheetah_fam10/romstage.c  Tue Mar  8 
21:49:18 2011        (r6438)
+++ trunk/src/mainboard/amd/serengeti_cheetah_fam10/romstage.c  Wed Mar  9 
00:01:46 2011        (r6439)
@@ -337,3 +337,37 @@
        post_cache_as_ram();    // BSP switch stack to ram, copy then execute 
LB.
        post_code(0x43);        // Should never see this post code.
 }
+
+/**
+ * BOOL AMD_CB_ManualBUIDSwapList(u8 Node, u8 Link, u8 **List)
+ * Description:
+ *     This routine is called every time a non-coherent chain is processed.
+ *     BUID assignment may be controlled explicitly on a non-coherent chain. 
Provide a
+ *     swap list. The first part of the list controls the BUID assignment and 
the
+ *     second part of the list provides the device to device linking.  Device 
orientation
+ *     can be detected automatically, or explicitly.  See documentation for 
more details.
+ *
+ *     Automatic non-coherent init assigns BUIDs starting at 1 and 
incrementing sequentially
+ *     based on each device's unit count.
+ *
+ * Parameters:
+ *     @param[in]  u8  node    = The node on which this chain is located
+ *     @param[in]  u8  link    = The link on the host for this chain
+ *     @param[out] u8** list   = supply a pointer to a list
+ *     @param[out] BOOL result = true to use a manual list
+ *                               false to initialize the link automatically
+ */
+BOOL AMD_CB_ManualBUIDSwapList (u8 node, u8 link, const u8 **List)
+{
+       static const u8 swaplist[] = { 0xFF, CONFIG_HT_CHAIN_UNITID_BASE, 
CONFIG_HT_CHAIN_END_UNITID_BASE, 0xFF };
+       /* If the BUID was adjusted in early_ht we need to do the manual 
override */
+       if ((CONFIG_HT_CHAIN_UNITID_BASE != 0) && 
(CONFIG_HT_CHAIN_END_UNITID_BASE != 0)) {
+               printk(BIOS_DEBUG, "AMD_CB_ManualBUIDSwapList()\n");
+               if ((node == 0) && (link == 0)) {       /* BSP SB link */
+                       *List = swaplist;
+                       return 1;
+               }
+       }
+
+       return 0;
+}

Modified: trunk/src/mainboard/amd/tilapia_fam10/romstage.c
==============================================================================
--- trunk/src/mainboard/amd/tilapia_fam10/romstage.c    Tue Mar  8 21:49:18 
2011        (r6438)
+++ trunk/src/mainboard/amd/tilapia_fam10/romstage.c    Wed Mar  9 00:01:46 
2011        (r6439)
@@ -231,3 +231,37 @@
        post_cache_as_ram();    // BSP switch stack to ram, copy then execute 
LB.
        post_code(0x43);        // Should never see this post code.
 }
+
+/**
+ * BOOL AMD_CB_ManualBUIDSwapList(u8 Node, u8 Link, u8 **List)
+ * Description:
+ *     This routine is called every time a non-coherent chain is processed.
+ *     BUID assignment may be controlled explicitly on a non-coherent chain. 
Provide a
+ *     swap list. The first part of the list controls the BUID assignment and 
the
+ *     second part of the list provides the device to device linking.  Device 
orientation
+ *     can be detected automatically, or explicitly.  See documentation for 
more details.
+ *
+ *     Automatic non-coherent init assigns BUIDs starting at 1 and 
incrementing sequentially
+ *     based on each device's unit count.
+ *
+ * Parameters:
+ *     @param[in]  u8  node    = The node on which this chain is located
+ *     @param[in]  u8  link    = The link on the host for this chain
+ *     @param[out] u8** list   = supply a pointer to a list
+ *     @param[out] BOOL result = true to use a manual list
+ *                               false to initialize the link automatically
+ */
+BOOL AMD_CB_ManualBUIDSwapList (u8 node, u8 link, const u8 **List)
+{
+       static const u8 swaplist[] = { 0xFF, CONFIG_HT_CHAIN_UNITID_BASE, 
CONFIG_HT_CHAIN_END_UNITID_BASE, 0xFF };
+       /* If the BUID was adjusted in early_ht we need to do the manual 
override */
+       if ((CONFIG_HT_CHAIN_UNITID_BASE != 0) && 
(CONFIG_HT_CHAIN_END_UNITID_BASE != 0)) {
+               printk(BIOS_DEBUG, "AMD_CB_ManualBUIDSwapList()\n");
+               if ((node == 0) && (link == 0)) {       /* BSP SB link */
+                       *List = swaplist;
+                       return 1;
+               }
+       }
+
+       return 0;
+}

Modified: trunk/src/mainboard/asus/m4a78-em/romstage.c
==============================================================================
--- trunk/src/mainboard/asus/m4a78-em/romstage.c        Tue Mar  8 21:49:18 
2011        (r6438)
+++ trunk/src/mainboard/asus/m4a78-em/romstage.c        Wed Mar  9 00:01:46 
2011        (r6439)
@@ -232,3 +232,37 @@
        post_cache_as_ram();    // BSP switch stack to ram, copy then execute 
LB.
        post_code(0x43);        // Should never see this post code.
 }
+
+/**
+ * BOOL AMD_CB_ManualBUIDSwapList(u8 Node, u8 Link, u8 **List)
+ * Description:
+ *     This routine is called every time a non-coherent chain is processed.
+ *     BUID assignment may be controlled explicitly on a non-coherent chain. 
Provide a
+ *     swap list. The first part of the list controls the BUID assignment and 
the
+ *     second part of the list provides the device to device linking.  Device 
orientation
+ *     can be detected automatically, or explicitly.  See documentation for 
more details.
+ *
+ *     Automatic non-coherent init assigns BUIDs starting at 1 and 
incrementing sequentially
+ *     based on each device's unit count.
+ *
+ * Parameters:
+ *     @param[in]  u8  node    = The node on which this chain is located
+ *     @param[in]  u8  link    = The link on the host for this chain
+ *     @param[out] u8** list   = supply a pointer to a list
+ *     @param[out] BOOL result = true to use a manual list
+ *                               false to initialize the link automatically
+ */
+BOOL AMD_CB_ManualBUIDSwapList (u8 node, u8 link, const u8 **List)
+{
+       static const u8 swaplist[] = { 0xFF, CONFIG_HT_CHAIN_UNITID_BASE, 
CONFIG_HT_CHAIN_END_UNITID_BASE, 0xFF };
+       /* If the BUID was adjusted in early_ht we need to do the manual 
override */
+       if ((CONFIG_HT_CHAIN_UNITID_BASE != 0) && 
(CONFIG_HT_CHAIN_END_UNITID_BASE != 0)) {
+               printk(BIOS_DEBUG, "AMD_CB_ManualBUIDSwapList()\n");
+               if ((node == 0) && (link == 0)) {       /* BSP SB link */
+                       *List = swaplist;
+                       return 1;
+               }
+       }
+
+       return 0;
+}

Modified: trunk/src/mainboard/asus/m4a785-m/romstage.c
==============================================================================
--- trunk/src/mainboard/asus/m4a785-m/romstage.c        Tue Mar  8 21:49:18 
2011        (r6438)
+++ trunk/src/mainboard/asus/m4a785-m/romstage.c        Wed Mar  9 00:01:46 
2011        (r6439)
@@ -232,3 +232,37 @@
        post_cache_as_ram();    // BSP switch stack to ram, copy then execute 
LB.
        post_code(0x43);        // Should never see this post code.
 }
+
+/**
+ * BOOL AMD_CB_ManualBUIDSwapList(u8 Node, u8 Link, u8 **List)
+ * Description:
+ *     This routine is called every time a non-coherent chain is processed.
+ *     BUID assignment may be controlled explicitly on a non-coherent chain. 
Provide a
+ *     swap list. The first part of the list controls the BUID assignment and 
the
+ *     second part of the list provides the device to device linking.  Device 
orientation
+ *     can be detected automatically, or explicitly.  See documentation for 
more details.
+ *
+ *     Automatic non-coherent init assigns BUIDs starting at 1 and 
incrementing sequentially
+ *     based on each device's unit count.
+ *
+ * Parameters:
+ *     @param[in]  u8  node    = The node on which this chain is located
+ *     @param[in]  u8  link    = The link on the host for this chain
+ *     @param[out] u8** list   = supply a pointer to a list
+ *     @param[out] BOOL result = true to use a manual list
+ *                               false to initialize the link automatically
+ */
+BOOL AMD_CB_ManualBUIDSwapList (u8 node, u8 link, const u8 **List)
+{
+       static const u8 swaplist[] = { 0xFF, CONFIG_HT_CHAIN_UNITID_BASE, 
CONFIG_HT_CHAIN_END_UNITID_BASE, 0xFF };
+       /* If the BUID was adjusted in early_ht we need to do the manual 
override */
+       if ((CONFIG_HT_CHAIN_UNITID_BASE != 0) && 
(CONFIG_HT_CHAIN_END_UNITID_BASE != 0)) {
+               printk(BIOS_DEBUG, "AMD_CB_ManualBUIDSwapList()\n");
+               if ((node == 0) && (link == 0)) {       /* BSP SB link */
+                       *List = swaplist;
+                       return 1;
+               }
+       }
+
+       return 0;
+}

Modified: trunk/src/mainboard/gigabyte/ma785gmt/romstage.c
==============================================================================
--- trunk/src/mainboard/gigabyte/ma785gmt/romstage.c    Tue Mar  8 21:49:18 
2011        (r6438)
+++ trunk/src/mainboard/gigabyte/ma785gmt/romstage.c    Wed Mar  9 00:01:46 
2011        (r6439)
@@ -228,3 +228,37 @@
        post_cache_as_ram();    // BSP switch stack to ram, copy then execute 
LB.
        post_code(0x43);        // Should never see this post code.
 }
+
+/**
+ * BOOL AMD_CB_ManualBUIDSwapList(u8 Node, u8 Link, u8 **List)
+ * Description:
+ *     This routine is called every time a non-coherent chain is processed.
+ *     BUID assignment may be controlled explicitly on a non-coherent chain. 
Provide a
+ *     swap list. The first part of the list controls the BUID assignment and 
the
+ *     second part of the list provides the device to device linking.  Device 
orientation
+ *     can be detected automatically, or explicitly.  See documentation for 
more details.
+ *
+ *     Automatic non-coherent init assigns BUIDs starting at 1 and 
incrementing sequentially
+ *     based on each device's unit count.
+ *
+ * Parameters:
+ *     @param[in]  u8  node    = The node on which this chain is located
+ *     @param[in]  u8  link    = The link on the host for this chain
+ *     @param[out] u8** list   = supply a pointer to a list
+ *     @param[out] BOOL result = true to use a manual list
+ *                               false to initialize the link automatically
+ */
+BOOL AMD_CB_ManualBUIDSwapList (u8 node, u8 link, const u8 **List)
+{
+       static const u8 swaplist[] = { 0xFF, CONFIG_HT_CHAIN_UNITID_BASE, 
CONFIG_HT_CHAIN_END_UNITID_BASE, 0xFF };
+       /* If the BUID was adjusted in early_ht we need to do the manual 
override */
+       if ((CONFIG_HT_CHAIN_UNITID_BASE != 0) && 
(CONFIG_HT_CHAIN_END_UNITID_BASE != 0)) {
+               printk(BIOS_DEBUG, "AMD_CB_ManualBUIDSwapList()\n");
+               if ((node == 0) && (link == 0)) {       /* BSP SB link */
+                       *List = swaplist;
+                       return 1;
+               }
+       }
+
+       return 0;
+}

Modified: trunk/src/mainboard/gigabyte/ma78gm/romstage.c
==============================================================================
--- trunk/src/mainboard/gigabyte/ma78gm/romstage.c      Tue Mar  8 21:49:18 
2011        (r6438)
+++ trunk/src/mainboard/gigabyte/ma78gm/romstage.c      Wed Mar  9 00:01:46 
2011        (r6439)
@@ -230,3 +230,37 @@
        post_cache_as_ram();    // BSP switch stack to ram, copy then execute 
LB.
        post_code(0x43);        // Should never see this post code.
 }
+
+/**
+ * BOOL AMD_CB_ManualBUIDSwapList(u8 Node, u8 Link, u8 **List)
+ * Description:
+ *     This routine is called every time a non-coherent chain is processed.
+ *     BUID assignment may be controlled explicitly on a non-coherent chain. 
Provide a
+ *     swap list. The first part of the list controls the BUID assignment and 
the
+ *     second part of the list provides the device to device linking.  Device 
orientation
+ *     can be detected automatically, or explicitly.  See documentation for 
more details.
+ *
+ *     Automatic non-coherent init assigns BUIDs starting at 1 and 
incrementing sequentially
+ *     based on each device's unit count.
+ *
+ * Parameters:
+ *     @param[in]  u8  node    = The node on which this chain is located
+ *     @param[in]  u8  link    = The link on the host for this chain
+ *     @param[out] u8** list   = supply a pointer to a list
+ *     @param[out] BOOL result = true to use a manual list
+ *                               false to initialize the link automatically
+ */
+BOOL AMD_CB_ManualBUIDSwapList (u8 node, u8 link, const u8 **List)
+{
+       static const u8 swaplist[] = { 0xFF, CONFIG_HT_CHAIN_UNITID_BASE, 
CONFIG_HT_CHAIN_END_UNITID_BASE, 0xFF };
+       /* If the BUID was adjusted in early_ht we need to do the manual 
override */
+       if ((CONFIG_HT_CHAIN_UNITID_BASE != 0) && 
(CONFIG_HT_CHAIN_END_UNITID_BASE != 0)) {
+               printk(BIOS_DEBUG, "AMD_CB_ManualBUIDSwapList()\n");
+               if ((node == 0) && (link == 0)) {       /* BSP SB link */
+                       *List = swaplist;
+                       return 1;
+               }
+       }
+
+       return 0;
+}

Modified: trunk/src/mainboard/hp/dl165_g6_fam10/romstage.c
==============================================================================
--- trunk/src/mainboard/hp/dl165_g6_fam10/romstage.c    Tue Mar  8 21:49:18 
2011        (r6438)
+++ trunk/src/mainboard/hp/dl165_g6_fam10/romstage.c    Wed Mar  9 00:01:46 
2011        (r6439)
@@ -222,3 +222,37 @@
 
        post_cache_as_ram();
 }
+
+/**
+ * BOOL AMD_CB_ManualBUIDSwapList(u8 Node, u8 Link, u8 **List)
+ * Description:
+ *     This routine is called every time a non-coherent chain is processed.
+ *     BUID assignment may be controlled explicitly on a non-coherent chain. 
Provide a
+ *     swap list. The first part of the list controls the BUID assignment and 
the
+ *     second part of the list provides the device to device linking.  Device 
orientation
+ *     can be detected automatically, or explicitly.  See documentation for 
more details.
+ *
+ *     Automatic non-coherent init assigns BUIDs starting at 1 and 
incrementing sequentially
+ *     based on each device's unit count.
+ *
+ * Parameters:
+ *     @param[in]  u8  node    = The node on which this chain is located
+ *     @param[in]  u8  link    = The link on the host for this chain
+ *     @param[out] u8** list   = supply a pointer to a list
+ *     @param[out] BOOL result = true to use a manual list
+ *                               false to initialize the link automatically
+ */
+BOOL AMD_CB_ManualBUIDSwapList (u8 node, u8 link, const u8 **List)
+{
+       static const u8 swaplist[] = { 0xFF, CONFIG_HT_CHAIN_UNITID_BASE, 
CONFIG_HT_CHAIN_END_UNITID_BASE, 0xFF };
+       /* If the BUID was adjusted in early_ht we need to do the manual 
override */
+       if ((CONFIG_HT_CHAIN_UNITID_BASE != 0) && 
(CONFIG_HT_CHAIN_END_UNITID_BASE != 0)) {
+               printk(BIOS_DEBUG, "AMD_CB_ManualBUIDSwapList()\n");
+               if ((node == 0) && (link == 0)) {       /* BSP SB link */
+                       *List = swaplist;
+                       return 1;
+               }
+       }
+
+       return 0;
+}

Modified: trunk/src/mainboard/iei/kino-780am2-fam10/romstage.c
==============================================================================
--- trunk/src/mainboard/iei/kino-780am2-fam10/romstage.c        Tue Mar  8 
21:49:18 2011        (r6438)
+++ trunk/src/mainboard/iei/kino-780am2-fam10/romstage.c        Wed Mar  9 
00:01:46 2011        (r6439)
@@ -233,3 +233,34 @@
        post_cache_as_ram();    // BSP switch stack to ram, copy then execute 
LB.
        post_code(0x43);        // Should never see this post code.
 }
+
+/**
+ * BOOL AMD_CB_ManualBUIDSwapList(u8 Node, u8 Link, u8 **List)
+ * Description:
+ *     This routine is called every time a non-coherent chain is processed.
+ *     BUID assignment may be controlled explicitly on a non-coherent chain. 
Provide a
+ *     swap list. The first part of the list controls the BUID assignment and 
the
+ *     second part of the list provides the device to device linking.  Device 
orientation
+ *     can be detected automatically, or explicitly.  See documentation for 
more details.
+ *
+ *     Automatic non-coherent init assigns BUIDs starting at 1 and 
incrementing sequentially
+ *     based on each device's unit count.
+ *
+ * Parameters:
+ *     @param[in]  u8  node    = The node on which this chain is located
+ *     @param[in]  u8  link    = The link on the host for this chain
+ *     @param[out] u8** list   = supply a pointer to a list
+ *     @param[out] BOOL result = true to use a manual list
+ *                               false to initialize the link automatically
+ */
+BOOL AMD_CB_ManualBUIDSwapList (u8 node, u8 link, const u8 **List)
+{
+       static const u8 swaplist[] = {0, 1, 0xFF, 0, 0xFF};
+       /* If the BUID was adjusted in early_ht we need to do the manual 
override */
+               if ((node == 0) && (link == 0)) {       /* BSP SB link */
+                       *List = swaplist;
+                       return 1;
+               }
+
+       return 0;
+}

Modified: trunk/src/mainboard/jetway/pa78vm5/romstage.c
==============================================================================
--- trunk/src/mainboard/jetway/pa78vm5/romstage.c       Tue Mar  8 21:49:18 
2011        (r6438)
+++ trunk/src/mainboard/jetway/pa78vm5/romstage.c       Wed Mar  9 00:01:46 
2011        (r6439)
@@ -238,3 +238,37 @@
        post_cache_as_ram();    // BSP switch stack to ram, copy then execute 
LB.
        post_code(0x43);        // Should never see this post code.
 }
+
+/**
+ * BOOL AMD_CB_ManualBUIDSwapList(u8 Node, u8 Link, u8 **List)
+ * Description:
+ *     This routine is called every time a non-coherent chain is processed.
+ *     BUID assignment may be controlled explicitly on a non-coherent chain. 
Provide a
+ *     swap list. The first part of the list controls the BUID assignment and 
the
+ *     second part of the list provides the device to device linking.  Device 
orientation
+ *     can be detected automatically, or explicitly.  See documentation for 
more details.
+ *
+ *     Automatic non-coherent init assigns BUIDs starting at 1 and 
incrementing sequentially
+ *     based on each device's unit count.
+ *
+ * Parameters:
+ *     @param[in]  u8  node    = The node on which this chain is located
+ *     @param[in]  u8  link    = The link on the host for this chain
+ *     @param[out] u8** list   = supply a pointer to a list
+ *     @param[out] BOOL result = true to use a manual list
+ *                               false to initialize the link automatically
+ */
+BOOL AMD_CB_ManualBUIDSwapList (u8 node, u8 link, const u8 **List)
+{
+       static const u8 swaplist[] = { 0xFF, CONFIG_HT_CHAIN_UNITID_BASE, 
CONFIG_HT_CHAIN_END_UNITID_BASE, 0xFF };
+       /* If the BUID was adjusted in early_ht we need to do the manual 
override */
+       if ((CONFIG_HT_CHAIN_UNITID_BASE != 0) && 
(CONFIG_HT_CHAIN_END_UNITID_BASE != 0)) {
+               printk(BIOS_DEBUG, "AMD_CB_ManualBUIDSwapList()\n");
+               if ((node == 0) && (link == 0)) {       /* BSP SB link */
+                       *List = swaplist;
+                       return 1;
+               }
+       }
+
+       return 0;
+}

Modified: trunk/src/mainboard/msi/ms9652_fam10/romstage.c
==============================================================================
--- trunk/src/mainboard/msi/ms9652_fam10/romstage.c     Tue Mar  8 21:49:18 
2011        (r6438)
+++ trunk/src/mainboard/msi/ms9652_fam10/romstage.c     Wed Mar  9 00:01:46 
2011        (r6439)
@@ -253,3 +253,37 @@
        post_cache_as_ram();    // BSP switch stack to ram, copy then execute 
LB.
        post_code(0x43);        // Should never see this post code.
 }
+
+/**
+ * BOOL AMD_CB_ManualBUIDSwapList(u8 Node, u8 Link, u8 **List)
+ * Description:
+ *     This routine is called every time a non-coherent chain is processed.
+ *     BUID assignment may be controlled explicitly on a non-coherent chain. 
Provide a
+ *     swap list. The first part of the list controls the BUID assignment and 
the
+ *     second part of the list provides the device to device linking.  Device 
orientation
+ *     can be detected automatically, or explicitly.  See documentation for 
more details.
+ *
+ *     Automatic non-coherent init assigns BUIDs starting at 1 and 
incrementing sequentially
+ *     based on each device's unit count.
+ *
+ * Parameters:
+ *     @param[in]  u8  node    = The node on which this chain is located
+ *     @param[in]  u8  link    = The link on the host for this chain
+ *     @param[out] u8** list   = supply a pointer to a list
+ *     @param[out] BOOL result = true to use a manual list
+ *                               false to initialize the link automatically
+ */
+BOOL AMD_CB_ManualBUIDSwapList (u8 node, u8 link, const u8 **List)
+{
+       static const u8 swaplist[] = { 0xFF, CONFIG_HT_CHAIN_UNITID_BASE, 
CONFIG_HT_CHAIN_END_UNITID_BASE, 0xFF };
+       /* If the BUID was adjusted in early_ht we need to do the manual 
override */
+       if ((CONFIG_HT_CHAIN_UNITID_BASE != 0) && 
(CONFIG_HT_CHAIN_END_UNITID_BASE != 0)) {
+               printk(BIOS_DEBUG, "AMD_CB_ManualBUIDSwapList()\n");
+               if ((node == 0) && (link == 0)) {       /* BSP SB link */
+                       *List = swaplist;
+                       return 1;
+               }
+       }
+
+       return 0;
+}

Modified: trunk/src/mainboard/supermicro/h8dmr_fam10/romstage.c
==============================================================================
--- trunk/src/mainboard/supermicro/h8dmr_fam10/romstage.c       Tue Mar  8 
21:49:18 2011        (r6438)
+++ trunk/src/mainboard/supermicro/h8dmr_fam10/romstage.c       Wed Mar  9 
00:01:46 2011        (r6439)
@@ -246,3 +246,37 @@
        post_cache_as_ram(); // BSP switch stack to ram, copy + execute stage 2
        post_code(0x42);     // Should never see this post code.
 }
+
+/**
+ * BOOL AMD_CB_ManualBUIDSwapList(u8 Node, u8 Link, u8 **List)
+ * Description:
+ *     This routine is called every time a non-coherent chain is processed.
+ *     BUID assignment may be controlled explicitly on a non-coherent chain. 
Provide a
+ *     swap list. The first part of the list controls the BUID assignment and 
the
+ *     second part of the list provides the device to device linking.  Device 
orientation
+ *     can be detected automatically, or explicitly.  See documentation for 
more details.
+ *
+ *     Automatic non-coherent init assigns BUIDs starting at 1 and 
incrementing sequentially
+ *     based on each device's unit count.
+ *
+ * Parameters:
+ *     @param[in]  u8  node    = The node on which this chain is located
+ *     @param[in]  u8  link    = The link on the host for this chain
+ *     @param[out] u8** list   = supply a pointer to a list
+ *     @param[out] BOOL result = true to use a manual list
+ *                               false to initialize the link automatically
+ */
+BOOL AMD_CB_ManualBUIDSwapList (u8 node, u8 link, const u8 **List)
+{
+       static const u8 swaplist[] = { 0xFF, CONFIG_HT_CHAIN_UNITID_BASE, 
CONFIG_HT_CHAIN_END_UNITID_BASE, 0xFF };
+       /* If the BUID was adjusted in early_ht we need to do the manual 
override */
+       if ((CONFIG_HT_CHAIN_UNITID_BASE != 0) && 
(CONFIG_HT_CHAIN_END_UNITID_BASE != 0)) {
+               printk(BIOS_DEBUG, "AMD_CB_ManualBUIDSwapList()\n");
+               if ((node == 0) && (link == 0)) {       /* BSP SB link */
+                       *List = swaplist;
+                       return 1;
+               }
+       }
+
+       return 0;
+}

Modified: trunk/src/mainboard/supermicro/h8qme_fam10/romstage.c
==============================================================================
--- trunk/src/mainboard/supermicro/h8qme_fam10/romstage.c       Tue Mar  8 
21:49:18 2011        (r6438)
+++ trunk/src/mainboard/supermicro/h8qme_fam10/romstage.c       Wed Mar  9 
00:01:46 2011        (r6439)
@@ -295,3 +295,37 @@
  post_cache_as_ram();  // BSP switch stack to ram, copy then execute LB.
  post_code(0x42);  // Should never see this post code.
 }
+
+/**
+ * BOOL AMD_CB_ManualBUIDSwapList(u8 Node, u8 Link, u8 **List)
+ * Description:
+ *     This routine is called every time a non-coherent chain is processed.
+ *     BUID assignment may be controlled explicitly on a non-coherent chain. 
Provide a
+ *     swap list. The first part of the list controls the BUID assignment and 
the
+ *     second part of the list provides the device to device linking.  Device 
orientation
+ *     can be detected automatically, or explicitly.  See documentation for 
more details.
+ *
+ *     Automatic non-coherent init assigns BUIDs starting at 1 and 
incrementing sequentially
+ *     based on each device's unit count.
+ *
+ * Parameters:
+ *     @param[in]  u8  node    = The node on which this chain is located
+ *     @param[in]  u8  link    = The link on the host for this chain
+ *     @param[out] u8** list   = supply a pointer to a list
+ *     @param[out] BOOL result = true to use a manual list
+ *                               false to initialize the link automatically
+ */
+BOOL AMD_CB_ManualBUIDSwapList (u8 node, u8 link, const u8 **List)
+{
+       static const u8 swaplist[] = { 0xFF, CONFIG_HT_CHAIN_UNITID_BASE, 
CONFIG_HT_CHAIN_END_UNITID_BASE, 0xFF };
+       /* If the BUID was adjusted in early_ht we need to do the manual 
override */
+       if ((CONFIG_HT_CHAIN_UNITID_BASE != 0) && 
(CONFIG_HT_CHAIN_END_UNITID_BASE != 0)) {
+               printk(BIOS_DEBUG, "AMD_CB_ManualBUIDSwapList()\n");
+               if ((node == 0) && (link == 0)) {       /* BSP SB link */
+                       *List = swaplist;
+                       return 1;
+               }
+       }
+
+       return 0;
+}

Modified: trunk/src/mainboard/tyan/s2912_fam10/romstage.c
==============================================================================
--- trunk/src/mainboard/tyan/s2912_fam10/romstage.c     Tue Mar  8 21:49:18 
2011        (r6438)
+++ trunk/src/mainboard/tyan/s2912_fam10/romstage.c     Wed Mar  9 00:01:46 
2011        (r6439)
@@ -250,3 +250,37 @@
        post_cache_as_ram();    // BSP switch stack to ram, copy then execute 
LB.
        post_code(0x43);        // Should never see this post code.
 }
+
+/**
+ * BOOL AMD_CB_ManualBUIDSwapList(u8 Node, u8 Link, u8 **List)
+ * Description:
+ *     This routine is called every time a non-coherent chain is processed.
+ *     BUID assignment may be controlled explicitly on a non-coherent chain. 
Provide a
+ *     swap list. The first part of the list controls the BUID assignment and 
the
+ *     second part of the list provides the device to device linking.  Device 
orientation
+ *     can be detected automatically, or explicitly.  See documentation for 
more details.
+ *
+ *     Automatic non-coherent init assigns BUIDs starting at 1 and 
incrementing sequentially
+ *     based on each device's unit count.
+ *
+ * Parameters:
+ *     @param[in]  u8  node    = The node on which this chain is located
+ *     @param[in]  u8  link    = The link on the host for this chain
+ *     @param[out] u8** list   = supply a pointer to a list
+ *     @param[out] BOOL result = true to use a manual list
+ *                               false to initialize the link automatically
+ */
+BOOL AMD_CB_ManualBUIDSwapList (u8 node, u8 link, const u8 **List)
+{
+       static const u8 swaplist[] = { 0xFF, CONFIG_HT_CHAIN_UNITID_BASE, 
CONFIG_HT_CHAIN_END_UNITID_BASE, 0xFF };
+       /* If the BUID was adjusted in early_ht we need to do the manual 
override */
+       if ((CONFIG_HT_CHAIN_UNITID_BASE != 0) && 
(CONFIG_HT_CHAIN_END_UNITID_BASE != 0)) {
+               printk(BIOS_DEBUG, "AMD_CB_ManualBUIDSwapList()\n");
+               if ((node == 0) && (link == 0)) {       /* BSP SB link */
+                       *List = swaplist;
+                       return 1;
+               }
+       }
+
+       return 0;
+}

Modified: trunk/src/northbridge/amd/amdfam10/amdfam10.h
==============================================================================
--- trunk/src/northbridge/amd/amdfam10/amdfam10.h       Tue Mar  8 21:49:18 
2011        (r6438)
+++ trunk/src/northbridge/amd/amdfam10/amdfam10.h       Wed Mar  9 00:01:46 
2011        (r6439)
@@ -1199,4 +1199,7 @@
 u8 get_sbbusn(u8 sblk);
 #endif
 
+#include "northbridge/amd/amdht/porting.h"
+BOOL AMD_CB_ManualBUIDSwapList(u8 Node, u8 Link, const u8 **List);
+
 #endif /* AMDFAM10_H */

Modified: trunk/src/northbridge/amd/amdht/ht_wrapper.c
==============================================================================
--- trunk/src/northbridge/amd/amdht/ht_wrapper.c        Tue Mar  8 21:49:18 
2011        (r6438)
+++ trunk/src/northbridge/amd/amdht/ht_wrapper.c        Wed Mar  9 00:01:46 
2011        (r6439)
@@ -97,42 +97,6 @@
 
 }
 
-
-/**
- * BOOL AMD_CB_ManualBUIDSwapList(u8 Node, u8 Link, u8 **List)
- * Description:
- *     This routine is called every time a non-coherent chain is processed.
- *     BUID assignment may be controlled explicitly on a non-coherent chain. 
Provide a
- *     swap list. The first part of the list controls the BUID assignment and 
the
- *     second part of the list provides the device to device linking.  Device 
orientation
- *     can be detected automatically, or explicitly.  See documentation for 
more details.
- *
- *     Automatic non-coherent init assigns BUIDs starting at 1 and 
incrementing sequentially
- *     based on each device's unit count.
- *
- * Parameters:
- *     @param[in]  u8  node    = The node on which this chain is located
- *     @param[in]  u8  link    = The link on the host for this chain
- *     @param[out] u8** list   = supply a pointer to a list
- *     @param[out] BOOL result = true to use a manual list
- *                               false to initialize the link automatically
- */
-static BOOL AMD_CB_ManualBUIDSwapList (u8 node, u8 link, const u8 **List)
-{
-       static const u8 swaplist[] = { 0xFF, CONFIG_HT_CHAIN_UNITID_BASE, 
CONFIG_HT_CHAIN_END_UNITID_BASE, 0xFF };
-       /* If the BUID was adjusted in early_ht we need to do the manual 
override */
-       if ((CONFIG_HT_CHAIN_UNITID_BASE != 0) && 
(CONFIG_HT_CHAIN_END_UNITID_BASE != 0)) {
-               printk(BIOS_DEBUG, "AMD_CB_ManualBUIDSwapList()\n");
-               if ((node == 0) && (link == 0)) {       /* BSP SB link */
-                       *List = swaplist;
-                       return 1;
-               }
-       }
-
-       return 0;
-}
-
-
 /**
  * void getAmdTopolist(u8 ***p)
  *

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

Reply via email to