summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorGabe Black <gabeblack@chromium.org>2011-07-27 16:44:45 -0700
committerSimon Glass <sjg@chromium.org>2011-08-29 10:59:16 -0700
commit1106eb77ab9e1d17ec77772b625e4f861d793892 (patch)
treec555313137a5e24cd28467839c2d74705ad6f930 /arch/x86
parentf752e6ce7fb498af66d014cd3287288640c72328 (diff)
Initialize the device tree pointer to NULL in i386.
If the device tree pointer isn't set to anything, which could happen if the device tree isn't found, for instance, or simply never set up, the pointer could be set to something arbitrary. This change forces initializes it to NULL so that it's more obviously not set. BUG=chrome-os-partner:4993 TEST=Built and booted u-boot on coreboot, used temporary printfs to print the device tree pointer when booting chromeos, and verified that the pointer was NULL if not set. Change-Id: I9c6c34da6f3309b31a1fda920c6b139d728561f3 Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: http://gerrit.chromium.org/gerrit/4884 Reviewed-by: Stefan Reinauer <reinauer@google.com> Tested-by: Gabe Black <gabeblack@chromium.org>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/lib/board.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c
index cc8da475b5..c5ff44d793 100644
--- a/arch/x86/lib/board.c
+++ b/arch/x86/lib/board.c
@@ -296,6 +296,8 @@ void board_init_r(gd_t *id, ulong dest_addr)
/* compiler optimization barrier needed for GCC >= 3.4 */
__asm__ __volatile__("": : :"memory");
+ gd->blob = NULL;
+
gd->bd = &bd_data;
memset (gd->bd, 0, sizeof (bd_t));
show_boot_progress(0x22);