diff options
author | Aaron Durbin <adurbin@chromium.org> | 2013-04-01 15:40:45 -0500 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2013-04-03 19:25:17 +0200 |
commit | 0f0fe100cb27770d615a70d5a78310ad47cb1abf (patch) | |
tree | b2284657a6c85335b7197f56d98fc5796ecd827b /src | |
parent | d46161e9eaaca8ec1d95f52461feb9647a99d5f3 (diff) |
haswell: use new interface to disable rom caching
The haswell code was using the old assumption of which MTRR
was used for the ROM cache. Now that there is an API for doing
this use it as the old assumption is no longer valid.
Change-Id: I59ef897becfc9834d36d28840da6dc4f1145b0c7
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/3007
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/cpu/intel/haswell/mp_init.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/cpu/intel/haswell/mp_init.c b/src/cpu/intel/haswell/mp_init.c index c8bd5c22be..cc1389247e 100644 --- a/src/cpu/intel/haswell/mp_init.c +++ b/src/cpu/intel/haswell/mp_init.c @@ -145,28 +145,7 @@ void release_aps_for_smm_relocation(int do_parallel) * ensure the caching is disabled for tha APs before going to sleep. */ static void cleanup_rom_caching(void) { -#if CONFIG_CACHE_ROM - msr_t msr; - unsigned int last_var_mtrr; - - msr = rdmsr(MTRRcap_MSR); - last_var_mtrr = (msr.lo & 0xff) - 1; - - /* Check if the MTRR is valid. */ - msr = rdmsr(MTRRphysMask_MSR(last_var_mtrr)); - if ((msr.lo & MTRRphysMaskValid) == 0) - return; - msr = rdmsr(MTRRphysBase_MSR(last_var_mtrr)); - /* Assum that if the MTRR is of write protected type, the MTRR is used - * to cache the ROM. */ - if ((msr.lo & MTRR_NUM_TYPES) == MTRR_TYPE_WRPROT) { - msr.lo = msr.hi = 0; - disable_cache(); - wrmsr(MTRRphysMask_MSR(last_var_mtrr), msr); - wrmsr(MTRRphysBase_MSR(last_var_mtrr), msr); - enable_cache(); - } -#endif + x86_mtrr_disable_rom_caching(); } /* By the time APs call ap_init() caching has been setup, and microcode has |