From 1e1d490ff885206dfb30dbd7a3dfeffa818afdb6 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Wed, 14 Jul 2021 00:05:39 +0200 Subject: soc/amd: factor out check_mca to common code Change-Id: I139d1fe41bad5213da8890c2867f275b6847e3e1 Signed-off-by: Felix Held Reviewed-on: https://review.coreboot.org/c/coreboot/+/56281 Reviewed-by: Martin Roth Tested-by: build bot (Jenkins) --- src/soc/amd/common/block/cpu/mca/Makefile.inc | 1 + src/soc/amd/common/block/cpu/mca/mca_common.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 src/soc/amd/common/block/cpu/mca/Makefile.inc create mode 100644 src/soc/amd/common/block/cpu/mca/mca_common.c (limited to 'src/soc/amd/common/block/cpu/mca') diff --git a/src/soc/amd/common/block/cpu/mca/Makefile.inc b/src/soc/amd/common/block/cpu/mca/Makefile.inc new file mode 100644 index 0000000000..0aa47e161c --- /dev/null +++ b/src/soc/amd/common/block/cpu/mca/Makefile.inc @@ -0,0 +1 @@ +ramstage-$(CONFIG_SOC_AMD_COMMON_BLOCK_MCA_COMMON) += mca_common.c diff --git a/src/soc/amd/common/block/cpu/mca/mca_common.c b/src/soc/amd/common/block/cpu/mca/mca_common.c new file mode 100644 index 0000000000..0a375089f2 --- /dev/null +++ b/src/soc/amd/common/block/cpu/mca/mca_common.c @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include + +void check_mca(void) +{ + mca_check_all_banks(); + /* mca_clear_status uses the MCA registers which can be used in both the MCA and MCAX + case */ + mca_clear_status(); +} -- cgit v1.2.3