bl33 2023: enable smp on uboot 2023 [1/1]
PD#SWPL-171644
Problem:
uboot 2023 needs smp
Solution:
port code from uboot 2019
1 7e566efdd0b1: uboot trunk does not support smp
2 a995f0347db4: core1 stacks are overlaped
3 2f4590b42359: no function to get core idx for smp
4 cc02792fecc6: log is out of order if smp enabled
5 165524b68ac8: add cpu_online_status()
Verify:
s7
Change-Id: I1b6215ea910f7be82dc4dcb21557c6e118af0a77
Signed-off-by: xia.jin <xia.jin@amlogic.com>
diff --git a/common/board_f.c b/common/board_f.c
index e556e6e..dd17883 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -50,6 +50,9 @@
#include <linux/errno.h>
#include <linux/log2.h>
#include <linux/string.h>
+#ifdef CONFIG_ARMV8_MULTIENTRY
+#include <asm/arch-meson/smp.h>
+#endif
DECLARE_GLOBAL_DATA_PTR;
@@ -711,7 +714,9 @@
{
/* make stack pointer 16-byte aligned */
gd->start_addr_sp = reserve_stack_aligned(16);
-
+#ifdef CONFIG_ARMV8_MULTIENTRY
+ gd->start_addr_sp -= ((NR_CPUS - 1) * secondary_sp_size);
+#endif
/*
* let the architecture-specific code tailor gd->start_addr_sp and
* gd->irq_sp