x86: Skip setting up MTRRs in slimbootloader
authorPark, Aiden <aiden.park@intel.com>
Sat, 3 Aug 2019 08:31:20 +0000 (08:31 +0000)
committerBin Meng <bmeng.cn@gmail.com>
Fri, 9 Aug 2019 14:24:02 +0000 (22:24 +0800)
The setting up MTRRs have already been done in previous
Slim Bootloader stages.

Signed-off-by: Aiden Park <aiden.park@intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/lib/init_helpers.c

index 0481f453ca62571d183ece437340584de78f3c59..5e19f13720f04b752b573bcb7af8a57e8c865f36 100644 (file)
@@ -18,7 +18,8 @@ __weak ulong board_get_usable_ram_top(ulong total_size)
 
 int init_cache_f_r(void)
 {
-#if CONFIG_IS_ENABLED(X86_32BIT_INIT) && !defined(CONFIG_HAVE_FSP)
+#if CONFIG_IS_ENABLED(X86_32BIT_INIT) && !defined(CONFIG_HAVE_FSP) && \
+               !defined(CONFIG_SYS_SLIMBOOTLOADER)
        int ret;
 
        ret = mtrr_commit(false);