1 // SPDX-License-Identifier: GPL-2.0+
4 * Graeme Russ, <graeme.russ@gmail.com>
8 #include <linux/errno.h>
11 DECLARE_GLOBAL_DATA_PTR;
13 int init_cache_f_r(void)
15 bool do_mtrr = CONFIG_IS_ENABLED(X86_32BIT_INIT) ||
16 IS_ENABLED(CONFIG_FSP_VERSION2);
19 do_mtrr &= !IS_ENABLED(CONFIG_FSP_VERSION1) &&
20 !IS_ENABLED(CONFIG_SYS_SLIMBOOTLOADER);
23 ret = mtrr_commit(false);
25 * If MTRR MSR is not implemented by the processor, just ignore
28 if (ret && ret != -ENOSYS)
32 /* Initialise the CPU cache(s) */