[coreboot-gerrit] New patch to review for coreboot: 8be6d89 baytrail: get rid of global microcode_ptr
Aaron Durbin (adurbin@google.com)
gerrit at coreboot.org
Tue Jan 28 03:55:38 CET 2014
Aaron Durbin (adurbin at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4901
-gerrit
commit 8be6d89599ddde4ba2ac91a1438460d36dce5e7d
Author: Aaron Durbin <adurbin at chromium.org>
Date: Thu Oct 24 14:55:42 2013 -0500
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 at chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/174552
Reviewed-by: Shawn Nematbakhsh <shawnn at chromium.org>
---
src/soc/intel/baytrail/cpu.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/soc/intel/baytrail/cpu.c b/src/soc/intel/baytrail/cpu.c
index c93d253..1226e47 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)
More information about the coreboot-gerrit
mailing list