summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cpu/intel/haswell/haswell_init.c5
-rw-r--r--src/cpu/intel/model_2065x/model_2065x_init.c3
-rw-r--r--src/cpu/intel/model_206ax/model_206ax_init.c5
3 files changed, 4 insertions, 9 deletions
diff --git a/src/cpu/intel/haswell/haswell_init.c b/src/cpu/intel/haswell/haswell_init.c
index 2d8bd152d7..29c663e2e7 100644
--- a/src/cpu/intel/haswell/haswell_init.c
+++ b/src/cpu/intel/haswell/haswell_init.c
@@ -520,10 +520,7 @@ static void configure_mca(void)
{
msr_t msr;
int i;
- int num_banks;
-
- msr = rdmsr(IA32_MCG_CAP);
- num_banks = msr.lo & 0xff;
+ const unsigned int num_banks = mca_get_bank_count();
/* Enable all error reporting */
msr.lo = msr.hi = ~0;
diff --git a/src/cpu/intel/model_2065x/model_2065x_init.c b/src/cpu/intel/model_2065x/model_2065x_init.c
index abf8f610b9..fe5ac56e65 100644
--- a/src/cpu/intel/model_2065x/model_2065x_init.c
+++ b/src/cpu/intel/model_2065x/model_2065x_init.c
@@ -77,10 +77,11 @@ static void configure_mca(void)
{
msr_t msr;
int i;
+ const unsigned int num_banks = mca_get_bank_count();
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_MC_STATUS(i), msr);
}
diff --git a/src/cpu/intel/model_206ax/model_206ax_init.c b/src/cpu/intel/model_206ax/model_206ax_init.c
index bfe1fa57dc..541cb3bc67 100644
--- a/src/cpu/intel/model_206ax/model_206ax_init.c
+++ b/src/cpu/intel/model_206ax/model_206ax_init.c
@@ -301,10 +301,7 @@ static void configure_mca(void)
{
msr_t msr;
int i;
- int num_banks;
-
- msr = rdmsr(IA32_MCG_CAP);
- num_banks = msr.lo & 0xff;
+ const unsigned int num_banks = mca_get_bank_count();
msr.lo = msr.hi = 0;
/* This should only be done on a cold boot */