From a1b700ff74981ecb84e47e132a60d7f0d5312676 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Mon, 28 Oct 2019 23:26:13 +0100 Subject: arch/mips: Pass cbmem_top to ramstage via calling argument This allows to use a common cbmem_top implementation. Change-Id: I85efe3899607854c36d0ec594868f690eb724a7f Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/36421 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- src/arch/mips/Kconfig | 1 + src/arch/mips/include/arch/stages.h | 3 ++- src/arch/mips/stages.c | 5 ++++- 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src/arch') diff --git a/src/arch/mips/Kconfig b/src/arch/mips/Kconfig index 9df514b21b..321bfc91fd 100644 --- a/src/arch/mips/Kconfig +++ b/src/arch/mips/Kconfig @@ -22,6 +22,7 @@ config ARCH_BOOTBLOCK_MIPS default n select BOOTBLOCK_CUSTOM select C_ENVIRONMENT_BOOTBLOCK + select RAMSTAGE_CBMEM_TOP_ARG config ARCH_VERSTAGE_MIPS bool diff --git a/src/arch/mips/include/arch/stages.h b/src/arch/mips/include/arch/stages.h index 63306bd783..3da02da1ca 100644 --- a/src/arch/mips/include/arch/stages.h +++ b/src/arch/mips/include/arch/stages.h @@ -14,8 +14,9 @@ #ifndef __MIPS_ARCH_STAGES_H #define __MIPS_ARCH_STAGES_H +#include #include -void stage_entry(void); +void stage_entry(uintptr_t stage_arg); #endif /* __MIPS_ARCH_STAGES_H */ diff --git a/src/arch/mips/stages.c b/src/arch/mips/stages.c index 0971e98905..bf31153d98 100644 --- a/src/arch/mips/stages.c +++ b/src/arch/mips/stages.c @@ -11,10 +11,13 @@ * GNU General Public License for more details. */ +#include #include #include -void stage_entry(void) +void stage_entry(uintptr_t stage_arg) { + if (!ENV_ROMSTAGE_OR_BEFORE) + _cbmem_top_ptr = stage_arg; main(); } -- cgit v1.2.3