Changeset 3435

Show
Ignore:
Timestamp:
07/23/08 23:44:23 (2 months ago)
Author:
mjones
Message:

Add AMD Fam10 B3 default settings to match AMD example code.
Includes setting for most recent errata.

Signed-off-by: Marc Jones <marc.jones@…>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@…>

Location:
trunk/coreboot-v2/src/cpu/amd/model_10xxx
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/coreboot-v2/src/cpu/amd/model_10xxx/defaults.h

    r3424 r3435  
    4747          0xF << 19, 0x00000000 },      /* [RtryHt[0..3]]=1 */ 
    4848 
    49         { MC4_CTL_MASK, AMD_DR_ALL, AMD_PTYPE_ALL, 
    50           0x1 << 10, 0x00000000, 
    51           0x1 << 10, 0x00000000 },      /* [GartTblWkEn]=1 */ 
    52  
    5349        { DC_CFG, AMD_DR_ALL, AMD_PTYPE_SVR, 
    5450          0x00000000, 0x00000004, 
     
    6965        { DC_CFG, AMD_DR_ALL, AMD_PTYPE_ALL, 
    7066          1 << 24, 0x00000000, 
    71           1 << 24, 0x00000000 },        /* Erratum #202 [DIS_PIGGY_BACK_SCRUB]=1 */ 
     67          1 << 24, 0x00000000 },        /* Erratum #261 [DIS_PIGGY_BACK_SCRUB]=1 */ 
    7268 
    7369        { LS_CFG, AMD_DR_GT_B0, AMD_PTYPE_ALL, 
     
    161157 
    162158        { 3, 0x44, AMD_DR_ALL, AMD_PTYPE_ALL, 
    163           0x0A100044, 0x0A300044 },     /* [27] NB MCA to CPU0 Enable, 
    164                                            [25] DisPciCfgCpuErrRsp, 
    165                                            [21] SyncOnErr=0, 
    166                                            [20] SyncOnWDTEn=1, 
    167                                            [6] CpuErrDis, 
    168                                            [2] SyncOnUcEccEn=1 */ 
     159          0x4A30005C, 0x4A30005C },     /* [30] SyncOnDramAdrParErrEn = 1, 
     160                                           [27] NbMcaToMstCpuEn = 1, 
     161                                           [25] DisPciCfgCpuErrRsp = 1, 
     162                                           [21] SyncOnAnyErrEn = 1, 
     163                                           [20] SyncOnWDTEn = 1, 
     164                                           [6] CpuErrDis = 1, 
     165                                           [4] SyncPktPropDis = 1, 
     166                                           [3] SyncPktGenDis = 1, 
     167                                           [2] SyncOnUcEccEn = 1 */ 
    169168 
    170169        /* XBAR buffer settings */ 
     
    223222          0xA0E641E6, 0xFFFFFFFF }, 
    224223 
    225         { 3, 0xA0, AMD_DR_ALL, AMD_PTYPE_MOB, 
     224        { 3, 0xA0, AMD_DR_ALL, AMD_PTYPE_MOB | AMD_PTYPE_DSK, 
    226225          0x00000080, 0x00000080 },     /* [7] PSIVidEnable */ 
    227226 
     
    251250        /* Extended NB MCA Config Register */ 
    252251        { 3, 0x180, AMD_DR_ALL, AMD_PTYPE_ALL, 
    253           0x00700022, 0x00700022 },     /* [5]     = DisPciCfgCpuMstAbtRsp 
    254                                            [22:20] = SyncFloodOn_Err = 7, 
    255                                            [1] = SyncFloodOnUsPwDataErr = 1 */ 
     252          0x007003E2, 0x007003E2 },     /* [22:20] = SyncFloodOn_Err = 7, 
     253                                           [9] SyncOnUncNbAryEn = 1 , 
     254                                           [8] SyncOnProtEn = 1, 
     255                                           [7] SyncFloodOnTgtAbtErr = 1, 
     256                                           [6] SyncFloodOnDatErr = 1, 
     257                                           [5] DisPciCfgCpuMstAbtRsp = 1, 
     258                                           [1] SyncFloodOnUsPwDataErr = 1 */ 
    256259 
    257260        /* L3 Control Register */ 
  • trunk/coreboot-v2/src/cpu/amd/model_10xxx/init_cpus.c

    r3266 r3435  
    670670 
    671671 
     672void AMD_SetupPSIVID_d (u32 platform_type, u8 node) 
     673{ 
     674        u32 dword; 
     675        int i; 
     676        msr_t msr; 
     677 
     678        if (platform_type & (AMD_PTYPE_MOB | AMD_PTYPE_DSK)) { 
     679 
     680        /* The following code sets the PSIVID to the lowest support P state 
     681         * assuming that the VID for the lowest power state is below 
     682         * the VDD voltage regulator threshold. (This also assumes that there 
     683         * is a Pstate lower than P0) 
     684         */ 
     685 
     686                for( i = 4; i >= 0; i--) { 
     687                        msr = rdmsr(PS_REG_BASE + i); 
     688                        /*  Pstate valid? */ 
     689                        if (msr.hi & PS_EN_MASK) { 
     690                                dword = pci_read_config32(NODE_PCI(i,3), 0xA0); 
     691                                dword &= ~0x7F; 
     692                                dword |= (msr.lo >> 9) & 0x7F; 
     693                                pci_write_config32(NODE_PCI(i,3), 0xA0, dword); 
     694                                break; 
     695                        } 
     696                } 
     697        } 
     698} 
     699 
     700 
    672701/** 
    673702 * AMD_CpuFindCapability - Traverse PCI capability list to find host HT links. 
     
    855884        printk_debug("cpuSetAMDPCI %02d", node); 
    856885 
     886 
    857887        revision = mctGetLogicalCPUID(node); 
    858888        platform = get_platform_type(); 
     889 
     890        AMD_SetupPSIVID_d(platform, node);      /* Set PSIVID offset which is not table driven */ 
    859891 
    860892        for(i = 0; i < sizeof(fam10_pci_default)/sizeof(fam10_pci_default[0]); i++) {