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/+/56274 )
Change subject: soc/amd/picasso: check length of mca_bank_name array ......................................................................
soc/amd/picasso: check length of mca_bank_name array
The length of mca_bank_name should match the return value of mca_get_bank_count which gets the number of MCA banks from an MSR.
TEST=No error message on serial console on amd/mandolin
Change-Id: Ibdad51a7ef27266e110dfbb43188361952618342 Signed-off-by: Felix Held felix-coreboot@felixheld.de --- M src/soc/amd/picasso/mca.c 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/74/56274/1
diff --git a/src/soc/amd/picasso/mca.c b/src/soc/amd/picasso/mca.c index 69864a5..2b1e1b2 100644 --- a/src/soc/amd/picasso/mca.c +++ b/src/soc/amd/picasso/mca.c @@ -184,6 +184,9 @@ struct mca_bank_status mci; const unsigned int num_banks = mca_get_bank_count();
+ if (ARRAY_SIZE(mca_bank_name) != num_banks) + printk(BIOS_WARNING, "CPU has an unexpected number of MCA banks!\n"); + for (unsigned int i = 0 ; i < num_banks ; i++) { mci.bank = i; mci.sts = rdmsr(MCAX_STATUS_MSR(i));