提交 bb60db63 编写于 作者: A Alex Hornung 提交者: Thomas Chou

nios2 - adjust gbl data off to account for bd_info

 * 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: NAlex Hornung <alex@alexhornung.com>
Signed-off-by: NThomas Chou <thomas@wytron.com.tw>
上级 7bd7b315
......@@ -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
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册