From cb26bd7a33c462a22194c9c4090f086b71aa6f50 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Tue, 19 Sep 2023 18:08:39 +0200 Subject: [PATCH] cpu/x86/mtrr/debug: rename variables in display_variable_mtrr Change the name of msr_a and msr_m to the more descriptive msr_base and msr_mask. Signed-off-by: Felix Held Change-Id: I6e0010f6d35ccf4288f4e0df8f51ea5f17c98b0f Reviewed-on: https://review.coreboot.org/c/coreboot/+/78007 Reviewed-by: Matt DeVillier Tested-by: build bot (Jenkins) --- src/cpu/x86/mtrr/debug.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/cpu/x86/mtrr/debug.c b/src/cpu/x86/mtrr/debug.c index ffaa2a1bb2..e8dfd8f748 100644 --- a/src/cpu/x86/mtrr/debug.c +++ b/src/cpu/x86/mtrr/debug.c @@ -101,25 +101,25 @@ static void display_variable_mtrr(int index, uint64_t address_mask) uint64_t base_address; uint64_t length; uint64_t mask; - const msr_t msr_a = rdmsr(MTRR_PHYS_BASE(index)); - const msr_t msr_m = rdmsr(MTRR_PHYS_MASK(index)); + const msr_t msr_base = rdmsr(MTRR_PHYS_BASE(index)); + const msr_t msr_mask = rdmsr(MTRR_PHYS_MASK(index)); - if (msr_m.raw & MTRR_PHYS_MASK_VALID) { - base_address = (msr_a.raw & 0xfffffffffffff000ULL) + if (msr_mask.raw & MTRR_PHYS_MASK_VALID) { + base_address = (msr_base.raw & 0xfffffffffffff000ULL) & address_mask; printk(BIOS_DEBUG, "0x%016llx: PHYBASE%d: Address = 0x%016llx, %s\n", - msr_a.raw, index, base_address, - display_mtrr_type(msr_a.raw & MTRR_DEF_TYPE_MASK)); - mask = (msr_m.raw & 0xfffffffffffff000ULL) & address_mask; + msr_base.raw, index, base_address, + display_mtrr_type(msr_base.raw & MTRR_DEF_TYPE_MASK)); + mask = (msr_mask.raw & 0xfffffffffffff000ULL) & address_mask; length = (~mask & address_mask) + 1; printk(BIOS_DEBUG, "0x%016llx: PHYMASK%d: Length = 0x%016llx, Valid\n", - msr_m.raw, index, length); + msr_mask.raw, index, length); } else { - printk(BIOS_DEBUG, "0x%016llx: PHYBASE%d\n", msr_a.raw, index); + printk(BIOS_DEBUG, "0x%016llx: PHYBASE%d\n", msr_base.raw, index); printk(BIOS_DEBUG, "0x%016llx: PHYMASK%d: Disabled\n", - msr_m.raw, index); + msr_mask.raw, index); } }