BACKPORT: x86: use boot state callbacks to disable rom cache

On x86 systems there is a concept of cachings the ROM. However,
the typical policy is that the boot cpu is the only one with
it enabled. In order to ensure the MTRRs are the same across cores
the rom cache needs to be disabled prior to OS resume or boot handoff.
Therefore, utilize the boot state callbacks to schedule the disabling
of the ROM cache at the ramstage exit points.

Change-Id: If67b9b50081d21d505685a96d201c242e71b64f7
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/49746
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
This commit is contained in:
Aaron Durbin 2013-04-24 20:59:43 -05:00 committed by ChromeBot
commit 2b77f8a498
4 changed files with 9 additions and 11 deletions

View file

@ -9,9 +9,6 @@ struct bus;
void initialize_cpus(struct bus *cpu_bus);
void asmlinkage secondary_cpu_init(unsigned int cpu_index);
/* If a ROM cache was set up disable it before jumping to the payload or OS. */
void __attribute__((weak)) disable_cache_rom(void);
#if CONFIG_HAVE_SMI_HANDLER
void smm_init(void);
void smm_lock(void);