summaryrefslogtreecommitdiff
path: root/include/configs/nios2-generic.h
diff options
context:
space:
mode:
authorAlex Hornung <alex@alexhornung.com>2012-02-20 23:45:45 +0000
committerThomas Chou <thomas@wytron.com.tw>2012-02-24 10:18:34 +0800
commitbb60db634c26d609b289e114f44cc2c94ee64c4f (patch)
tree34d9a7f605d4b002d7e7e4a400bda03be803bfb9 /include/configs/nios2-generic.h
parent7bd7b31574518bf9c7b3c83ef2831e27abb6b14e (diff)
downloadu-boot-imx-bb60db634c26d609b289e114f44cc2c94ee64c4f.zip
u-boot-imx-bb60db634c26d609b289e114f44cc2c94ee64c4f.tar.gz
u-boot-imx-bb60db634c26d609b289e114f44cc2c94ee64c4f.tar.bz2
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: Alex Hornung <alex@alexhornung.com> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Diffstat (limited to 'include/configs/nios2-generic.h')
-rw-r--r--include/configs/nios2-generic.h3
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
/*