From a097fb8fff28232e77aa8398edcb7810bbd72b44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Tue, 12 Sep 2017 10:36:49 +0300 Subject: [PATCH] arch/x86: Fix typo with MTRR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I67a470c2c2a659d5355fdd0939d0572c1ff3e291 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/21519 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Sumeet R Pawnikar Reviewed-by: Paul Menzel Reviewed-by: Philippe Mathieu-Daudé --- src/arch/x86/include/arch/cpu.h | 4 ++-- src/arch/x86/postcar_loader.c | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/arch/x86/include/arch/cpu.h b/src/arch/x86/include/arch/cpu.h index ceee7f8366..1cba0affa9 100644 --- a/src/arch/x86/include/arch/cpu.h +++ b/src/arch/x86/include/arch/cpu.h @@ -261,8 +261,8 @@ asmlinkage void car_stage_entry(void); struct postcar_frame { uintptr_t stack; uint32_t upper_mask; - int max_var_mttrs; - int num_var_mttrs; + int max_var_mtrrs; + int num_var_mtrrs; }; /* diff --git a/src/arch/x86/postcar_loader.c b/src/arch/x86/postcar_loader.c index 0d2f0b59b5..55232380fc 100644 --- a/src/arch/x86/postcar_loader.c +++ b/src/arch/x86/postcar_loader.c @@ -39,8 +39,8 @@ static void postcar_frame_prepare(struct postcar_frame *pcf) msr = rdmsr(MTRR_CAP_MSR); pcf->upper_mask = (1 << (cpu_phys_address_size() - 32)) - 1; - pcf->max_var_mttrs = msr.lo & MTRR_CAP_VCNT; - pcf->num_var_mttrs = 0; + pcf->max_var_mtrrs = msr.lo & MTRR_CAP_VCNT; + pcf->num_var_mtrrs = 0; } int postcar_frame_init(struct postcar_frame *pcf, size_t stack_size) @@ -82,9 +82,9 @@ void postcar_frame_add_mtrr(struct postcar_frame *pcf, uint32_t size_msb; uint32_t mtrr_size; - if (pcf->num_var_mttrs >= pcf->max_var_mttrs) { + if (pcf->num_var_mtrrs >= pcf->max_var_mtrrs) { printk(BIOS_ERR, "No more variable MTRRs: %d\n", - pcf->max_var_mttrs); + pcf->max_var_mtrrs); return; } @@ -106,7 +106,7 @@ void postcar_frame_add_mtrr(struct postcar_frame *pcf, stack_push(pcf, ~(mtrr_size - 1) | MTRR_PHYS_MASK_VALID); stack_push(pcf, 0); stack_push(pcf, addr | type); - pcf->num_var_mttrs++; + pcf->num_var_mtrrs++; size -= mtrr_size; addr += mtrr_size; @@ -119,8 +119,8 @@ void *postcar_commit_mtrrs(struct postcar_frame *pcf) * Place the number of used variable MTRRs on stack then max number * of variable MTRRs supported in the system. */ - stack_push(pcf, pcf->num_var_mttrs); - stack_push(pcf, pcf->max_var_mttrs); + stack_push(pcf, pcf->num_var_mtrrs); + stack_push(pcf, pcf->max_var_mtrrs); return (void *) pcf->stack; }