Elyes HAOUAS has uploaded this change for review. ( https://review.coreboot.org/29034
Change subject: cpu/intel/fsp_model_206ax: [For Test] Use IA32_MCG_CAP to read num_banks ......................................................................
cpu/intel/fsp_model_206ax: [For Test] Use IA32_MCG_CAP to read num_banks
Change-Id: I3f3428ae2b7747d93487de9b49c8c4f651ef093b Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/cpu/intel/fsp_model_206ax/model_206ax_init.c 1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/29034/1
diff --git a/src/cpu/intel/fsp_model_206ax/model_206ax_init.c b/src/cpu/intel/fsp_model_206ax/model_206ax_init.c index 3eb07b0..b4d7030 100644 --- a/src/cpu/intel/fsp_model_206ax/model_206ax_init.c +++ b/src/cpu/intel/fsp_model_206ax/model_206ax_init.c @@ -241,10 +241,13 @@ { msr_t msr; int i; + int num_banks;
+ msr = rdmsr(IA32_MCG_CAP); + num_banks = msr.lo & 0xff; msr.lo = msr.hi = 0; /* This should only be done on a cold boot */ - for (i = 0; i < 7; i++) + for (i = 0; i < num_banks; i++) wrmsr(IA32_MC0_STATUS + (i * 4), msr); }