summaryrefslogtreecommitdiff
path: root/src/cpu/x86
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2022-12-15 00:44:54 +0100
committerFelix Held <felix-coreboot@felixheld.de>2022-12-16 00:30:12 +0000
commitca261091eb1f1b676710e1b68a0a595be53840ac (patch)
tree66bc241fcd0fcc60700a03326259a67f03ad3475 /src/cpu/x86
parent08529918fcc11fde87e3a78dab0fe73e72b04de5 (diff)
cpu/x86/mtrr: rename local cpu_idx variable and make it const
After the previous patch this local variable is no longer the mpinit CPU index, but the LAPIC ID, so rename it. Since it will only be set once, it can also be marked as const. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I4fad4e1095478213727bee8586852f9d5a7d18e9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/70798 Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Diffstat (limited to 'src/cpu/x86')
-rw-r--r--src/cpu/x86/mtrr/mtrr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cpu/x86/mtrr/mtrr.c b/src/cpu/x86/mtrr/mtrr.c
index 744090a76d..d156d4112d 100644
--- a/src/cpu/x86/mtrr/mtrr.c
+++ b/src/cpu/x86/mtrr/mtrr.c
@@ -292,7 +292,7 @@ static void commit_fixed_mtrrs(void)
int j;
int msr_num;
int type_index;
- unsigned int cpu_idx = lapicid();
+ const unsigned int lapic_id = lapicid();
/* 8 ranges per msr. */
msr_t fixed_msrs[NUM_FIXED_MTRRS];
unsigned long msr_index[NUM_FIXED_MTRRS];
@@ -337,7 +337,7 @@ static void commit_fixed_mtrrs(void)
for (i = 0; i < ARRAY_SIZE(fixed_msrs); i++)
printk(BIOS_DEBUG, "apic_id 0x%x: MTRR: Fixed MSR 0x%lx 0x%08x%08x\n",
- cpu_idx, msr_index[i], fixed_msrs[i].hi, fixed_msrs[i].lo);
+ lapic_id, msr_index[i], fixed_msrs[i].hi, fixed_msrs[i].lo);
disable_cache();
for (i = 0; i < ARRAY_SIZE(fixed_msrs); i++)