From 93f6a6771ba04b217e4c8bbca9196fd16e364479 Mon Sep 17 00:00:00 2001 From: wdenk Date: Thu, 1 Jul 2004 20:28:03 +0000 Subject: * Patches by Richard Woodruff, 10 Jun 2004: - fix problems with examples/stubs.c for GCC >= 3.4 - fix problems with gd initialization * Enable FAT filesystem support for HMI10 board --- lib_arm/board.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib_arm') diff --git a/lib_arm/board.c b/lib_arm/board.c index e97e158..7673d06 100644 --- a/lib_arm/board.c +++ b/lib_arm/board.c @@ -217,6 +217,9 @@ void start_armboot (void) /* Pointer is writable since we allocated a register for it */ gd = (gd_t*)(_armboot_start - CFG_MALLOC_LEN - sizeof(gd_t)); + /* compiler optimization barrier needed for GCC >= 3.4 */ + __asm__ __volatile__("": : :"memory"); + memset ((void*)gd, 0, sizeof (gd_t)); gd->bd = (bd_t*)((char*)gd - sizeof(bd_t)); memset (gd->bd, 0, sizeof (bd_t)); -- cgit v1.1