summaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorOvidiu Panait <ovpanait@gmail.com>2022-09-13 21:31:28 +0300
committerTom Rini <trini@konsulko.com>2022-10-06 21:05:17 -0400
commitd63fc99435f462cbef5e062cb5f18711c947bf01 (patch)
tree8b62c9301b30f4257185baa38ff431351b7d7aa4 /arch/powerpc
parent85e68ae001d4449f02e6ce99b91e160bd94eb69c (diff)
downloadu-boot-d63fc99435f462cbef5e062cb5f18711c947bf01.tar.gz
common/board_f: introduce arch_setup_dest_addr()
In order to move ppc-specific code out of setup_dest_addr(), provide an arch-specific variant arch_setup_dest_addr(), that can be used by architecture code to fix up the initial reloc address. It is called at the end of setup_dest_addr() initcall and the default implementation is a nop stub. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/lib/stack.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/powerpc/lib/stack.c b/arch/powerpc/lib/stack.c
index f2a4652e08..2e731aa870 100644
--- a/arch/powerpc/lib/stack.c
+++ b/arch/powerpc/lib/stack.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <init.h>
#include <asm/global_data.h>
+#include <asm/mp.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -30,3 +31,19 @@ int arch_reserve_stacks(void)
return 0;
}
+
+int arch_setup_dest_addr(void)
+{
+#if defined(CONFIG_MP) && (defined(CONFIG_MPC86xx) || defined(CONFIG_E500))
+ /*
+ * We need to make sure the location we intend to put secondary core
+ * boot code is reserved and not used by any part of u-boot
+ */
+ if (gd->relocaddr > determine_mp_bootpg(NULL)) {
+ gd->relocaddr = determine_mp_bootpg(NULL);
+ debug("Reserving MP boot page to %08lx\n", gd->relocaddr);
+ }
+#endif
+
+ return 0;
+}