summaryrefslogtreecommitdiffstats
path: root/src/soc/amd/stoneyridge
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2021-07-12 23:13:45 +0200
committerFelix Held <felix-coreboot@felixheld.de>2021-07-14 02:24:14 +0000
commite3f7ef22864402e72e1fa6c1df3bc79199c40bdc (patch)
tree7158ebfd1e47a9b97aef1a5255fc70d177f8adc4 /src/soc/amd/stoneyridge
parent2927a66dc9cc1703d937535cb835701f4145ca61 (diff)
downloadcoreboot-e3f7ef22864402e72e1fa6c1df3bc79199c40bdc.tar.gz
coreboot-e3f7ef22864402e72e1fa6c1df3bc79199c40bdc.tar.bz2
coreboot-e3f7ef22864402e72e1fa6c1df3bc79199c40bdc.zip
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> Reviewed-on: https://review.coreboot.org/c/coreboot/+/56242 Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/stoneyridge')
-rw-r--r--src/soc/amd/stoneyridge/mca.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/soc/amd/stoneyridge/mca.c b/src/soc/amd/stoneyridge/mca.c
index 9ba201ea28ee..920ee7d515b9 100644
--- a/src/soc/amd/stoneyridge/mca.c
+++ b/src/soc/amd/stoneyridge/mca.c
@@ -169,19 +169,20 @@ static void mca_check_all_banks(void)
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;
-
- 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);
- }
+ if (!is_warm_reset())
+ return;
+
+ for (unsigned int i = 0 ; i < num_banks ; i++) {
+ if (i == 3) /* Reserved in Family 15h */
+ continue;
+
+ 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);
}
}
}