[PATCH] Implement ALTERNATE memory layout.
Sascha Hauer
s.hauer at pengutronix.de
Mon Apr 1 14:04:38 EDT 2013
On Sat, Mar 30, 2013 at 12:25:35PM +0100, Krzysztof Halasa wrote:
> Signed-off-by: Krzysztof Hałasa <khc at pm.waw.pl>
>
> --- a/arch/arm/cpu/start.c
> +++ b/arch/arm/cpu/start.c
> @@ -58,7 +58,6 @@ static noinline __noreturn void __start(uint32_t membase, uint32_t memsize,
> endmem -= STACK_SIZE; /* Stack */
>
> if (IS_ENABLED(CONFIG_MMU_EARLY)) {
> -
> endmem &= ~0x3fff;
> endmem -= SZ_16K; /* ttb */
>
> @@ -66,6 +65,9 @@ static noinline __noreturn void __start(uint32_t membase, uint32_t memsize,
> mmu_early_enable(membase, memsize, endmem);
> }
>
> +#ifdef CONFIG_MEMORY_LAYOUT_ALTERNATE
> + malloc_end = endmem;
> +#else
We should not need a kconfig option for this. Why not just use the
biggest memory region we find? Whether this is below or above the
barebox binary doesn't need to be known at compile time.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list