From b97f953fcccb829f8a266a77eb05d588ac429c15 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Wed, 14 Jul 2021 18:19:41 +0200 Subject: [PATCH] soc/amd/common/block/cpu/mca/mca: factor out mca_skip_check This will allow moving mca_check_all_banks to mca_common.c. Change-Id: I58e100c1447907bab984a2fdff6c6e0181910c23 Signed-off-by: Felix Held Reviewed-on: https://review.coreboot.org/c/coreboot/+/56312 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/soc/amd/common/block/cpu/mca/mca.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/soc/amd/common/block/cpu/mca/mca.c b/src/soc/amd/common/block/cpu/mca/mca.c index b5fd6a29df..1c3a30cf56 100644 --- a/src/soc/amd/common/block/cpu/mca/mca.c +++ b/src/soc/amd/common/block/cpu/mca/mca.c @@ -9,6 +9,11 @@ #include #include "mca_common_defs.h" +static bool mca_skip_check(void) +{ + return !is_warm_reset(); +} + static void mca_print_error(unsigned int bank) { msr_t msr; @@ -36,7 +41,7 @@ void mca_check_all_banks(void) if (!mca_has_expected_bank_count()) printk(BIOS_WARNING, "CPU has an unexpected number of MCA banks!\n"); - if (!is_warm_reset()) + if (mca_skip_check()) return; for (unsigned int i = 0 ; i < num_banks ; i++) {