[U-Boot] [PATCH 04/13] Fix IXP code to work after relocation was added

Wolfgang Denk
2011-01-25T20:42:00Z

Dear Michael Schwingen,

In message <1294062338-21084-5-git-send-email-michael@schwingen.org> you wrote:
> - jump to real flash location after reset before turning off flash mirror
> - fix timer system to use HZ == 1000, remove broken interrupt-based code
>
> Signed-off-by: Michael Schwingen <michael@schwingen.org>
> ---
> arch/arm/cpu/ixp/cpu.c | 5 --
> arch/arm/cpu/ixp/start.S | 59 ++--------------
> arch/arm/cpu/ixp/timer.c | 125 +++++++++++++++-----------------
> arch/arm/include/asm/arch-ixp/ixp425.h | 5 +-
> 4 files changed, 66 insertions(+), 128 deletions(-)
...
> -int timer_init (void)
> +static ulong timestamp;
> +static ulong lastinc;

This code is broken. You must not access any variables in BSS segment
(like these two) before relocation.

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If the facts don't fit the theory, change the facts.
-- Albert Einstein