xref: /titanic_41/usr/src/uts/intel/sys/cpu.h (revision 672986541be54a7a471bb088e60780c37e371d7e)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef _SYS_CPU_H
27 #define	_SYS_CPU_H
28 
29 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30 
31 /*
32  * WARNING:
33  *	This header file is Obsolete and may be deleted in a
34  *	future release of Solaris.
35  */
36 
37 /*
38  * Include generic bustype cookies.
39  */
40 #include <sys/bustypes.h>
41 #include <sys/inttypes.h>
42 #if defined(__GNUC__) && defined(_ASM_INLINES) && defined(_KERNEL)
43 #include <asm/cpu.h>
44 #endif
45 
46 #ifdef	__cplusplus
47 extern "C" {
48 #endif
49 
50 #if defined(_KERNEL)
51 extern void ht_pause(void);
52 extern void cli(void);
53 extern void sti(void);
54 extern void i86_halt(void);
55 extern void i86_monitor(volatile uint32_t *addr, uint32_t extensions,
56     uint32_t hints);
57 extern void i86_mwait(uint32_t data, uint32_t extensions);
58 
59 /*
60  * Used to insert cpu-dependent instructions into spin loops
61  */
62 #define	SMT_PAUSE()		ht_pause()
63 
64 #endif	/* _KERNEL */
65 
66 #ifdef	__cplusplus
67 }
68 #endif
69 
70 #endif	/* _SYS_CPU_H */
71