summaryrefslogtreecommitdiff
path: root/src/include/cpu
diff options
context:
space:
mode:
authorSubrata Banik <subrata.banik@intel.com>2018-05-03 18:48:41 +0530
committerSubrata Banik <subrata.banik@intel.com>2018-05-19 01:16:06 +0000
commit8a25caee0507655d775e3dcc21b36b01ca517113 (patch)
tree7cde904b2a0c3a3296a1008a3167a0f1f43e61de /src/include/cpu
parente66600ee4f33291ef620133c7f2df54f449d9470 (diff)
cpu/x86: Add support to run function on single AP
This patch ensures that user can select a specific AP to run a function. BUG=b:74436746 BRANCH=none TEST=Able to run functions over APs with argument. Change-Id: Iff2f34900ce2a96ef6ff0779b651f25ebfc739ad Signed-off-by: Subrata Banik <subrata.banik@intel.com> Reviewed-on: https://review.coreboot.org/26034 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/include/cpu')
-rw-r--r--src/include/cpu/x86/mp.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/include/cpu/x86/mp.h b/src/include/cpu/x86/mp.h
index fba3e75af7..c04252ec35 100644
--- a/src/include/cpu/x86/mp.h
+++ b/src/include/cpu/x86/mp.h
@@ -116,6 +116,11 @@ struct mp_ops {
*/
int mp_init_with_smm(struct bus *cpu_bus, const struct mp_ops *mp_ops);
+enum {
+ /* Function runs on all cores (both BSP and APs) */
+ MP_RUN_ON_ALL_CPUS,
+ /* Need to specify cores (only on APs) numbers */
+};
/*
* After APs are up and PARALLEL_MP_AP_WORK is enabled one can issue work
@@ -123,10 +128,13 @@ int mp_init_with_smm(struct bus *cpu_bus, const struct mp_ops *mp_ops);
* to issue work. i.e. the APs should not call any of these functions.
*
* Input parameter expire_us <= 0 to specify an infinite timeout.
+ * logical_cpu_num = MP_RUN_ON_ALL_CPUS to execute function over all cores (BSP
+ * + APs) else specified AP number using logical_cpu_num.
*
* All functions return < 0 on error, 0 on success.
*/
-int mp_run_on_aps(void (*func)(void *), void *arg, long expire_us);
+int mp_run_on_aps(void (*func)(void *), void *arg, int logical_cpu_num,
+ long expire_us);
/* Like mp_run_on_aps() but also runs func on BSP. */
int mp_run_on_all_cpus(void (*func)(void *), void *arg, long expire_us);