summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/arm/Kconfig1
-rw-r--r--src/arch/arm/include/arch/stages.h3
-rw-r--r--src/arch/arm/stages.c5
3 files changed, 7 insertions, 2 deletions
diff --git a/src/arch/arm/Kconfig b/src/arch/arm/Kconfig
index 47c333bf6a..9e10378510 100644
--- a/src/arch/arm/Kconfig
+++ b/src/arch/arm/Kconfig
@@ -17,6 +17,7 @@ config ARCH_ROMSTAGE_ARM
config ARCH_RAMSTAGE_ARM
bool
select ARCH_ARM
+ select RAMSTAGE_CBMEM_TOP_ARG
source src/arch/arm/armv4/Kconfig
source src/arch/arm/armv7/Kconfig
diff --git a/src/arch/arm/include/arch/stages.h b/src/arch/arm/include/arch/stages.h
index 3841265341..795a3a3e7a 100644
--- a/src/arch/arm/include/arch/stages.h
+++ b/src/arch/arm/include/arch/stages.h
@@ -14,8 +14,9 @@
#ifndef __ARCH_STAGES_H
#define __ARCH_STAGES_H
+#include <stdint.h>
#include <main_decl.h>
-void stage_entry(void);
+void stage_entry(uintptr_t stage_arg);
#endif
diff --git a/src/arch/arm/stages.c b/src/arch/arm/stages.c
index c9f5744f75..fc2ebdb2fc 100644
--- a/src/arch/arm/stages.c
+++ b/src/arch/arm/stages.c
@@ -22,13 +22,16 @@
* .text.stage_entry section created by -ffunction-sections).
*/
+#include <cbmem.h>
#include <arch/stages.h>
#include <arch/cache.h>
/**
* generic stage entry point. override this if board specific code is needed.
*/
-__weak void stage_entry(void)
+__weak void stage_entry(uintptr_t stage_arg)
{
+ if (!ENV_ROMSTAGE_OR_BEFORE)
+ _cbmem_top_ptr = stage_arg;
main();
}