Date: Fri, 3 Dec 2010 13:56:29 -0800 From: mdf@FreeBSD.org To: Jung-uk Kim <jkim@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r216161 - in head/sys: amd64/amd64 i386/i386 Message-ID: <AANLkTi=mFhQQd8%2BseT4mi7yPw%2Bz9tunpMd4rVrUoyO7x@mail.gmail.com> In-Reply-To: <201012032154.oB3LsADC035461@svn.freebsd.org> References: <201012032154.oB3LsADC035461@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Dec 3, 2010 at 1:54 PM, Jung-uk Kim <jkim@freebsd.org> wrote: > Author: jkim > Date: Fri Dec =A03 21:54:10 2010 > New Revision: 216161 > URL: http://svn.freebsd.org/changeset/base/216161 > > Log: > =A0Explicitly initialize TSC frequency. =A0To calibrate TSC frequency, we= use > =A0DELAY(9) and it may use TSC in turn if TSC frequency is non-zero. Doesn't ELF guarantee that the static data is already 0? On AIX the kernel had to explicitly zero the non-initialized data area, but AIX uses the a.out format. I thought FreeBSD/ELF meant that global variables without initializers were 0 by the time the OS started running. Thanks, matthew > > =A0MFC after: =A0 =A03 days > > Modified: > =A0head/sys/amd64/amd64/tsc.c > =A0head/sys/i386/i386/tsc.c > > Modified: head/sys/amd64/amd64/tsc.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/amd64/amd64/tsc.c =A0Fri Dec =A03 21:52:01 2010 =A0 =A0 =A0 = =A0(r216160) > +++ head/sys/amd64/amd64/tsc.c =A0Fri Dec =A03 21:54:10 2010 =A0 =A0 =A0 = =A0(r216161) > @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); > > =A0#include "cpufreq_if.h" > > -uint64_t =A0 =A0 =A0 tsc_freq; > +uint64_t =A0 =A0 =A0 tsc_freq =3D 0; > =A0int =A0 =A0 =A0 =A0 =A0 =A0tsc_is_broken; > =A0int =A0 =A0 =A0 =A0 =A0 =A0tsc_is_invariant; > =A0static eventhandler_tag tsc_levels_tag, tsc_pre_tag, tsc_post_tag; > > Modified: head/sys/i386/i386/tsc.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/i386/i386/tsc.c =A0 =A0Fri Dec =A03 21:52:01 2010 =A0 =A0 = =A0 =A0(r216160) > +++ head/sys/i386/i386/tsc.c =A0 =A0Fri Dec =A03 21:54:10 2010 =A0 =A0 = =A0 =A0(r216161) > @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); > > =A0#include "cpufreq_if.h" > > -uint64_t =A0 =A0 =A0 tsc_freq; > +uint64_t =A0 =A0 =A0 tsc_freq =3D 0; > =A0int =A0 =A0 =A0 =A0 =A0 =A0tsc_is_broken; > =A0int =A0 =A0 =A0 =A0 =A0 =A0tsc_is_invariant; > =A0u_int =A0 =A0 =A0 =A0 =A0tsc_present; >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=mFhQQd8%2BseT4mi7yPw%2Bz9tunpMd4rVrUoyO7x>