[U-Boot-Users] ./cpu/mpc8260/cpu_init.c: cpu_init_f(): gd pointing to wrong location?
KokHow Teh
KokHow.Teh at marconi.com
Wed Mar 23 04:00:34 CET 2005
Hi;
I am using u-boot-1.1.2.tar.bz2 and I am referring to cpu/mpc8260
arch.
The MPC8260ADS.h defines the temporary ram and the global data structure
locations as follows:
#define CFG_INIT_RAM_ADDR CFG_IMMR
#define CFG_INIT_RAM_END 0x2000 /* End of used area in DPRAM */
#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for
initial data */
#define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
#define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
does cpu_init_f() in cpu_init.c calculate the address of gd pointer
wrongly?
/* Pointer is writable since we allocated a register for it */
gd = (gd_t *) (CFG_INIT_RAM_ADDR + CFG_GBL_DATA_OFFSET);
Shouldn't it be:
/* Pointer is writable since we allocated a register for it */
gd = (gd_t *) (CFG_GBL_DATA_OFFSET);
???
Am I missing something..?
Regards,
TEH
More information about the U-Boot
mailing list