aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/common/util.h
diff options
context:
space:
mode:
authorLee Leahy <leroy.p.leahy@intel.com>2016-01-29 14:35:13 -0800
committerLeroy P Leahy <leroy.p.leahy@intel.com>2016-02-02 19:00:35 +0100
commit95909924024687d42cdf34518d34d7c8eb1aee57 (patch)
tree7e536d1a0d45009527bcf7db53c873b4d4dfc4a5 /src/soc/intel/common/util.h
parent05c0215ff31c80a06e3824fb55f5983b62f894cd (diff)
soc/intel/common: Use SoC specific routine to read/write MTRRs
The registers associated with the MTRRs for Quark are referenced through a port on the host bridge. Support the standard configurations by providing a weak routines which just do a rdmsr/wrmsr. Testing: * Edit the src/mainboard/intel/galileo/Makefile.inc file * Add "select DISPLAY_MTRRS" * Add "select HAVE_FSP_PDAT_FILE" * Add "select HAVE_FSP_RAW_BIN" * Add "select HAVE_RMU_FILE" * Place the FSP.bin file in the location specified by CONFIG_FSP_FILE * Place the pdat.bin files in the location specified by CONFIG_FSP_PDAT_FILE * Place the rmu.bin file in the location specified by CONFIG_RMU_FILE * Testing is successful if: * The MTRRs are displayed and * The message "FspTempRamExit returned successfully" is displayed TEST=Build and run on Galileo Change-Id: If2fea66d4b054be4555f5f172ea5945620648325 Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-on: https://review.coreboot.org/13529 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/soc/intel/common/util.h')
-rw-r--r--src/soc/intel/common/util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/soc/intel/common/util.h b/src/soc/intel/common/util.h
index 8c41151160..7d05e47c1d 100644
--- a/src/soc/intel/common/util.h
+++ b/src/soc/intel/common/util.h
@@ -17,9 +17,17 @@
#define _INTEL_COMMON_UTIL_H_
#include <arch/cpu.h>
+#include <cpu/x86/msr.h>
#include <stdint.h>
asmlinkage void soc_display_mtrrs(void);
uint32_t soc_get_variable_mtrr_count(uint64_t *msr);
+#if IS_ENABLED(CONFIG_SOC_SETS_MTRRS)
+msr_t soc_mtrr_read(unsigned long index);
+void soc_mtrr_write(unsigned long index, msr_t msr);
+#else
+#define soc_mtrr_read rdmsr
+#define soc_mtrr_write wrmsr
+#endif /* CONFIG_SOC_SETS_MTRRS */
#endif /* _INTEL_COMMON_UTIL_H_ */