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 <tpearson@raptorengineeringinc.com>
Reviewed-on: http://review.coreboot.org/12250
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Timothy Pearson 2015-10-29 01:33:25 -05:00 committed by Patrick Georgi
parent e3b5d36321
commit 5c5c4a6943
1 changed files with 12 additions and 0 deletions

View File

@ -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();