xref: /freebsd/sys/compat/linux/linux_misc.h (revision 1ca16454b3ca76ddf706aa419d6fcda0998002a6)
1955d762aSAlexander Leidinger /*-
2955d762aSAlexander Leidinger  * Copyright (c) 2006 Roman Divacky
3955d762aSAlexander Leidinger  * All rights reserved.
4955d762aSAlexander Leidinger  *
5955d762aSAlexander Leidinger  * Redistribution and use in source and binary forms, with or without
6955d762aSAlexander Leidinger  * modification, are permitted provided that the following conditions
7955d762aSAlexander Leidinger  * are met:
8955d762aSAlexander Leidinger  * 1. Redistributions of source code must retain the above copyright
9955d762aSAlexander Leidinger  *    notice, this list of conditions and the following disclaimer
10955d762aSAlexander Leidinger  *    in this position and unchanged.
11955d762aSAlexander Leidinger  * 2. Redistributions in binary form must reproduce the above copyright
12955d762aSAlexander Leidinger  *    notice, this list of conditions and the following disclaimer in the
13955d762aSAlexander Leidinger  *    documentation and/or other materials provided with the distribution.
14955d762aSAlexander Leidinger  * 3. The name of the author may not be used to endorse or promote products
15955d762aSAlexander Leidinger  *    derived from this software without specific prior written permission
16955d762aSAlexander Leidinger  *
17955d762aSAlexander Leidinger  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18955d762aSAlexander Leidinger  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19955d762aSAlexander Leidinger  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20955d762aSAlexander Leidinger  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21955d762aSAlexander Leidinger  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22955d762aSAlexander Leidinger  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23955d762aSAlexander Leidinger  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24955d762aSAlexander Leidinger  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25955d762aSAlexander Leidinger  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26955d762aSAlexander Leidinger  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27955d762aSAlexander Leidinger  *
28955d762aSAlexander Leidinger  * $FreeBSD$
29955d762aSAlexander Leidinger  */
30955d762aSAlexander Leidinger 
31955d762aSAlexander Leidinger #ifndef _LINUX_MISC_H_
32955d762aSAlexander Leidinger #define	_LINUX_MISC_H_
33955d762aSAlexander Leidinger 
34955d762aSAlexander Leidinger /* defines for prctl */
35ef95cfeaSAlexander Leidinger #define	LINUX_PR_SET_PDEATHSIG  1	/* Second arg is a signal. */
36ef95cfeaSAlexander Leidinger #define	LINUX_PR_GET_PDEATHSIG  2	/*
37ef95cfeaSAlexander Leidinger 					 * Second arg is a ptr to return the
38ef95cfeaSAlexander Leidinger 					 * signal.
39ef95cfeaSAlexander Leidinger 					 */
40ef95cfeaSAlexander Leidinger #define	LINUX_PR_SET_NAME	15	/* Set process name. */
41ef95cfeaSAlexander Leidinger #define	LINUX_PR_GET_NAME	16	/* Get process name. */
42955d762aSAlexander Leidinger 
43ef95cfeaSAlexander Leidinger #define	LINUX_MAX_COMM_LEN	16	/* Maximum length of the process name. */
44955d762aSAlexander Leidinger 
45cbd2c621SKonstantin Belousov #define	LINUX_MREMAP_MAYMOVE	1
46cbd2c621SKonstantin Belousov #define	LINUX_MREMAP_FIXED	2
47cbd2c621SKonstantin Belousov 
484d7c2e8aSDmitry Chagin extern const char *linux_platform;
494d7c2e8aSDmitry Chagin 
504d7c2e8aSDmitry Chagin /*
514d7c2e8aSDmitry Chagin  * Non-standard aux entry types used in Linux ELF binaries.
524d7c2e8aSDmitry Chagin  */
534d7c2e8aSDmitry Chagin 
544d7c2e8aSDmitry Chagin #define	LINUX_AT_PLATFORM	15	/* String identifying CPU */
554d7c2e8aSDmitry Chagin #define	LINUX_AT_HWCAP		16	/* CPU capabilities */
564d7c2e8aSDmitry Chagin #define	LINUX_AT_CLKTCK		17	/* frequency at which times() increments */
574d7c2e8aSDmitry Chagin #define	LINUX_AT_SECURE		23	/* secure mode boolean */
584d7c2e8aSDmitry Chagin #define	LINUX_AT_BASE_PLATFORM	24	/* string identifying real platform, may
594d7c2e8aSDmitry Chagin 					 * differ from AT_PLATFORM.
604d7c2e8aSDmitry Chagin 					 */
614d7c2e8aSDmitry Chagin #define	LINUX_AT_EXECFN		31	/* filename of program */
624d7c2e8aSDmitry Chagin 
632ee8325fSJohn Baldwin /* Linux sets the i387 to extended precision. */
642ee8325fSJohn Baldwin #if defined(__i386__) || defined(__amd64__)
652ee8325fSJohn Baldwin #define	__LINUX_NPXCW__		0x37f
662ee8325fSJohn Baldwin #endif
672ee8325fSJohn Baldwin 
681ca16454SDmitry Chagin extern int stclohz;
691ca16454SDmitry Chagin 
70955d762aSAlexander Leidinger #endif	/* _LINUX_MISC_H_ */
71