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>
This commit is contained in:
parent
049e9bd2dc
commit
315bb30cd7
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue