summaryrefslogtreecommitdiff
path: root/arch/x86/cpu/cpu.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-17 08:48:20 -0600
committerBin Meng <bmeng.cn@gmail.com>2020-07-20 09:46:46 +0800
commit99a573fb326faf5a7bff50e4f9875f2066728d95 (patch)
tree7a7efde7ccc0fce8c5ce88a4bbafe98d7647b0c0 /arch/x86/cpu/cpu.c
parent84d3ed125ad91c5973c4a071be5eea913bea34e5 (diff)
x86: mp: Park CPUs before running the OS
With the new MP features the CPUs are no-longer parked when the OS is run. Fix this by calling a special function to park them, just before the OS is started. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/cpu/cpu.c')
-rw-r--r--arch/x86/cpu/cpu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index c343586e04..69c14189d1 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -67,6 +67,11 @@ static const char *const x86_vendor_name[] = {
int __weak x86_cleanup_before_linux(void)
{
+ int ret;
+
+ ret = mp_park_aps();
+ if (ret)
+ return log_msg_ret("park", ret);
bootstage_stash((void *)CONFIG_BOOTSTAGE_STASH_ADDR,
CONFIG_BOOTSTAGE_STASH_SIZE);