[U-Boot] [PATCH] 85xx/86xx: Ensure MP boot page is not used

Becky Bruce beckyb at kernel.crashing.org
Wed Apr 1 17:55:08 CEST 2009


On Mar 31, 2009, at 11:23 PM, Kumar Gala wrote:

> We had a bug on 86xx in which the boot page used to bring up secondary
> cores was being overwritten and used for the malloc region in u-boot.
>
> We need to reserve the region of memory that the boot page is going to
> be put at so nothing uses it.
>
> Signed-off-by: Kumar Gala <galak at kernel.crashing.org>

Acked-by: Becky Bruce <beckyb at kernel.crashing.org>

>
> ---
> lib_ppc/board.c |   13 +++++++++++++
> 1 files changed, 13 insertions(+), 0 deletions(-)
>
> diff --git a/lib_ppc/board.c b/lib_ppc/board.c
> index 3b93e4e..6eeca02 100644
> --- a/lib_ppc/board.c
> +++ b/lib_ppc/board.c
> @@ -79,6 +79,10 @@
> #include <asm/mmu.h>
> #endif
>
> +#ifdef CONFIG_MP
> +extern u32 determine_mp_bootpg(void);
> +#endif
> +
> #ifdef CONFIG_SYS_UPDATE_FLASH_SIZE
> extern int update_flash_size (int flash_size);
> #endif
> @@ -444,6 +448,15 @@ void board_init_f (ulong bootflag)
>
> 	addr = CONFIG_SYS_SDRAM_BASE + get_effective_memsize();
>
> +#if defined(CONFIG_MP) && (defined(CONFIG_MPC86xx) ||  
> defined(CONFIG_E500))
> +	/* We need to make sure the location we intend to put secondary core
> +	 * boot code is reserved and not used by any part of u-boot */
> +	if (addr > determine_mp_bootpg()) {
> +		addr = determine_mp_bootpg();
> +		debug ("Reserving MP boot page to %08lx\n", addr);
> +	}
> +#endif
> +
> #ifdef CONFIG_LOGBUFFER
> #ifndef CONFIG_ALT_LB_ADDR
> 	/* reserve kernel log buffer */
> -- 
> 1.5.6.6
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot



More information about the U-Boot mailing list