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>
This commit is contained in:
parent
acbf1541ee
commit
cb457aca41
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue