diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/cpu/amd/msr.h | 3 | ||||
-rw-r--r-- | src/soc/amd/stoneyridge/mca.c | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/include/cpu/amd/msr.h b/src/include/cpu/amd/msr.h index 9edea5a06b..55a7841e7e 100644 --- a/src/include/cpu/amd/msr.h +++ b/src/include/cpu/amd/msr.h @@ -19,8 +19,7 @@ #define NB_CFG_MSR 0xC001001f #define FidVidStatus 0xC0010042 #define MC0_CTL_MASK 0xC0010044 -#define MC1_CTL_MASK 0xC0010045 -#define MC4_CTL_MASK 0xC0010048 +#define MC_CTL_MASK(bank) (MC0_CTL_MASK + (bank)) #define MSR_INTPEND 0xC0010055 #define MMIO_CONF_BASE 0xC0010058 #define MMIO_RANGE_EN (1 << 0) diff --git a/src/soc/amd/stoneyridge/mca.c b/src/soc/amd/stoneyridge/mca.c index 598bfb5d53..d9aac913e9 100644 --- a/src/soc/amd/stoneyridge/mca.c +++ b/src/soc/amd/stoneyridge/mca.c @@ -123,8 +123,7 @@ static void build_bert_mca_error(struct mca_bank_status *mci) ctx = cper_new_ia32x64_context_msr(status, x86_sec, IA32_MC_CTL(mci->bank), 4); if (!ctx) goto failed; - ctx = cper_new_ia32x64_context_msr(status, x86_sec, - MC0_CTL_MASK + mci->bank, 1); + ctx = cper_new_ia32x64_context_msr(status, x86_sec, MC_CTL_MASK(mci->bank), 1); if (!ctx) goto failed; @@ -160,7 +159,7 @@ static void mca_print_error(unsigned int bank) printk(BIOS_WARNING, " MC%u_MISC = %08x_%08x\n", bank, msr.hi, msr.lo); msr = rdmsr(IA32_MC_CTL(bank)); printk(BIOS_WARNING, " MC%u_CTL = %08x_%08x\n", bank, msr.hi, msr.lo); - msr = rdmsr(MC0_CTL_MASK + bank); + msr = rdmsr(MC_CTL_MASK(bank)); printk(BIOS_WARNING, " MC%u_CTL_MASK = %08x_%08x\n", bank, msr.hi, msr.lo); } |