xref: /titanic_41/usr/src/uts/sparc/sys/fpu/fpusystm.h (revision 2b24ab6b3865caeede9eeb9db6b83e1d89dcd1ea)
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, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _SYS_FPU_FPUSYSTM_H
28 #define	_SYS_FPU_FPUSYSTM_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 /*
33  * ISA-dependent FPU interfaces
34  */
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 #ifdef _KERNEL
41 
42 struct fpu;
43 struct regs;
44 
45 #if !defined(DEBUG) && !defined(NEED_FPU_EXISTS)
46 #define	fpu_exists 1
47 #else
48 extern int fpu_exists;
49 #endif
50 
51 extern int fpu_version;
52 extern int fpdispr;
53 
54 extern void fpu_probe(void);
55 extern void fp_disable(void);
56 extern void fp_disabled(struct regs *);
57 extern void fp_clearregs(kfpu_t *);
58 extern void fp_enable(void);
59 extern void fp_fksave(kfpu_t *);
60 extern void fp_runq(struct regs *);
61 extern void fp_load(kfpu_t *);
62 extern void fp_save(kfpu_t *);
63 extern void fp_restore(kfpu_t *);
64 extern void run_fpq(klwp_t *, fpregset_t *);
65 extern void syncfpu(void);
66 extern void _fp_read_pfsr(uint64_t *fsr);
67 extern void _fp_write_pfsr(uint64_t *);
68 extern void _fp_read_pfreg(uint32_t *, uint_t);
69 extern void _fp_write_pfreg(uint32_t *, uint_t);
70 extern void fp_free(kfpu_t *, int);
71 extern void fp_fork(klwp_t *, klwp_t *);
72 extern void fp_v8_load(kfpu_t *);
73 extern void fp_v8p_load(kfpu_t *);
74 extern void fp_v8_fksave(kfpu_t *);
75 extern void fp_v8p_fksave(kfpu_t *);
76 extern uint32_t _fp_read_fprs(void);
77 extern void _fp_write_fprs(uint32_t);
78 extern void save_gsr(kfpu_t *);
79 extern void restore_gsr(kfpu_t *);
80 extern uint64_t get_gsr(kfpu_t *);
81 extern void set_gsr(uint64_t, kfpu_t *);
82 extern uint64_t _fp_read_pgsr(kfpu_t *);
83 extern void _fp_write_pgsr(uint64_t, kfpu_t *);
84 extern void _fp_read_pdreg(uint64_t *, uint_t);
85 extern void _fp_write_pdreg(uint64_t *, uint_t);
86 
87 #endif	/* _KERNEL */
88 
89 #ifdef __cplusplus
90 }
91 #endif
92 
93 #endif	/* _SYS_FPU_FPUSYSTM_H */
94