Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/64835 )
Change subject: soc/intel/cmn/mp_init: Create helper function to load microcode ......................................................................
soc/intel/cmn/mp_init: Create helper function to load microcode
This patch creates a helper function named `initialize_microcode()` to load microcode and ease for all function to peform loading microcode using this helper function.
BUG=b:233199592 TEST=Build and boot google/taeko to ChromeOS.
Signed-off-by: Subrata Banik subratabanik@google.com Change-Id: I7155fc2da7383629930ce147a90ac582782fa5ae --- M src/soc/intel/common/block/cpu/mp_init.c 1 file changed, 8 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/64835/1
diff --git a/src/soc/intel/common/block/cpu/mp_init.c b/src/soc/intel/common/block/cpu/mp_init.c index cec767a..52b1494 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 @@ 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(); }