From 5c5c4a694314d9b2a6d085fb97770d0ee12cc17c Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 29 Oct 2015 01:33:25 -0500 Subject: cpu/amd/model_fxx: Clear out unused / stale MTRRs in ramstage This mirrors a similar commit made to Family 10h support in changeset 11966 file model_10xxx_init.c TEST: Booted ASS KFSN4-DRE with 1x Opteron 8222 Change-Id: I760ef27be00aed11c0ac21b9bd741189f4b05834 Signed-off-by: Timothy Pearson Reviewed-on: http://review.coreboot.org/12250 Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/cpu/amd/model_fxx/model_fxx_init.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/cpu') diff --git a/src/cpu/amd/model_fxx/model_fxx_init.c b/src/cpu/amd/model_fxx/model_fxx_init.c index db936f8933..93fa07f961 100644 --- a/src/cpu/amd/model_fxx/model_fxx_init.c +++ b/src/cpu/amd/model_fxx/model_fxx_init.c @@ -460,6 +460,18 @@ static void model_fxx_init(device_t dev) /* Turn on caching if we haven't already */ x86_enable_cache(); + + /* Initialize all variable MTRRs except the first pair */ + msr.hi = 0x00000000; + msr.lo = 0x00000000; + + disable_cache(); + + for (i = 0x2; i < 0x10; i++) { + wrmsr(0x00000200 | i, msr); + } + + enable_cache(); amd_setup_mtrrs(); x86_mtrr_check(); -- cgit v1.2.3