summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2017-09-12 10:36:49 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2017-09-13 17:26:27 +0000
commita097fb8fff28232e77aa8398edcb7810bbd72b44 (patch)
tree84a7adb705a0226fb204f673954b1872cc26c4ec /src/arch
parent7673f2f5e9dab30c655d2d76d76394dd750459a6 (diff)
downloadcoreboot-a097fb8fff28232e77aa8398edcb7810bbd72b44.tar.xz
arch/x86: Fix typo with MTRR
Change-Id: I67a470c2c2a659d5355fdd0939d0572c1ff3e291 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/21519 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/include/arch/cpu.h4
-rw-r--r--src/arch/x86/postcar_loader.c14
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;
}