Attention is currently required from: Jason Glenesk, Raul Rangel, Marshall Dawson. Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/56276 )
Change subject: soc/amd/picasso: implement and use mca_get_bank_name ......................................................................
soc/amd/picasso: implement and use mca_get_bank_name
Change-Id: I42abff5efcd7c85d2932a7aaacc736d0376cfaa0 Signed-off-by: Felix Held felix-coreboot@felixheld.de --- M src/soc/amd/picasso/mca.c 1 file changed, 9 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/56276/1
diff --git a/src/soc/amd/picasso/mca.c b/src/soc/amd/picasso/mca.c index 740e974..89088f0 100644 --- a/src/soc/amd/picasso/mca.c +++ b/src/soc/amd/picasso/mca.c @@ -165,12 +165,20 @@ return (bank < ARRAY_SIZE(mca_bank_name) && mca_bank_name[bank] != NULL); }
+static const char *mca_get_bank_name(unsigned int bank) +{ + if (mca_is_valid_bank(bank)) + return mca_bank_name[bank]; + else + return ""; +} + static void mca_print_error(unsigned int bank) { msr_t msr;
printk(BIOS_WARNING, "#MC Error: core %u, bank %u %s\n", initial_lapicid(), bank, - bank < ARRAY_SIZE(mca_bank_name) ? mca_bank_name[bank] : ""); + mca_get_bank_name(bank));
msr = rdmsr(MCAX_STATUS_MSR(bank)); printk(BIOS_WARNING, " MC%u_STATUS = %08x_%08x\n", bank, msr.hi, msr.lo);