summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/arm64/Kconfig1
-rw-r--r--src/arch/arm64/boot.c6
-rw-r--r--src/arch/arm64/include/arch/stages.h2
3 files changed, 7 insertions, 2 deletions
diff --git a/src/arch/arm64/Kconfig b/src/arch/arm64/Kconfig
index 3d1d1843e0..0438ded429 100644
--- a/src/arch/arm64/Kconfig
+++ b/src/arch/arm64/Kconfig
@@ -17,6 +17,7 @@ config ARCH_ROMSTAGE_ARM64
config ARCH_RAMSTAGE_ARM64
bool
select ARCH_ARM64
+ select RAMSTAGE_CBMEM_TOP_ARG if !SOC_NVIDIA_TEGRA210
source src/arch/arm64/armv8/Kconfig
diff --git a/src/arch/arm64/boot.c b/src/arch/arm64/boot.c
index c6df0ee02e..479a910cae 100644
--- a/src/arch/arm64/boot.c
+++ b/src/arch/arm64/boot.c
@@ -11,6 +11,7 @@
* GNU General Public License for more details.
*/
+#include <cbmem.h>
#include <arch/cache.h>
#include <arch/lib_helpers.h>
#include <arch/stages.h>
@@ -48,7 +49,10 @@ void arch_prog_run(struct prog *prog)
}
/* Generic stage entry point. Can be overridden by board/SoC if 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();
}
diff --git a/src/arch/arm64/include/arch/stages.h b/src/arch/arm64/include/arch/stages.h
index d86172b2d0..c8a3bdd20e 100644
--- a/src/arch/arm64/include/arch/stages.h
+++ b/src/arch/arm64/include/arch/stages.h
@@ -17,7 +17,7 @@
#include <stdint.h>
#include <main_decl.h>
-void stage_entry(void);
+void stage_entry(uintptr_t stage_arg);
/* This function is the romstage platform entry point, and should contain all
chipset and mainboard setup until DRAM is initialized and accessible. */