summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/soc/intel/common/block/cpu/mp_init.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/soc/intel/common/block/cpu/mp_init.c b/src/soc/intel/common/block/cpu/mp_init.c
index cec767a9a0..52b1494fd2 100644
--- a/src/soc/intel/common/block/cpu/mp_init.c
+++ b/src/soc/intel/common/block/cpu/mp_init.c
@@ -15,12 +15,17 @@
#include <intelblocks/msr.h>
#include <soc/cpu.h>
+static void initialize_microcode(void)
+{
+ const void *microcode_patch = intel_microcode_find();
+ intel_microcode_load_unlocked(microcode_patch);
+}
+
static void init_one_cpu(struct device *dev)
{
soc_core_init(dev);
- const void *microcode_patch = intel_microcode_find();
- intel_microcode_load_unlocked(microcode_patch);
+ initialize_microcode();
}
static struct device_operations cpu_dev_ops = {
@@ -148,8 +153,7 @@ static void coreboot_init_cpus(void *unused)
if (CONFIG(USE_INTEL_FSP_MP_INIT))
return;
- const void *microcode_patch = intel_microcode_find();
- intel_microcode_load_unlocked(microcode_patch);
+ initialize_microcode();
init_cpus();
}