Hi Mark, On Tuesday 18 May 2010 07:26:34 Mark Tomlinson wrote: > Our hardware has part of the flash mapped in two address ranges. > The CONFIG_SYS_MONITOR_BASE is in the upper 'boot' area, whereas > the CONFIG_SYS_FLASH_BANKS_LIST has the full flash available at > a lower address.
Just to be sure: You have 2 FLASH chips? Mapped at which addresses? And where does CONFIG_SYS_MONITOR_BASE point to? > This all works fine until the code in cfi_flash.c:flash_init(), which > uses flash_get_info() to find the flash_info_t associated with the > monitor and environment. These are not in the probed flash range, so > flash_get_info() returns NULL. You mean that "flash_get_info(CONFIG_SYS_MONITOR_BASE)" returns NULL? Please explain again, why is this the case? > This is not checked and is passed > directly to flash_protect(). Since flash_protect() was not checking > for this NULL pointer either, random memory would be clobbered > causing the device to lock up. > > This patch changes flash_protect() to check for the NULL, and the > error goes unreported. I would prefer to fix the real problem, that flash_get_info() returns NULL, instead. Cheers, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot