summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-06-28 02:51:01 +0300
committerBin Meng <bmeng.cn@gmail.com>2021-07-15 14:50:00 +0300
commit92873f83d19fa8cedcace2b4c384e6b89ffd5faf (patch)
tree831b4cb5c7d2d7a4e97485b91ba6a291c08db3bd /arch/x86
parentbca2d579f415140adcf984c5517aa2d14af2c0db (diff)
downloadu-boot-92873f83d19fa8cedcace2b4c384e6b89ffd5faf.tar.xz
x86: Don't set up MTRRs if previously done
When starting U-Boot from a previous-stage bootloader we presumably don't need to set up the variable MTRRs. In fact this could be harmful if the existing settings are not what U-Boot uses. Skip that step in this case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/cpu/i386/cpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386/cpu.c
index e59215cc20..c7f6c5a013 100644
--- a/arch/x86/cpu/i386/cpu.c
+++ b/arch/x86/cpu/i386/cpu.c
@@ -423,7 +423,7 @@ static void setup_mtrr(void)
u64 mtrr_cap;
/* Configure fixed range MTRRs for some legacy regions */
- if (!gd->arch.has_mtrr)
+ if (!gd->arch.has_mtrr || !ll_boot_init())
return;
mtrr_cap = native_read_msr(MTRR_CAP_MSR);