On Monday 20 February 2012 18:45:45 Alex Hornung wrote:
>  * Adjust the GBL_DATA_OFFSET to account for the fact that we'll be
>    using the space between that offset and the start of the malloc
>    region to allocate both a gd structure and a board info structure.
> 
>  * This fixes a memory corruption bug due to overlap of the malloc
>    region and the bd_info structure.
> 
> Signed-off-by: Alex Hornung <a...@alexhornung.com>
> ---
>  include/configs/nios2-generic.h |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/include/configs/nios2-generic.h
> b/include/configs/nios2-generic.h index 9ba35e8..17017a5 100644
> --- a/include/configs/nios2-generic.h
> +++ b/include/configs/nios2-generic.h
> @@ -131,7 +131,8 @@
>  #define CONFIG_SYS_MALLOC_BASE               (CONFIG_SYS_MONITOR_BASE - \
>                                        CONFIG_SYS_MALLOC_LEN)
>  #define CONFIG_SYS_GBL_DATA_OFFSET   (CONFIG_SYS_MALLOC_BASE - \
> -                                      GENERATED_GBL_DATA_SIZE)
> +                                      GENERATED_GBL_DATA_SIZE - \
> +                                      GENERATED_BD_INFO_SIZE)
>  #define CONFIG_SYS_INIT_SP           CONFIG_SYS_GBL_DATA_OFFSET
> 
>  /*

+cc the nios maintainers ...
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to