1 // SPDX-License-Identifier: GPL-2.0+
4 * Graeme Russ, <graeme.russ@gmail.com>
9 #include <linux/errno.h>
12 DECLARE_GLOBAL_DATA_PTR;
14 int init_cache_f_r(void)
16 bool do_mtrr = CONFIG_IS_ENABLED(X86_32BIT_INIT) ||
17 IS_ENABLED(CONFIG_FSP_VERSION2);
20 do_mtrr &= !IS_ENABLED(CONFIG_FSP_VERSION1) &&
21 !IS_ENABLED(CONFIG_SYS_SLIMBOOTLOADER);
24 ret = mtrr_commit(false);
26 * If MTRR MSR is not implemented by the processor, just ignore
29 if (ret && ret != -ENOSYS)
33 /* Initialise the CPU cache(s) */