vdso.h revision 305866
1139804Simp/*-
2185435Sbz * Copyright 2012 Konstantin Belousov <kib@FreeBSD.ORG>.
3185435Sbz * Copyright 2016 The FreeBSD Foundation.
4185435Sbz * All rights reserved.
5185404Sbz *
6185404Sbz * Portions of this software were developed by Konstantin Belousov
7185404Sbz * under sponsorship from the FreeBSD Foundation.
8185404Sbz *
9185404Sbz * Redistribution and use in source and binary forms, with or without
10185404Sbz * modification, are permitted provided that the following conditions
11185404Sbz * are met:
12185404Sbz * 1. Redistributions of source code must retain the above copyright
13185404Sbz *    notice, this list of conditions and the following disclaimer.
14185404Sbz * 2. Redistributions in binary form must reproduce the above copyright
15185404Sbz *    notice, this list of conditions and the following disclaimer in the
16185404Sbz *    documentation and/or other materials provided with the distribution.
17185404Sbz *
18185404Sbz * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19185404Sbz * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20185404Sbz * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21185404Sbz * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22185404Sbz * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23185404Sbz * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24185404Sbz * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25185404Sbz * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2646197Sphk * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2746155Sphk * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28116182Sobrien *
29116182Sobrien * $FreeBSD: stable/11/sys/x86/include/vdso.h 305866 2016-09-16 10:04:28Z kib $
30116182Sobrien */
31185435Sbz
32185435Sbz#ifndef _X86_VDSO_H
33185435Sbz#define	_X86_VDSO_H
34131177Spjd
35131177Spjd#define	VDSO_TIMEHANDS_MD			\
3646155Sphk	uint32_t	th_x86_shift;		\
3746155Sphk	uint32_t	th_x86_hpet_idx;	\
3846155Sphk	uint32_t	th_res[6];
3946155Sphk
4046155Sphk#define	VDSO_TH_ALGO_X86_TSC	VDSO_TH_ALGO_1
4146155Sphk#define	VDSO_TH_ALGO_X86_HPET	VDSO_TH_ALGO_2
4246155Sphk
43164032Srwatson#ifdef _KERNEL
4446155Sphk#ifdef COMPAT_FREEBSD32
45124882Srwatson
46177785Skib#define	VDSO_TIMEHANDS_MD32	VDSO_TIMEHANDS_MD
4746155Sphk
4887275Srwatson#endif
4987275Srwatson#endif
50168401Spjd#endif
51113275Smike