cpu/x86: allow AP callbacks after MP init
There are circumstances where the APs need to run a piece of code later in the boot flow. The current MP init just parks the APs after MP init is completed so there's not an opportunity to target running a piece of code on all the APs at a later time. Therefore, provide an option, PARALLEL_MP_AP_WORK, that allows the APs to perform callbacks. BUG=chrome-os-partner:60657 BRANCH=reef Change-Id: I849ecfdd6641dd9424943e246317cd1996ef1ba6 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/17745 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
This commit is contained in:
parent
16bd2676ce
commit
b21e362e93
4 changed files with 137 additions and 7 deletions
|
|
@ -124,6 +124,24 @@ struct mp_ops {
|
|||
*/
|
||||
int mp_init_with_smm(struct bus *cpu_bus, const struct mp_ops *mp_ops);
|
||||
|
||||
|
||||
/*
|
||||
* After APs are up and PARALLEL_MP_AP_WORK is enabled one can issue work
|
||||
* to all the APs to perform. Currently the BSP is the only CPU that is allowed
|
||||
* to issue work. i.e. the APs should not call any of these functions.
|
||||
* All functions return < 0 on error, 0 on success.
|
||||
*/
|
||||
int mp_run_on_aps(void (*func)(void), long expire_us);
|
||||
|
||||
/* Like mp_run_on_aps() but also runs func on BSP. */
|
||||
int mp_run_on_all_cpus(void (*func)(void), long expire_us);
|
||||
|
||||
/*
|
||||
* Park all APs to prepare for OS boot. This is handled automatically
|
||||
* by the coreboot infrastructure.
|
||||
*/
|
||||
int mp_park_aps(void);
|
||||
|
||||
/*
|
||||
* SMM helpers to use with initializing CPUs.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue