Global data pointer has to be initialised Global data area has to be zeroised
Signed-off-by: Christophe Leroy <christophe.le...@c-s.fr> --- arch/powerpc/cpu/mpc8xx/cpu_init.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/cpu/mpc8xx/cpu_init.c b/arch/powerpc/cpu/mpc8xx/cpu_init.c index dc601a12976..3c9c4b19753 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc8xx/cpu_init.c @@ -12,6 +12,8 @@ #include <commproc.h> #include <asm/io.h> +DECLARE_GLOBAL_DATA_PTR; + /* * Breath some life into the CPU... * @@ -24,6 +26,10 @@ void cpu_init_f(immap_t __iomem *immr) memctl8xx_t __iomem *memctl = &immr->im_memctl; ulong reg; + gd = (gd_t *)(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET); + /* Clear initial global data */ + memset((void *)gd, 0, sizeof(*gd)); + /* SYPCR - contains watchdog control (11-9) */ out_be32(&immr->im_siu_conf.sc_sypcr, CONFIG_SYS_SYPCR); -- 2.13.3 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot