summaryrefslogtreecommitdiff
path: root/src/soc/amd/stoneyridge/mca.c
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2021-07-12 21:53:23 +0200
committerFelix Held <felix-coreboot@felixheld.de>2021-07-14 02:22:30 +0000
commit82af7491c267bfd74c6c3c4f63fe091b10814fb1 (patch)
tree94f692712044671e33e072ca1b73ed00252ffefd /src/soc/amd/stoneyridge/mca.c
parent5183abd3123586d8daed9f0878cbc521b74c46ff (diff)
soc/amd/picasso,stoneyridge/mca: use unsigned int for MCA bank number
Change-Id: Ib31075fd615eaa8492ce0179b3b21317554f1c80 Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/56238 Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/stoneyridge/mca.c')
-rw-r--r--src/soc/amd/stoneyridge/mca.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/soc/amd/stoneyridge/mca.c b/src/soc/amd/stoneyridge/mca.c
index 4c9d9b17aa..942508918e 100644
--- a/src/soc/amd/stoneyridge/mca.c
+++ b/src/soc/amd/stoneyridge/mca.c
@@ -10,7 +10,7 @@
#include <cper.h>
struct mca_bank_status {
- int bank;
+ unsigned int bank;
msr_t sts;
};
@@ -147,7 +147,7 @@ static const char *const mca_bank_name[] = {
void check_mca(void)
{
- int i;
+ unsigned int i;
struct mca_bank_status mci;
msr_t msr;
const unsigned int num_banks = mca_get_bank_count();
@@ -159,22 +159,22 @@ void check_mca(void)
mci.sts = rdmsr(IA32_MC0_STATUS + (i * 4));
if (mci.sts.hi || mci.sts.lo) {
- printk(BIOS_WARNING, "#MC Error: core %u, bank %d %s\n",
+ printk(BIOS_WARNING, "#MC Error: core %u, bank %u %s\n",
initial_lapicid(), i, mca_bank_name[i]);
- printk(BIOS_WARNING, " MC%d_STATUS = %08x_%08x\n",
+ printk(BIOS_WARNING, " MC%u_STATUS = %08x_%08x\n",
i, mci.sts.hi, mci.sts.lo);
msr = rdmsr(IA32_MC0_ADDR + (i * 4));
- printk(BIOS_WARNING, " MC%d_ADDR = %08x_%08x\n",
+ printk(BIOS_WARNING, " MC%u_ADDR = %08x_%08x\n",
i, msr.hi, msr.lo);
msr = rdmsr(IA32_MC0_MISC + (i * 4));
- printk(BIOS_WARNING, " MC%d_MISC = %08x_%08x\n",
+ printk(BIOS_WARNING, " MC%u_MISC = %08x_%08x\n",
i, msr.hi, msr.lo);
msr = rdmsr(IA32_MC0_CTL + (i * 4));
- printk(BIOS_WARNING, " MC%d_CTL = %08x_%08x\n",
+ printk(BIOS_WARNING, " MC%u_CTL = %08x_%08x\n",
i, msr.hi, msr.lo);
msr = rdmsr(MC0_CTL_MASK + i);
- printk(BIOS_WARNING, " MC%d_CTL_MASK = %08x_%08x\n",
+ printk(BIOS_WARNING, " MC%u_CTL_MASK = %08x_%08x\n",
i, msr.hi, msr.lo);
mci.bank = i;