diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2021-07-13 16:47:57 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-07-14 17:33:58 +0000 |
commit | cb457aca41bcdd77b203acbcc3546923179b3764 (patch) | |
tree | e16b3c3142a18210bd8e59e893a15a6c0562e567 /src/soc/amd/picasso | |
parent | acbf1541eeedec58ce8a31c6847b2296f40bf4bd (diff) |
soc/amd/picasso/mca: use mca_clear_status()
Since we can use both the old MCA registers and the new MCAX registers
to access the MCA status registers, we can use the common
mca_clear_status function here.
Change-Id: I9ddcc119eca2659361b1496fd7ffe124fb323d26
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56260
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'src/soc/amd/picasso')
-rw-r--r-- | src/soc/amd/picasso/mca.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/soc/amd/picasso/mca.c b/src/soc/amd/picasso/mca.c index 973b3b5277..23d7b61735 100644 --- a/src/soc/amd/picasso/mca.c +++ b/src/soc/amd/picasso/mca.c @@ -181,19 +181,11 @@ static void mca_check_all_banks(void) } } -static void mca_clear_errors(void) -{ - const unsigned int num_banks = mca_get_bank_count(); - const msr_t msr = {.lo = 0, .hi = 0}; - - /* Zero all machine check error status registers */ - for (unsigned int i = 0 ; i < num_banks ; i++) - wrmsr(MCAX_STATUS_MSR(i), msr); -} - /* Check the Machine Check Architecture Extension registers */ void check_mca(void) { mca_check_all_banks(); - mca_clear_errors(); + /* mca_clear_status uses the MCA registers and not the MCAX ones. Since they are + aliases, we can use either set of registers. */ + mca_clear_status(); } |