Deleted Added
full compact
npx.h (189418) npx.h (208833)
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 16 unchanged lines hidden (view full) ---

25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * from: @(#)npx.h 5.3 (Berkeley) 1/18/91
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 16 unchanged lines hidden (view full) ---

25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * from: @(#)npx.h 5.3 (Berkeley) 1/18/91
33 * $FreeBSD: head/sys/i386/include/npx.h 189418 2009-03-05 18:32:43Z jhb $
33 * $FreeBSD: head/sys/i386/include/npx.h 208833 2010-06-05 15:59:59Z kib $
34 */
35
36/*
37 * 287/387 NPX Coprocessor Data Structures and Constants
38 * W. Jolitz 1/90
39 */
40
41#ifndef _MACHINE_NPX_H_

--- 96 unchanged lines hidden (view full) ---

138
139#ifdef _KERNEL
140
141#define IO_NPX 0x0F0 /* Numeric Coprocessor */
142#define IO_NPXSIZE 16 /* 80387/80487 NPX registers */
143
144#define IRQ_NPX 13
145
34 */
35
36/*
37 * 287/387 NPX Coprocessor Data Structures and Constants
38 * W. Jolitz 1/90
39 */
40
41#ifndef _MACHINE_NPX_H_

--- 96 unchanged lines hidden (view full) ---

138
139#ifdef _KERNEL
140
141#define IO_NPX 0x0F0 /* Numeric Coprocessor */
142#define IO_NPXSIZE 16 /* 80387/80487 NPX registers */
143
144#define IRQ_NPX 13
145
146struct fpu_kern_ctx {
147 union savefpu hwstate;
148 union savefpu *prev;
149 uint32_t flags;
150};
151#define FPU_KERN_CTX_NPXINITDONE 0x01
152
153#define PCB_USER_FPU(pcb) (((pcb)->pcb_flags & PCB_KERNNPX) == 0)
154
146/* full reset on some systems, NOP on others */
147#define npx_full_reset() outb(IO_NPX + 1, 0)
148
149int npxdna(void);
150void npxdrop(void);
151void npxexit(struct thread *td);
152int npxformat(void);
153int npxgetregs(struct thread *td, union savefpu *addr);
155/* full reset on some systems, NOP on others */
156#define npx_full_reset() outb(IO_NPX + 1, 0)
157
158int npxdna(void);
159void npxdrop(void);
160void npxexit(struct thread *td);
161int npxformat(void);
162int npxgetregs(struct thread *td, union savefpu *addr);
163int npxgetuserregs(struct thread *td, union savefpu *addr);
154void npxinit(void);
155void npxsave(union savefpu *addr);
156void npxsetregs(struct thread *td, union savefpu *addr);
164void npxinit(void);
165void npxsave(union savefpu *addr);
166void npxsetregs(struct thread *td, union savefpu *addr);
167void npxsetuserregs(struct thread *td, union savefpu *addr);
157int npxtrap(void);
168int npxtrap(void);
169int fpu_kern_enter(struct thread *td, struct fpu_kern_ctx *ctx,
170 u_int flags);
171int fpu_kern_leave(struct thread *td, struct fpu_kern_ctx *ctx);
172int fpu_kern_thread(u_int flags);
173int is_fpu_kern_thread(u_int flags);
158
174
175/*
176 * Flags for fpu_kern_enter() and fpu_kern_thread().
177 */
178#define FPU_KERN_NORMAL 0x0000
179
159#endif
160
161#endif /* !_MACHINE_NPX_H_ */
180#endif
181
182#endif /* !_MACHINE_NPX_H_ */