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 <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56312
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Felix Held 2021-07-14 18:19:41 +02:00
parent d1d6479ddf
commit b97f953fcc
1 changed files with 6 additions and 1 deletions

View File

@ -9,6 +9,11 @@
#include <types.h> #include <types.h>
#include "mca_common_defs.h" #include "mca_common_defs.h"
static bool mca_skip_check(void)
{
return !is_warm_reset();
}
static void mca_print_error(unsigned int bank) static void mca_print_error(unsigned int bank)
{ {
msr_t msr; msr_t msr;
@ -36,7 +41,7 @@ void mca_check_all_banks(void)
if (!mca_has_expected_bank_count()) if (!mca_has_expected_bank_count())
printk(BIOS_WARNING, "CPU has an unexpected number of MCA banks!\n"); printk(BIOS_WARNING, "CPU has an unexpected number of MCA banks!\n");
if (!is_warm_reset()) if (mca_skip_check())
return; return;
for (unsigned int i = 0 ; i < num_banks ; i++) { for (unsigned int i = 0 ; i < num_banks ; i++) {