Message ID | 20210407043228.2268429-6-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Bin Meng |
Headers | show |
Series | misc: Some more misc patches | expand |
On Wed, Apr 7, 2021 at 12:33 PM Simon Glass <sjg@chromium.org> wrote: > > 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> > --- > > arch/x86/cpu/i386/cpu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386/cpu.c index e59215cc20e..c7f6c5a013e 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);
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> --- arch/x86/cpu/i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)