summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu
diff options
context:
space:
mode:
authorTomaz Solc <tomaz.solc@tablix.org>2019-02-27 14:22:13 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-03-04 08:48:15 +0100
commit49a46e5b11bd4c2a6684cf9d5f15838efd185a64 (patch)
treec0734371c00a15539a4e61a923b2d13ae5bd4469 /arch/arm/cpu
parent34a770c33a8d6a6ebe61b36e02c1cecd16f0d172 (diff)
downloadbarebox-49a46e5b11bd4c2a6684cf9d5f15838efd185a64.tar.gz
barebox-49a46e5b11bd4c2a6684cf9d5f15838efd185a64.tar.xz
ARM: start: save end of memory passed to start.
Knowing the address of the end of the memory area used by Barebox is useful if PBL stores some extra data after it, so that board init code can later retrieve it from there. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r--arch/arm/cpu/start.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
index 768fa9e1b2..6573c2ef74 100644
--- a/arch/arm/cpu/start.c
+++ b/arch/arm/cpu/start.c
@@ -38,6 +38,7 @@
unsigned long arm_stack_top;
static unsigned long arm_barebox_size;
+static unsigned long arm_endmem;
static void *barebox_boarddata;
static unsigned long barebox_boarddata_size;
@@ -131,6 +132,12 @@ unsigned long arm_mem_ramoops_get(void)
}
EXPORT_SYMBOL_GPL(arm_mem_ramoops_get);
+unsigned long arm_mem_endmem_get(void)
+{
+ return arm_endmem;
+}
+EXPORT_SYMBOL_GPL(arm_mem_endmem_get);
+
static int barebox_memory_areas_init(void)
{
if(barebox_boarddata)
@@ -163,6 +170,7 @@ __noreturn void barebox_non_pbl_start(unsigned long membase,
pr_debug("memory at 0x%08lx, size 0x%08lx\n", membase, memsize);
+ arm_endmem = endmem;
arm_stack_top = arm_mem_stack_top(membase, endmem);
arm_barebox_size = barebox_size;
malloc_end = barebox_base;