Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/56242 )
Change subject: soc/amd/stoneyridge/mca: refactor warm boot check in mca_check_all_banks ......................................................................
soc/amd/stoneyridge/mca: refactor warm boot check in mca_check_all_banks
Change-Id: Id0cf8269d1b695e05c55f33af92978b8244090fa Signed-off-by: Felix Held felix-coreboot@felixheld.de --- M src/soc/amd/stoneyridge/mca.c 1 file changed, 12 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/56242/1
diff --git a/src/soc/amd/stoneyridge/mca.c b/src/soc/amd/stoneyridge/mca.c index 9ba201e..920ee7d 100644 --- a/src/soc/amd/stoneyridge/mca.c +++ b/src/soc/amd/stoneyridge/mca.c @@ -169,19 +169,20 @@ struct mca_bank_status mci; const unsigned int num_banks = mca_get_bank_count();
- if (is_warm_reset()) { - for (unsigned int i = 0 ; i < num_banks ; i++) { - if (i == 3) /* Reserved in Family 15h */ - continue; + if (!is_warm_reset()) + return;
- mci.bank = i; - mci.sts = rdmsr(IA32_MC0_STATUS + (i * 4)); - if (mci.sts.hi || mci.sts.lo) { - mca_print_error(i); + for (unsigned int i = 0 ; i < num_banks ; i++) { + if (i == 3) /* Reserved in Family 15h */ + continue;
- if (CONFIG(ACPI_BERT) && mca_valid(mci.sts)) - build_bert_mca_error(&mci); - } + mci.bank = i; + mci.sts = rdmsr(IA32_MC0_STATUS + (i * 4)); + if (mci.sts.hi || mci.sts.lo) { + mca_print_error(i); + + if (CONFIG(ACPI_BERT) && mca_valid(mci.sts)) + build_bert_mca_error(&mci); } } }