From: Simon Glass Date: Thu, 1 Jan 2015 23:18:11 +0000 (-0700) Subject: x86: Commit the current MTRRs before relocation X-Git-Tag: v2015.04-rc1~195^2~18 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=db55bd7dad9a2c30c8da884bf20273945e240430;p=u-boot x86: Commit the current MTRRs before relocation Once we stop running from ROM we should set up the MTTRs to speed up execution. This is only needed for platforms that don't have an FSP. Also in the Coreboot case, the MTRRs are set up for us. Signed-off-by: Simon Glass --- diff --git a/arch/x86/lib/init_helpers.c b/arch/x86/lib/init_helpers.c index be4eb12c53..fc211d9d5c 100644 --- a/arch/x86/lib/init_helpers.c +++ b/arch/x86/lib/init_helpers.c @@ -7,6 +7,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; @@ -66,6 +67,13 @@ int calculate_relocation_address(void) int init_cache_f_r(void) { +#if defined(CONFIG_X86_RESET_VECTOR) & !defined(CONFIG_HAVE_FSP) + int ret; + + ret = mtrr_commit(false); + if (ret) + return ret; +#endif /* Initialise the CPU cache(s) */ return init_cache(); }