src: Use initial_lapicid() instead of open coding it
Since initial_lapicid() returns an unsigned int, change the type of the local variables the return value gets assigned to to unsigned int as well if applicable. Also change the printk format strings for printing the variable's contents to %u where it was %d before. Change-Id: I289015b81b2a9d915c4cab9b0544fc19b85df7a3 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55063 Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
committed by
Felix Held
parent
53ea1d44f0
commit
78ab06ace9
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user