diff options
author | Timothy Pearson <tpearson@raptorengineeringinc.com> | 2016-03-29 20:37:36 -0500 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineeringinc.com> | 2016-03-31 20:00:34 +0200 |
commit | c094d9961144871c472698c41ce634e58abb6a32 (patch) | |
tree | d6abf49d3f8897fd45fc56134c0ecbfc8331f35b /src/northbridge/amd/amdmct/mct_ddr3/mct_d.c | |
parent | 3b55602b258e04b82dbb41f3332c5fb7f1b7bd81 (diff) |
nb/amd/mct_ddr3: Disable MCE framework during DRAM training
On Family 15h processors, with certain RDIMMs, MCEs are generated
as a normal part of DCT startup / DRAM training. Disable sync
flood on parity or UC data error until ECC has been enabled.
Change-Id: Ife54751ff127ffd59baaad35d3fea14ea01ef505
Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-on: https://review.coreboot.org/14186
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/northbridge/amd/amdmct/mct_ddr3/mct_d.c')
-rw-r--r-- | src/northbridge/amd/amdmct/mct_ddr3/mct_d.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c b/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c index f144f8a4b4..6292f0b6ce 100644 --- a/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c +++ b/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c @@ -8019,14 +8019,27 @@ void mct_SetDramConfigHi_D(struct MCTStatStruc *pMCTstat, printk(BIOS_DEBUG, "mct_SetDramConfigHi_D: DramConfigHi: %08x\n", DramConfigHi); + /* Prevent lockups on parity errors during initial DCT startup */ + if (!pDCTstat->mca_config_backed_up) { + dword = Get_NB32(pDCTstat->dev_nbmisc, 0x44); + pDCTstat->sync_flood_on_dram_err = (dword >> 30) & 0x1; + pDCTstat->sync_flood_on_any_uc_err = (dword >> 21) & 0x1; + dword &= ~(0x1 << 30); + dword &= ~(0x1 << 21); + Set_NB32(pDCTstat->dev_nbmisc, 0x44, dword); + pDCTstat->mca_config_backed_up = 1; + } + /* Program the DRAM Configuration High register */ Set_NB32_DCT(dev, dct, 0x94, DramConfigHi); if (is_fam15h()) { /* Wait until F2x[1, 0]94[FreqChgInProg]=0. */ do { + printk(BIOS_DEBUG, "*"); dword = Get_NB32_DCT(pDCTstat->dev_dct, dct, 0x94); } while (dword & (1 << FreqChgInProg)); + printk(BIOS_DEBUG, "\n"); /* Program D18F2x9C_x0D0F_E006_dct[1:0][PllLockTime] = 0xf */ dword = Get_NB32_index_wait_DCT(pDCTstat->dev_dct, dct, index_reg, 0x0d0fe006); |