Changeset 3426

Show
Ignore:
Timestamp:
07/17/08 21:54:06 (3 months ago)
Author:
mjones
Message:

Add manual HT BUID fixup to detect previously set BUIDs in early init. This fixes the non-coherent(sb) link running at default speed.

Fix HT event notify to output useful information.

Signed-off-by: Marc Jones <marc.jones@…>

Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@…>

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/coreboot-v2/src/northbridge/amd/amdht/ht_wrapper.c

    r3248 r3426  
    8080/** 
    8181 * void AMD_CB_EventNotify (u8 evtClass, u16 event, const u8 *pEventData0) 
    82  * 
    83  *  Needs to be fixed to output the debug structures. 
    84  * 
    8582 */ 
    86 void AMD_CB_EventNotify (u8 evtClass, u16 event, const u8 *pEventData0) 
     83void AMD_CB_EventNotify (u8 evtClass, u16 event, u8 *pEventData0) 
    8784{ 
     85        u8 i; 
     86 
    8887        printk_debug("AMD_CB_EventNotify()\n"); 
    89         printk_debug("event class: %02x event: %04x\n", evtClass, event); 
     88        printk_debug(" event class: %02x\n event: %04x\n data: ", evtClass, event); 
     89 
     90        for (i = 0; i < *pEventData0; i++) { 
     91                printk_debug(" %02x ", *(pEventData0 + i)); 
     92        } 
     93        printk_debug("\n"); 
    9094 
    9195} 
     96 
     97 
     98/** 
     99 * BOOL AMD_CB_ManualBUIDSwapList(u8 Node, u8 Link, u8 **List) 
     100 * Description: 
     101 *      This routine is called every time a non-coherent chain is processed. 
     102 *      BUID assignment may be controlled explicitly on a non-coherent chain. Provide a 
     103 *      swap list. The first part of the list controls the BUID assignment and the 
     104 *      second part of the list provides the device to device linking.  Device orientation 
     105 *      can be detected automatically, or explicitly.  See documentation for more details. 
     106 * 
     107 *      Automatic non-coherent init assigns BUIDs starting at 1 and incrementing sequentially 
     108 *      based on each device's unit count. 
     109 * 
     110 * Parameters: 
     111 *      @param[in]  u8  node    = The node on which this chain is located 
     112 *      @param[in]  u8  link    = The link on the host for this chain 
     113 *      @param[out] u8** list   = supply a pointer to a list 
     114 *      @param[out] BOOL result = true to use a manual list 
     115 *                                false to initialize the link automatically 
     116 */ 
     117BOOL AMD_CB_ManualBUIDSwapList (u8 node, u16 link, u8 **List) 
     118{ 
     119        u8 swaplist[] = { 0xFF, HT_CHAIN_UNITID_BASE, HT_CHAIN_END_UNITID_BASE, 0xFF }; 
     120        /* If the BUID was adjusted in early_ht we need to do the manual override */ 
     121        if ((HT_CHAIN_UNITID_BASE != 0) && (HT_CHAIN_END_UNITID_BASE != 0)) { 
     122                printk_debug("AMD_CB_ManualBUIDSwapList()\n"); 
     123                if ((node == 0) && (link == 0)) {       /* BSP SB link */ 
     124                        *List = swaplist; 
     125                        return 1; 
     126                } 
     127        } 
     128 
     129        return 0; 
     130} 
     131 
    92132 
    93133/** 
     
    111151void amd_ht_init(struct sys_info *sysinfo) 
    112152{ 
     153 
    113154        AMD_HTBLOCK ht_wrapper = { 
    114155                NULL,   // u8 **topolist; 
     
    118159                NULL,   // BOOL (*AMD_CB_IgnoreLink)(); 
    119160                NULL,   // BOOL (*AMD_CB_OverrideBusNumbers)(); 
    120                 NULL,   // BOOL (*AMD_CB_ManualBUIDSwapList)(); 
     161                AMD_CB_ManualBUIDSwapList,      // BOOL (*AMD_CB_ManualBUIDSwapList)(); 
    121162                NULL,   // void (*AMD_CB_DeviceCapOverride)(); 
    122163                NULL,   // void (*AMD_CB_Cpu2CpuPCBLimits)();