arch/arm64: Pass cbmem_top to ramstage via calling argument
This solution is very generic and can in principle be implemented on all arch/soc. Currently the old infrastructure to pass on information from romstage to ramstage is left in place and will be removed in a follow-up commit. Nvidia Tegra will be handled in a separate patch because it has a custom ramstage entry. Instead trying to figure out which files can be removed from stages and which cbmem_top implementations need with preprocessor, rename all cbmem_top implementation to cbmem_top_romstage. Mechanisms set in place to pass on information from rom- to ram-stage will be replaced in a followup commit. Change-Id: I86cdc5c2fac76797732a3a3398f50c4d1ff6647a Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36275 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
@ -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
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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. */
|
||||
|
Reference in New Issue
Block a user