soc/amd/picasso: implement and use mca_get_bank_name
Change-Id: I42abff5efcd7c85d2932a7aaacc736d0376cfaa0 Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/56276 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
This commit is contained in:
parent
040d7646bc
commit
b04148aa56
1 changed files with 9 additions and 1 deletions
|
|
@ -165,12 +165,20 @@ static bool mca_is_valid_bank(unsigned int bank)
|
|||
return (bank < ARRAY_SIZE(mca_bank_name) && mca_bank_name[bank] != NULL);
|
||||
}
|
||||
|
||||
static const char *mca_get_bank_name(unsigned int bank)
|
||||
{
|
||||
if (mca_is_valid_bank(bank))
|
||||
return mca_bank_name[bank];
|
||||
else
|
||||
return "";
|
||||
}
|
||||
|
||||
static void mca_print_error(unsigned int bank)
|
||||
{
|
||||
msr_t msr;
|
||||
|
||||
printk(BIOS_WARNING, "#MC Error: core %u, bank %u %s\n", initial_lapicid(), bank,
|
||||
bank < ARRAY_SIZE(mca_bank_name) ? mca_bank_name[bank] : "");
|
||||
mca_get_bank_name(bank));
|
||||
|
||||
msr = rdmsr(MCAX_STATUS_MSR(bank));
|
||||
printk(BIOS_WARNING, " MC%u_STATUS = %08x_%08x\n", bank, msr.hi, msr.lo);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue