From 9cd6a265e2af9629a5391212ccf6e4ddf1c9ebd8 Mon Sep 17 00:00:00 2001 From: Pratik Prajapati Date: Mon, 14 Aug 2017 13:57:46 -0700 Subject: intel/common/mp_init: Refactor MP Init code to get rid of microcode param Remove passing microcode patch pointer as param while calling - soc_core_init() - soc_init_cpus() Also change callbacks in apollolake/geminilake and skylake/kabylake common code to reflect the same function signature. Change-Id: Ib03bb4a3063d243d97b132e0dc288ef3868a5a7b Signed-off-by: Pratik Prajapati Reviewed-on: https://review.coreboot.org/21010 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/soc/intel/common/block/cpu/mp_init.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'src/soc/intel/common/block/cpu') diff --git a/src/soc/intel/common/block/cpu/mp_init.c b/src/soc/intel/common/block/cpu/mp_init.c index 5bbbb2c01e..c08d251469 100644 --- a/src/soc/intel/common/block/cpu/mp_init.c +++ b/src/soc/intel/common/block/cpu/mp_init.c @@ -30,20 +30,19 @@ static const void *microcode_patch; /* SoC override function */ -__attribute__((weak)) void soc_core_init(device_t dev, const void *microcode) +__attribute__((weak)) void soc_core_init(device_t dev) { /* no-op */ } -__attribute__((weak)) void soc_init_cpus(struct bus *cpu_bus, - const void *microcode) +__attribute__((weak)) void soc_init_cpus(struct bus *cpu_bus) { /* no-op */ } -static void init_one_cpu(device_t dev) +static void init_one_cpu(device_t dev) { - soc_core_init(dev, microcode_patch); + soc_core_init(dev); intel_microcode_load_unlocked(microcode_patch); } @@ -125,19 +124,7 @@ static void init_cpus(void *unused) microcode_patch = intel_microcode_find(); intel_microcode_load_unlocked(microcode_patch); - /* - * TODO: This parameter "microcode_patch" should be removed - * in this function call once the following two cases are resolved - - * - * 1) SGX enabling for the BSP issue gets solved, due to which - * configure_sgx() function is kept inside soc/cpu.c soc_init_cpus(). - * 2) uCode loading after SMM relocation is deleted inside - * per_cpu_smm_trigger() mp_ops callback function in soc/cpu.c, - * since as per current BWG, uCode loading can be done after - * all feature programmings are done. There is no specific - * recommendation to do it after SMM Relocation. - */ - soc_init_cpus(dev->link_list, microcode_patch); + soc_init_cpus(dev->link_list); } /* Ensure to re-program all MTRRs based on DRAM resource settings */ -- cgit v1.2.3