summaryrefslogtreecommitdiff
path: root/src/northbridge/amd/amdmct
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineeringinc.com>2015-08-09 02:47:51 -0500
committerMartin Roth <martinroth@google.com>2015-11-24 19:27:43 +0100
commit68130f506df5c77107ece8d71aa45b598be77b45 (patch)
treefef16b57eadc6b180f97e4c5cc392d195d3cc239 /src/northbridge/amd/amdmct
parentb174667534c327b8558ff04986a2c1a971b7f04e (diff)
amd/amdfam10: Control Fam15h cache partitioning via nvram
Add options to control cache partitioning and overall memory performance via nvram. Change-Id: I3dd5d7f3640aee0395a68645c0242307605d3ce7 Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com> Reviewed-on: http://review.coreboot.org/12041 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/northbridge/amd/amdmct')
-rw-r--r--src/northbridge/amd/amdmct/mct_ddr3/mct_d.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c b/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c
index aad813a056..a6cc70f9f5 100644
--- a/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c
+++ b/src/northbridge/amd/amdmct/mct_ddr3/mct_d.c
@@ -5559,6 +5559,14 @@ static void mct_FinalMCT_D(struct MCTStatStruc *pMCTstat,
mct_ExtMCTConfig_Dx(pDCTstat);
} else {
/* Family 15h CPUs */
+ uint8_t nvram;
+ uint8_t enable_experimental_memory_speed_boost;
+
+ /* Check to see if cache partitioning is allowed */
+ enable_experimental_memory_speed_boost = 0;
+ if (get_option(&nvram, "experimental_memory_speed_boost") == CB_SUCCESS)
+ enable_experimental_memory_speed_boost = !!nvram;
+
val = 0x0ce00f00; /* FlushWrOnStpGnt = 0x0 */
val |= 0x10 << 2; /* MctWrLimit = 0x10 */
val |= 0x1; /* DctWrLimit = 0x1 */
@@ -5572,7 +5580,8 @@ static void mct_FinalMCT_D(struct MCTStatStruc *pMCTstat,
val &= ~(0x7 << 8); /* CohPrefPrbLmt = 0x1 */
val |= (0x1 << 8);
val |= (0x1 << 12); /* EnSplitDctLimits = 0x1 */
- val |= (0x1 << 20); /* DblPrefEn = 0x1 */
+ if (enable_experimental_memory_speed_boost)
+ val |= (0x1 << 20); /* DblPrefEn = 0x1 */
val |= (0x7 << 22); /* PrefFourConf = 0x7 */
val |= (0x7 << 25); /* PrefFiveConf = 0x7 */
val &= ~(0xf << 28); /* DcqBwThrotWm = 0x0 */