1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-21 11:13:30 +00:00
Mirror of the FreeBSD src repository https://git.FreeBSD.org/src.git .
Go to file
Alexander Motin 875b8844be Implement new event timers infrastructure. It provides unified APIs for
writing event timer drivers, for choosing best possible drivers by machine
independent code and for operating them to supply kernel with hardclock(),
statclock() and profclock() events in unified fashion on various hardware.

Infrastructure provides support for both per-CPU (independent for every CPU
core) and global timers in periodic and one-shot modes. MI management code
at this moment uses only periodic mode, but one-shot mode use planned for
later, as part of tickless kernel project.

For this moment infrastructure used on i386 and amd64 architectures. Other
archs are welcome to follow, while their current operation should not be
affected.

This patch updates existing drivers (i8254, RTC and LAPIC) for the new
order, and adds event timers support into the HPET driver. These drivers
have different capabilities:
 LAPIC - per-CPU timer, supports periodic and one-shot operation, may
freeze in C3 state, calibrated on first use, so may be not exactly precise.
 HPET - depending on hardware can work as per-CPU or global, supports
periodic and one-shot operation, usually provides several event timers.
 i8254 - global, limited to periodic mode, because same hardware used also
as time counter.
 RTC - global, supports only periodic mode, set of frequencies in Hz
limited by powers of 2.

Depending on hardware capabilities, drivers preferred in following orders,
either LAPIC, HPETs, i8254, RTC or HPETs, LAPIC, i8254, RTC.
User may explicitly specify wanted timers via loader tunables or sysctls:
kern.eventtimer.timer1 and kern.eventtimer.timer2.
If requested driver is unavailable or unoperational, system will try to
replace it. If no more timers available or "NONE" specified for second,
system will operate using only one timer, multiplying it's frequency by few
times and uing respective dividers to honor hz, stathz and profhz values,
set during initial setup.
2010-06-20 21:33:29 +00:00
bin Recognise the -l switch with pkill - list kill command(s) used. 2010-06-20 08:48:30 +00:00
cddl Unbreak platforms with char unsigned by default. Oddly enough, GCC isn't 2010-06-20 00:34:06 +00:00
contrib Make mandoc/mdocml happy. 2010-06-15 11:37:33 +00:00
crypto More commas 2010-06-01 22:46:57 +00:00
etc Remove vestiges of 'slip'. 2010-06-19 09:21:34 +00:00
games random(6): avoid dead assignments 2010-06-14 13:03:25 +00:00
gnu Often reported issue with newer ld is: 2010-06-18 11:09:51 +00:00
include libedit: Allow simple quoting in filename completion. 2010-06-15 21:34:57 +00:00
kerberos5 Fix a typo. 2010-01-09 18:53:03 +00:00
lib Merge from English r198040: add C message catalogue entries for newer 2010-06-20 06:52:10 +00:00
libexec Merge jmallett@'s n64 work into HEAD - changeset 3 2010-06-16 16:39:01 +00:00
release Remove an unnecessary cat. 2010-06-19 09:33:11 +00:00
rescue Enable liblzma support in libarchive 2010-05-10 15:28:44 +00:00
sbin Small style fixes: 2010-06-20 12:52:33 +00:00
secure Regenerate manual pages for OpenSSL 0.9.8n. 2010-04-01 15:37:38 +00:00
share - Fix typo, it should have been c78.7 2010-06-17 13:59:41 +00:00
sys Implement new event timers infrastructure. It provides unified APIs for 2010-06-20 21:33:29 +00:00
tools Remove vestiges of 'slip'. 2010-06-19 09:21:34 +00:00
usr.bin Add a -t switch for masking output that's above or below certain thresholds. 2010-06-20 08:27:03 +00:00
usr.sbin Clean up item_add and remove -fno-strict-aliasing from CFLAGS. Note that 2010-06-20 04:14:49 +00:00
COPYRIGHT Happy New Year 2010! :-) 2009-12-31 10:00:37 +00:00
LOCKS
MAINTAINERS Add a comment to MAINTAINERS indicating that sbin/routed is in fact 2010-04-10 12:29:09 +00:00
Makefile Connect FDT infrastructure to the build system. 2010-06-13 13:02:43 +00:00
Makefile.inc1 Use awk alone for extracting FDT_DTS_FILE instead of grep/cut, which is 2010-06-16 16:52:35 +00:00
ObsoleteFiles.inc - Add versioned symbols to liblzma 2010-05-14 20:40:37 +00:00
README
UPDATING Note 8.0-RELEASE. 2010-05-12 21:20:04 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html