Timothy Pearson (tpearson(a)raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14271
-gerrit
commit a3ec6e099acb82dbeb99906ac24261834568be97
Author: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Date: Wed Apr 6 22:19:43 2016 -0500
Revert "nb/amd/mct_ddr3: Enable DIMM parity when RDIMMs installed"
This reverts commit f961becc433bf23fc8744fdfd757f0cdb75c2c62.
On studying the BKDG more closely this is not the correct place
to enable DIMM parity. Further patches to clarify the parity
setup process on Family 15h are forthcoming.
Change-Id: I5a3a4f1621e3048f9dfc159709410be9de6ebecd
---
src/northbridge/amd/amdmct/mct_ddr3/mct_d.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c b/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c
index bb12746..3582efa 100644
--- a/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c
+++ b/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c
@@ -5152,7 +5152,9 @@ static u8 AutoConfig_D(struct MCTStatStruc *pMCTstat,
if (Status & (1 << SB_Registered)) {
/* Registered DIMMs */
- DramConfigLo |= 1 << ParEn;
+ if (!is_fam15h()) {
+ DramConfigLo |= 1 << ParEn;
+ }
} else {
/* Unbuffered DIMMs */
DramConfigLo |= 1 << UnBuffDimm;
Timothy Pearson (tpearson(a)raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14273
-gerrit
commit 7e09b7a11cc6f547c4d267d01b8f9e148d4fa7e3
Author: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Date: Wed Apr 6 16:10:38 2016 -0500
nb/amd/mct_ddr3: Cache whether ECC is allowed at the platform level
Certain AMD platforms, such as those using the SP5100 southbridge,
contain a very poorly documented bug related to LPC ROM access,
which is triggered by repeated (hundreds or more) rapid calls to
get_option(). This bug manifests as a complete system deadlock
in ramstage device configuration, requiring standby power to be
removed from the system to release the deadlock.
Cache the platform ECC status to avoid repeated calls to get_option()
in the lane count detection logic.
Change-Id: I8b48c523218ccc8c113319957d6eca2d15e1070f
Signed-off-by: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
---
src/northbridge/amd/amdmct/mct_ddr3/mct_d.c | 11 ++++++++---
src/northbridge/amd/amdmct/mct_ddr3/mct_d.h | 1 +
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c b/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c
index 0b88331..f31fb3c 100644
--- a/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c
+++ b/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c
@@ -336,9 +336,8 @@ uint8_t is_ecc_enabled(struct MCTStatStruc *pMCTstat, struct DCTStatStruc *pDCTs
{
uint8_t ecc_enabled = 1;
- if (!mctGet_NVbits(NV_ECC_CAP) || !mctGet_NVbits(NV_ECC)) {
- return 0;
- }
+ if (!pMCTstat->try_ecc)
+ ecc_enabled = 0;
if (pDCTstat->NodePresent && pDCTstat->DIMMValid) {
if (!(pDCTstat->Status & (1 << SB_ECCDIMMs))) {
@@ -2659,6 +2658,12 @@ static void mctAutoInitMCT_D(struct MCTStatStruc *pMCTstat,
uint8_t s3resume = acpi_is_wakeup_s3();
restartinit:
+
+ if (!mctGet_NVbits(NV_ECC_CAP) || !mctGet_NVbits(NV_ECC))
+ pMCTstat->try_ecc = 0;
+ else
+ pMCTstat->try_ecc = 1;
+
mctInitMemGPIOs_A_D(); /* Set any required GPIOs*/
if (s3resume) {
printk(BIOS_DEBUG, "mctAutoInitMCT_D: mct_ForceNBPState0_En_Fam15\n");
diff --git a/src/northbridge/amd/amdmct/mct_ddr3/mct_d.h b/src/northbridge/amd/amdmct/mct_ddr3/mct_d.h
index 67eb2b4..a3a9439 100644
--- a/src/northbridge/amd/amdmct/mct_ddr3/mct_d.h
+++ b/src/northbridge/amd/amdmct/mct_ddr3/mct_d.h
@@ -300,6 +300,7 @@ struct MCTStatStruc {
u32 SysLimit; /* LIMIT[39:8] (system address)*/
uint32_t TSCFreq;
uint16_t nvram_checksum;
+ uint8_t try_ecc;
} __attribute__((packed));
/*=============================================================================
Timothy Pearson (tpearson(a)raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14263
-gerrit
commit 1816c2efea24995eea19989938fceea103a0e64c
Author: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Date: Wed Apr 6 13:18:52 2016 -0500
sb/amd/sb700: Add sb7xx_51xx_decode_last_reset()
The SB700 family has the ability to report the last reset
reason. This is useful in the context of handling MCEs
and recovering from fatal errors / sync floods.
Add a function to retrieve the last reset flags.
Change-Id: I754cb25e47bd9c1e4a29ecb6cb18017d1b7c3dc4
Signed-off-by: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
---
src/southbridge/amd/sb700/early_setup.c | 13 ++++++++++++-
src/southbridge/amd/sb700/sb700.h | 1 +
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/southbridge/amd/sb700/early_setup.c b/src/southbridge/amd/sb700/early_setup.c
index 8042849..ffdd34b 100644
--- a/src/southbridge/amd/sb700/early_setup.c
+++ b/src/southbridge/amd/sb700/early_setup.c
@@ -2,7 +2,7 @@
* This file is part of the coreboot project.
*
* Copyright (C) 2010 Advanced Micro Devices, Inc.
- * Copyright (C) 2015 Timothy Pearson <tpearson(a)raptorengineeringinc.com>, Raptor Engineering
+ * Copyright (C) 2015 - 2016 Raptor Engineering, LLC
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -758,6 +758,17 @@ static void sb700_por_init(void)
sb700_pmio_por_init();
}
+uint16_t sb7xx_51xx_decode_last_reset(void) {
+ uint16_t reset_status = 0;
+ reset_status |= pmio_read(0x44);
+ reset_status |= (pmio_read(0x45) << 8);
+ printk(BIOS_INFO, "sb700 reset flags: %04x\n", reset_status);
+ if (reset_status & (0x1 << 10))
+ printk(BIOS_WARNING, "WARNING: Last reset was caused by fatal error / sync flood!\n");
+
+ return reset_status;
+}
+
/*
* It should be called during early POST after memory detection and BIOS shadowing but before PCI bus enumeration.
*/
diff --git a/src/southbridge/amd/sb700/sb700.h b/src/southbridge/amd/sb700/sb700.h
index f895811..f23956c 100644
--- a/src/southbridge/amd/sb700/sb700.h
+++ b/src/southbridge/amd/sb700/sb700.h
@@ -66,6 +66,7 @@ void sb7xx_51xx_enable_wideio(u8 wio_index, u16 base);
void sb7xx_51xx_disable_wideio(u8 wio_index);
void sb7xx_51xx_early_setup(void);
void sb7xx_51xx_before_pci_init(void);
+uint16_t sb7xx_51xx_decode_last_reset(void);
#else
#include <device/pci.h>
/* allow override in mainboard.c */
Timothy Pearson (tpearson(a)raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14271
-gerrit
commit d00634f8346f09afc673f880eb75c0c258744522
Author: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Date: Wed Apr 6 22:19:43 2016 -0500
Revert "nb/amd/mct_ddr3: Enable DIMM parity when RDIMMs installed"
This reverts commit f961becc433bf23fc8744fdfd757f0cdb75c2c62.
On studying the BKDG more closely this is not the correct place
to enable DIMM parity. Further patches to clarify the parity
setup process on Family 15h are forthcoming.
Change-Id: I5a3a4f1621e3048f9dfc159709410be9de6ebecd
---
src/northbridge/amd/amdmct/mct_ddr3/mct_d.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c b/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c
index bb12746..3582efa 100644
--- a/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c
+++ b/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c
@@ -5152,7 +5152,9 @@ static u8 AutoConfig_D(struct MCTStatStruc *pMCTstat,
if (Status & (1 << SB_Registered)) {
/* Registered DIMMs */
- DramConfigLo |= 1 << ParEn;
+ if (!is_fam15h()) {
+ DramConfigLo |= 1 << ParEn;
+ }
} else {
/* Unbuffered DIMMs */
DramConfigLo |= 1 << UnBuffDimm;