summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2013-10-24 14:55:42 -0500
committerAaron Durbin <adurbin@google.com>2014-02-24 18:41:35 +0100
commit315bb30cd764a3f57cc6ce36a481e7361ac3a0c0 (patch)
tree79efefa9203f3dc2db21d6a23134721b15ab0c8f /src/soc/intel
parent049e9bd2dca2b4bb962c25e18ba29f0c0d777517 (diff)
baytrail: get rid of global microcode_ptr
A global microcode_ptr was added when doing the MP development work. However, this is unnecessary as the pattrs structure already contains the pointer. Use that instead. BUG=chrome-os-partner:22862 BRANCH=None TEST=Built and booted. Microcode still being loaded correctly. Change-Id: I0abba66fc7741699411d14bd3e1bb28cf1618028 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/174552 Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: http://review.coreboot.org/4901 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/baytrail/cpu.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/soc/intel/baytrail/cpu.c b/src/soc/intel/baytrail/cpu.c
index c93d253020..1226e471ad 100644
--- a/src/soc/intel/baytrail/cpu.c
+++ b/src/soc/intel/baytrail/cpu.c
@@ -32,8 +32,6 @@
#include <baytrail/ramstage.h>
#include <baytrail/smm.h>
-static const void *microcode_ptr;
-
static void smm_relocate(void *unused);
static void enable_smis(void *unused);
@@ -61,15 +59,12 @@ void baytrail_init_cpus(device_t dev)
x86_setup_var_mtrrs(pattrs->address_bits, 2);
x86_mtrr_check();
- /* Stash microcode. */
- microcode_ptr = intel_microcode_find();
-
mp_params.num_cpus = pattrs->num_cpus,
mp_params.parallel_microcode_load = 1,
mp_params.adjust_apic_id = adjust_apic_id;
mp_params.flight_plan = &mp_steps[0];
mp_params.num_records = ARRAY_SIZE(mp_steps);
- mp_params.microcode_pointer = microcode_ptr;
+ mp_params.microcode_pointer = pattrs->microcode_patch;
if (mp_init(cpu_bus, &mp_params)) {
printk(BIOS_ERR, "MP initialization failure.\n");
@@ -220,6 +215,8 @@ static int smm_load_handlers(void)
static void smm_relocate(void *unused)
{
+ const struct pattrs *pattrs = pattrs_get();
+
/* Load relocation and permanent handler. */
if (boot_cpu()) {
if (smm_load_handlers() < 0) {
@@ -233,7 +230,7 @@ static void smm_relocate(void *unused)
smm_initiate_relocation();
/* Load microcode after SMM relocation. */
- intel_microcode_load_unlocked(microcode_ptr);
+ intel_microcode_load_unlocked(pattrs->microcode_patch);
}
static void enable_smis(void *unused)