tls.h revision 232583
1139826Simp/*-
253541Sshin * Copyright (c) 2012 Oleksandr Tymoshenko
353541Sshin * All rights reserved.
453541Sshin *
553541Sshin * Redistribution and use in source and binary forms, with or without
653541Sshin * modification, are permitted provided that the following conditions
753541Sshin * are met:
853541Sshin * 1. Redistributions of source code must retain the above copyright
953541Sshin *    notice, this list of conditions, and the following disclaimer,
1053541Sshin *    without modification, immediately at the beginning of the file.
1153541Sshin * 2. Redistributions in binary form must reproduce the above copyright
1253541Sshin *    notice, this list of conditions and the following disclaimer in
1353541Sshin *    the documentation and/or other materials provided with the
1453541Sshin *    distribution.
1553541Sshin *
1653541Sshin * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1753541Sshin * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1853541Sshin * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1953541Sshin * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
2053541Sshin * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2153541Sshin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2253541Sshin * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2353541Sshin * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2453541Sshin * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2553541Sshin * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2653541Sshin * SUCH DAMAGE.
2753541Sshin *
28174510Sobrien * $FreeBSD: head/sys/mips/include/tls.h 232583 2012-03-06 07:47:28Z jmallett $
29174510Sobrien *
30174510Sobrien */
3153541Sshin
3253541Sshin#ifndef	__MIPS_TLS_H__
3353541Sshin#define	__MIPS_TLS_H__
3462587Sitojun
3553541Sshin#if defined(_KERNEL) && !defined(KLD_MODULE) && !defined(_STANDALONE)
3653541Sshin#include "opt_compat.h"
37241916Sdelphij#endif
38241916Sdelphij
39241916Sdelphij/*
40241916Sdelphij * TLS parameters
41241916Sdelphij */
42241916Sdelphij
43250251Shrs#define TLS_TP_OFFSET	0x7000
4453541Sshin#define TLS_DTP_OFFSET	0x8000
4553541Sshin
4653541Sshin#ifdef __mips_n64
47#define TLS_TCB_SIZE	16
48#ifdef COMPAT_FREEBSD32
49#define TLS_TCB_SIZE32	8
50#endif
51#else
52#define TLS_TCB_SIZE	8
53#endif
54
55#endif	/* __MIPS_TLS_H__ */
56