[U-Boot-Users] CFG_MONITOR_BASE < CFG_FLASH_BASE

Timur Tabi timur at freescale.com
Wed May 16 22:47:08 CEST 2007


In several board config files (namely 8xxx boards), I see code that looks like this:

#if (CFG_MONITOR_BASE < CFG_FLASH_BASE)
#define CFG_RAMBOOT
#else
#undef  CFG_RAMBOOT
#endif

...

#ifndef CFG_RAMBOOT
   #define CFG_ENV_IS_IN_FLASH	1
   #define CFG_ENV_ADDR		(CFG_MONITOR_BASE + CFG_MONITOR_LEN)
   #define CFG_ENV_SECT_SIZE	0x40000	/* 256K(one sector) for env */
   #define CFG_ENV_SIZE		0x2000
#else
   #define CFG_NO_FLASH		1	/* Flash is not usable now */
   #define CFG_ENV_IS_NOWHERE	1	/* Store ENV in memory only */
   #define CFG_ENV_ADDR		(CFG_MONITOR_BASE - 0x1000)
   #define CFG_ENV_SIZE		0x2000
#endif

So CFG_RAMBOOT is defined if U-Boot is located in RAM instead of in Flash.

On a system that has flash, why would we ever support this configuration?  It doesn't even 
make any sense, because a whole bunch of DDR and LAWBAR setup needs to happen before RAM 
can even be accessed, so you can't copy u-boot to RAM and reset the system.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale




More information about the U-Boot mailing list