From 3337497d2a1995614afd4a554747d86e4bcd8d31 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Tue, 24 Apr 2018 13:45:30 +0530 Subject: cpu/x86: Add support to run function with argument over APs This patch ensures that user can pass a function with given argument list to execute over APs. BUG=b:74436746 BRANCH=none TEST=Able to run functions over APs with argument. Change-Id: I668b36752f6b21cb99cd1416c385d53e96117213 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/25725 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- src/soc/intel/common/block/cpu/cpulib.c | 2 +- src/soc/intel/common/block/cpu/mp_init.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src/soc/intel/common/block/cpu') diff --git a/src/soc/intel/common/block/cpu/cpulib.c b/src/soc/intel/common/block/cpu/cpulib.c index e768f8c5a4..c67904f198 100644 --- a/src/soc/intel/common/block/cpu/cpulib.c +++ b/src/soc/intel/common/block/cpu/cpulib.c @@ -219,7 +219,7 @@ void cpu_disable_eist(void) * Set Bit 6 (ENABLE_IA_UNTRUSTED_MODE) of MSR 0x120 * UCODE_PCR_POWER_MISC MSR to enter IA Untrusted Mode. */ -void cpu_enable_untrusted_mode(void) +void cpu_enable_untrusted_mode(void *unused) { msr_t msr; diff --git a/src/soc/intel/common/block/cpu/mp_init.c b/src/soc/intel/common/block/cpu/mp_init.c index 23f2fb0d47..97ad176a20 100644 --- a/src/soc/intel/common/block/cpu/mp_init.c +++ b/src/soc/intel/common/block/cpu/mp_init.c @@ -130,10 +130,15 @@ static void init_cpus(void *unused) soc_init_cpus(dev->link_list); } +static void wrapper_x86_setup_mtrrs(void *unused) +{ + x86_setup_mtrrs_with_detect(); +} + /* Ensure to re-program all MTRRs based on DRAM resource settings */ static void post_cpus_init(void *unused) { - if (mp_run_on_all_cpus(&x86_setup_mtrrs_with_detect, 1000) < 0) + if (mp_run_on_all_cpus(&wrapper_x86_setup_mtrrs, NULL, 1000) < 0) printk(BIOS_ERR, "MTRR programming failure\n"); x86_mtrr_check(); -- cgit v1.2.3