cpu/x86/mtrr/mtrr: fix printk format strings
Commit 4c3749884d
("cpu/x86/mtrr: Print cpu index number when set up
MTRRs for BSP/APs") added the CPU index number to some prints, but used
%x as format specifier. The cpu_index() call however has a return type
of unsigned long, so %lx needs to be used instead. For consistency, also
change the type of the cpu_idx local variable in commit_fixed_mtrrs to
unsigned long and adjust the printk format specifier accordingly.
TEST=The code builds again on my computer
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I4b68f8355932b2b75db5f453a0a735185b24b02f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70664
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
d3690ee19c
commit
b3261661c7
|
@ -291,7 +291,7 @@ static void commit_fixed_mtrrs(void)
|
||||||
int j;
|
int j;
|
||||||
int msr_num;
|
int msr_num;
|
||||||
int type_index;
|
int type_index;
|
||||||
int cpu_idx = cpu_index();
|
unsigned long cpu_idx = cpu_index();
|
||||||
/* 8 ranges per msr. */
|
/* 8 ranges per msr. */
|
||||||
msr_t fixed_msrs[NUM_FIXED_MTRRS];
|
msr_t fixed_msrs[NUM_FIXED_MTRRS];
|
||||||
unsigned long msr_index[NUM_FIXED_MTRRS];
|
unsigned long msr_index[NUM_FIXED_MTRRS];
|
||||||
|
@ -335,7 +335,7 @@ static void commit_fixed_mtrrs(void)
|
||||||
ASSERT(msr_num == NUM_FIXED_MTRRS)
|
ASSERT(msr_num == NUM_FIXED_MTRRS)
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(fixed_msrs); i++)
|
for (i = 0; i < ARRAY_SIZE(fixed_msrs); i++)
|
||||||
printk(BIOS_DEBUG, "CPU 0x%x: MTRR: Fixed MSR 0x%lx 0x%08x%08x\n",
|
printk(BIOS_DEBUG, "CPU 0x%lx: MTRR: Fixed MSR 0x%lx 0x%08x%08x\n",
|
||||||
cpu_idx, msr_index[i], fixed_msrs[i].hi, fixed_msrs[i].lo);
|
cpu_idx, msr_index[i], fixed_msrs[i].hi, fixed_msrs[i].lo);
|
||||||
|
|
||||||
disable_cache();
|
disable_cache();
|
||||||
|
@ -355,7 +355,7 @@ void x86_setup_fixed_mtrrs(void)
|
||||||
{
|
{
|
||||||
x86_setup_fixed_mtrrs_no_enable();
|
x86_setup_fixed_mtrrs_no_enable();
|
||||||
|
|
||||||
printk(BIOS_SPEW, "CPU 0x%x call enable_fixed_mtrr()\n", cpu_index());
|
printk(BIOS_SPEW, "CPU 0x%lx call enable_fixed_mtrr()\n", cpu_index());
|
||||||
enable_fixed_mtrr();
|
enable_fixed_mtrr();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -807,7 +807,7 @@ static void _x86_setup_mtrrs(unsigned int above4gb)
|
||||||
|
|
||||||
x86_setup_fixed_mtrrs();
|
x86_setup_fixed_mtrrs();
|
||||||
address_size = cpu_phys_address_size();
|
address_size = cpu_phys_address_size();
|
||||||
printk(BIOS_DEBUG, "CPU 0x%x setup mtrr for CPU physical address size: %d bits\n",
|
printk(BIOS_DEBUG, "CPU 0x%lx setup mtrr for CPU physical address size: %d bits\n",
|
||||||
cpu_index(), address_size);
|
cpu_index(), address_size);
|
||||||
x86_setup_var_mtrrs(address_size, above4gb);
|
x86_setup_var_mtrrs(address_size, above4gb);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue