cvs commit: src/sys/amd64/include clock.h timerreg.h src/sys/amd64/isa clock.c src/sys/dev/speaker spkr.c src/sys/dev/syscons syscons.c src/sys/i386/i386 trap.c src/sys/i386/include clock.h timerreg.h src/sys/i386/isa clock.c ...

Poul-Henning Kamp phk at
Wed Mar 26 13:09:22 PDT 2008

phk         2008-03-26 20:09:21 UTC

  FreeBSD src repository

  Modified files:
    sys/amd64/include    clock.h timerreg.h 
    sys/amd64/isa        clock.c 
    sys/dev/speaker      spkr.c 
    sys/dev/syscons      syscons.c 
    sys/i386/i386        trap.c 
    sys/i386/include     clock.h timerreg.h 
    sys/i386/isa         clock.c 
    sys/ia64/ia64        machdep.c 
    sys/ia64/include     clock.h 
    sys/isa              syscons_isa.c 
    sys/kern             tty_cons.c 
    sys/pc98/cbus        clock.c syscons_cbus.c 
    sys/pc98/include     clock.h timerreg.h 
    sys/powerpc/aim      clock.c 
    sys/powerpc/booke    clock.c 
    sys/powerpc/include  clock.h 
    sys/sparc64/include  clock.h 
    sys/sparc64/sparc64  clock.c 
    sys/sun4v/include    clock.h 
    sys/sys              systm.h 
  The "free-lance" timer in the i8254 is only used for the speaker
  these days, so de-generalize the acquire_timer/release_timer api
  to just deal with speakers.
  The new (optional) MD functions are:
  the last of which configures the timer to generate a tone of a given
  frequency, in Hz instead of 1/1193182th of seconds.
  Drop entirely timer2 on pc98, it is not used anywhere at all.
  Move sysbeep() to kern/tty_cons.c and use the timer_spkr*() if
  they exist, and do nothing otherwise.
  Remove prototypes and empty acquire-/release-timer() and sysbeep()
  functions from the non-beeping archs.
  This eliminate the need for the speaker driver to know about
  i8254frequency at all.  In theory this makes the speaker driver MI,
  contingent on the timer_spkr_*() functions existing but the driver
  does not know this yet and still attaches to the ISA bus.
  Syscons is more tricky, in one function, sc_tone(), it knows the hz
  and things are just fine.
  In the other function, sc_bell() it seems to get the period from
  the KDMKTONE ioctl in terms if 1/1193182th second, so we hardcode
  the 1193182 and leave it at that.  It's probably not important.
  Change a few other sysbeep() uses which obviously knew that the
  argument was in terms of i8254 frequency, and leave alone those
  that look like people thought sysbeep() took frequency in hertz.
  This eliminates the knowledge of i8254_freq from all but the actual
  clock.c code and the prof_machdep.c on amd64 and i386, where I think
  it would be smart to ask for help from the timecounters anyway [TBD].
  Revision  Changes    Path
  1.58      +5 -3      src/sys/amd64/include/clock.h
  1.3       +0 -11     src/sys/amd64/include/timerreg.h
  1.239     +18 -36    src/sys/amd64/isa/clock.c
  1.74      +1 -4      src/sys/dev/speaker/spkr.c
  1.459     +1 -1      src/sys/dev/syscons/syscons.c
  1.313     +2 -2      src/sys/i386/i386/trap.c
  1.60      +5 -3      src/sys/i386/include/clock.h
  1.3       +0 -11     src/sys/i386/include/timerreg.h
  1.244     +19 -36    src/sys/i386/isa/clock.c
  1.234     +0 -6      src/sys/ia64/ia64/machdep.c
  1.12      +0 -2      src/sys/ia64/include/clock.h
  1.31      +1 -1      src/sys/isa/syscons_isa.c
  1.143     +51 -0     src/sys/kern/tty_cons.c
  1.165     +14 -63    src/sys/pc98/cbus/clock.c
  1.26      +1 -1      src/sys/pc98/cbus/syscons_cbus.c
  1.3       +0 -5      src/sys/pc98/include/clock.h
  1.3       +0 -11     src/sys/pc98/include/timerreg.h
  1.31      +0 -10     src/sys/powerpc/aim/clock.c
  1.2       +0 -10     src/sys/powerpc/booke/clock.c
  1.14      +0 -4      src/sys/powerpc/include/clock.h
  1.8       +0 -2      src/sys/sparc64/include/clock.h
  1.11      +0 -9      src/sys/sparc64/sparc64/clock.c
  1.2       +0 -2      src/sys/sun4v/include/clock.h
  1.265     +2 -0      src/sys/sys/systm.h

More information about the cvs-src mailing list