[U-Boot-Users] [PATCH 3/3][MIPS] lib_mips/time.c: Fix improper use of CFG_HZ and timer routines

Wolfgang Denk wd at denx.de
Sat May 24 21:59:11 CEST 2008


In message <483811E4.3070209 at ruby.dti.ne.jp> you wrote:
> 
> This patch adds 3 global variables; timestamp, cycles_per_jiffy, expirelo.
> timestamp is a 32-bit non-overflowing CFG_HZ counter. cycles_per_jiffy is
> calculated counter cycles in a CFG_HZ. And expirelo holds the count value
> for next CPU timer expiration.

Be careful - keep in mind that variables in the data segment will  be
read-only  before  relocation  to  RAM,  and variables in BSS will be
uninitialized *and* get overwritten  with  zero  when  the  BSS  gets
initialized.

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 a group of N persons implements a COBOL compiler,  there  will  be
N-1 passes. Someone in the group has to be the manager. - T. Cheatham




More information about the U-Boot mailing list