freebsd-skq/sys/x86/include
kib 7b36a08108 Implement mechanism to export some kernel timekeeping data to
usermode, using shared page.  The structures and functions have vdso
prefix, to indicate the intended location of the code in some future.

The versioned per-algorithm data is exported in the format of struct
vdso_timehands, which mostly repeats the content of in-kernel struct
timehands. Usermode reading of the structure can be lockless.
Compatibility export for 32bit processes on 64bit host is also
provided. Kernel also provides usermode with indication about
currently used timecounter, so that libc can fall back to syscall if
configured timecounter is unknown to usermode code.

The shared data updates are initiated both from the tc_windup(), where
a fast task is queued to do the update, and from sysctl handlers which
change timecounter. A manual override switch
kern.timecounter.fast_gettime allows to turn off the mechanism.

Only x86 architectures export the real algorithm data, and there, only
for tsc timecounter. HPET counters page could be exported as well, but
I prefer to not further glue the kernel and libc ABI there until
proper vdso-based solution is developed.

Minimal stubs neccessary for non-x86 architectures to still compile
are provided.

Discussed with:	bde
Reviewed by:	jhb
Tested by:	flo
MFC after:	1 month
2012-06-22 07:06:40 +00:00
..
_align.h Merge amd64/i386 _align.h by aligning on the size of register_t (copied 2010-11-26 10:59:20 +00:00
_inttypes.h Copy powerpc/include/_inttypes.h to x86 and replace i386/amd64/pc98 2011-01-08 18:09:48 +00:00
_limits.h Consitently use "__LP64__". 2012-05-24 21:44:46 +00:00
_stdint.h Consitently use "__LP64__". 2012-05-24 21:44:46 +00:00
_types.h Consitently use "__LP64__". 2012-05-24 21:44:46 +00:00
apicreg.h
apm_bios.h Move identical copies of apm_bios.h to sys/x86/include, replace them with 2010-11-11 19:36:21 +00:00
bus.h Merge amd64 and i386 bus.h and move the resulting header to x86. Replace 2010-12-20 16:39:43 +00:00
endian.h Fix an issue introduced in sys/x86/include/endian.h with r232721. In 2012-03-29 23:31:48 +00:00
float.h Consitently use "__LP64__". 2012-05-24 21:44:46 +00:00
fpu.h Move userland bits of i386 npx.h and amd64 fpu.h to x86 fpu.h. 2012-03-16 20:24:30 +00:00
legacyvar.h Move the legacy(4) driver to x86. 2012-03-30 19:10:14 +00:00
mca.h Make machine check exception logging more readable. On newer Intel systems, 2012-04-02 15:07:22 +00:00
mptable.h Fix build when NEW_PCIB is not defined. 2011-07-16 14:05:34 +00:00
pci_cfgreg.h Move {amd64,i386}/pci/pci_bus.c and {amd64,i386}/include/pci_cfgreg.h to 2011-06-22 21:04:13 +00:00
psl.h Copy i386 psl.h to x86 and replace amd64/i386/pc98 psl.h with stubs. 2012-03-19 21:29:57 +00:00
ptrace.h Don't expose i386-only ptrace constants on amd64. This broke gdb with 2012-05-17 20:21:55 +00:00
reg.h Eliminate ia32_reg.h by moving its contents to x86 and ia64 reg.h. 2012-03-18 19:12:11 +00:00
segments.h Move the DTrace return IDT vector back up from 0x20 to 0x92. The 0x20 2012-03-28 16:32:17 +00:00
setjmp.h Copy amd64 setjmp.h to x86 and replace amd64/i386/pc98 setjmp.h with stubs. 2012-02-28 22:17:52 +00:00
specialreg.h Add x2apic MSR definitions 2012-04-17 00:54:38 +00:00
stdarg.h Copy amd64 stdarg.h to x86 and replace amd64/i386/pc98 stdarg.h with stubs. 2012-02-28 22:30:58 +00:00
sysarch.h Copy amd64 sysarch.h to x86 and merge with i386 sysarch.h. Replace 2012-03-19 21:57:31 +00:00
trap.h Copy amd64 trap.h to x86 and replace amd64/i386/pc98 trap.h with stubs. 2012-03-04 14:12:57 +00:00
vdso.h Implement mechanism to export some kernel timekeeping data to 2012-06-22 07:06:40 +00:00