summaryrefslogtreecommitdiff
path: root/src/soc/amd
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/amd')
-rw-r--r--src/soc/amd/picasso/mca.c7
-rw-r--r--src/soc/amd/stoneyridge/mca.c7
2 files changed, 6 insertions, 8 deletions
diff --git a/src/soc/amd/picasso/mca.c b/src/soc/amd/picasso/mca.c
index acb248d2f4..65b1916112 100644
--- a/src/soc/amd/picasso/mca.c
+++ b/src/soc/amd/picasso/mca.c
@@ -2,6 +2,7 @@
#include <amdblocks/msr_zen.h>
#include <amdblocks/reset.h>
+#include <cpu/x86/lapic.h>
#include <cpu/x86/msr.h>
#include <acpi/acpi.h>
#include <soc/cpu.h>
@@ -160,10 +161,8 @@ void check_mca(void)
for (i = 0 ; i < num_banks ; i++) {
mci.sts = rdmsr(MCAX_STATUS_MSR(i));
if (mci.sts.hi || mci.sts.lo) {
- int core = cpuid_ebx(1) >> 24;
-
- printk(BIOS_WARNING, "#MC Error: core %d, bank %d %s\n",
- core, i,
+ printk(BIOS_WARNING, "#MC Error: core %u, bank %d %s\n",
+ initial_lapicid(), i,
i < ARRAY_SIZE(mca_bank_name) ? mca_bank_name[i] : "");
printk(BIOS_WARNING, " MC%d_STATUS = %08x_%08x\n",
diff --git a/src/soc/amd/stoneyridge/mca.c b/src/soc/amd/stoneyridge/mca.c
index db5fabc389..1523563d0c 100644
--- a/src/soc/amd/stoneyridge/mca.c
+++ b/src/soc/amd/stoneyridge/mca.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <amdblocks/reset.h>
+#include <cpu/x86/lapic.h>
#include <cpu/x86/msr.h>
#include <acpi/acpi.h>
#include <soc/cpu.h>
@@ -163,10 +164,8 @@ void check_mca(void)
mci.sts = rdmsr(IA32_MC0_STATUS + (i * 4));
if (mci.sts.hi || mci.sts.lo) {
- int core = cpuid_ebx(1) >> 24;
-
- printk(BIOS_WARNING, "#MC Error: core %d, bank %d %s\n",
- core, i, mca_bank_name[i]);
+ printk(BIOS_WARNING, "#MC Error: core %u, bank %d %s\n",
+ initial_lapicid(), i, mca_bank_name[i]);
printk(BIOS_WARNING, " MC%d_STATUS = %08x_%08x\n",
i, mci.sts.hi, mci.sts.lo);