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 <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36421
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Arthur Heymans 2019-10-28 23:26:13 +01:00 committed by Patrick Georgi
parent 879c9fc421
commit a1b700ff74
4 changed files with 7 additions and 3 deletions

View File

@ -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

View File

@ -14,8 +14,9 @@
#ifndef __MIPS_ARCH_STAGES_H
#define __MIPS_ARCH_STAGES_H
#include <stdint.h>
#include <main_decl.h>
void stage_entry(void);
void stage_entry(uintptr_t stage_arg);
#endif /* __MIPS_ARCH_STAGES_H */

View File

@ -11,10 +11,13 @@
* GNU General Public License for more details.
*/
#include <cbmem.h>
#include <arch/stages.h>
#include <arch/cache.h>
void stage_entry(void)
void stage_entry(uintptr_t stage_arg)
{
if (!ENV_ROMSTAGE_OR_BEFORE)
_cbmem_top_ptr = stage_arg;
main();
}

View File

@ -28,7 +28,6 @@ ramstage-y += uart.c
bootblock-y += monotonic_timer.c
ramstage-y += cbmem.c
ramstage-y += monotonic_timer.c
ramstage-y += soc.c
ramstage-y += reset.c