summaryrefslogtreecommitdiff
path: root/lib_blackfin
diff options
context:
space:
mode:
Diffstat (limited to 'lib_blackfin')
-rw-r--r--lib_blackfin/board.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c
index dcf246d..fef1934 100644
--- a/lib_blackfin/board.c
+++ b/lib_blackfin/board.c
@@ -279,9 +279,13 @@ void board_init_f(ulong bootflag)
dcache_enable();
#endif
+#ifdef DEBUG
+ if (CONFIG_SYS_GBL_DATA_SIZE < sizeof(*gd))
+ hang();
+#endif
serial_early_puts("Init global data\n");
gd = (gd_t *) (CONFIG_SYS_GBL_DATA_ADDR);
- memset((void *)gd, 0, sizeof(gd_t));
+ memset((void *)gd, 0, CONFIG_SYS_GBL_DATA_SIZE);
/* Board data initialization */
addr = (CONFIG_SYS_GBL_DATA_ADDR + sizeof(gd_t));