1*168cd830Schristos /* $NetBSD: procfs_fpregs.c,v 1.17 2006/11/16 01:33:38 christos Exp $ */
2aad01611Sagc
3aad01611Sagc /*
4aad01611Sagc * Copyright (c) 1993
5aad01611Sagc * The Regents of the University of California. All rights reserved.
6aad01611Sagc *
7aad01611Sagc * This code is derived from software contributed to Berkeley by
8aad01611Sagc * Jan-Simon Pendry.
9aad01611Sagc *
10aad01611Sagc * Redistribution and use in source and binary forms, with or without
11aad01611Sagc * modification, are permitted provided that the following conditions
12aad01611Sagc * are met:
13aad01611Sagc * 1. Redistributions of source code must retain the above copyright
14aad01611Sagc * notice, this list of conditions and the following disclaimer.
15aad01611Sagc * 2. Redistributions in binary form must reproduce the above copyright
16aad01611Sagc * notice, this list of conditions and the following disclaimer in the
17aad01611Sagc * documentation and/or other materials provided with the distribution.
18aad01611Sagc * 3. Neither the name of the University nor the names of its contributors
19aad01611Sagc * may be used to endorse or promote products derived from this software
20aad01611Sagc * without specific prior written permission.
21aad01611Sagc *
22aad01611Sagc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23aad01611Sagc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24aad01611Sagc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25aad01611Sagc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26aad01611Sagc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27aad01611Sagc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28aad01611Sagc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29aad01611Sagc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30aad01611Sagc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31aad01611Sagc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32aad01611Sagc * SUCH DAMAGE.
33aad01611Sagc *
34aad01611Sagc * @(#)procfs_fpregs.c 8.2 (Berkeley) 6/15/94
35aad01611Sagc */
36cf92afd6Scgd
37cde1d475Smycroft /*
38cde1d475Smycroft * Copyright (c) 1993 Jan-Simon Pendry
39cde1d475Smycroft *
40cde1d475Smycroft * This code is derived from software contributed to Berkeley by
41cde1d475Smycroft * Jan-Simon Pendry.
42cde1d475Smycroft *
43cde1d475Smycroft * Redistribution and use in source and binary forms, with or without
44cde1d475Smycroft * modification, are permitted provided that the following conditions
45cde1d475Smycroft * are met:
46cde1d475Smycroft * 1. Redistributions of source code must retain the above copyright
47cde1d475Smycroft * notice, this list of conditions and the following disclaimer.
48cde1d475Smycroft * 2. Redistributions in binary form must reproduce the above copyright
49cde1d475Smycroft * notice, this list of conditions and the following disclaimer in the
50cde1d475Smycroft * documentation and/or other materials provided with the distribution.
51cde1d475Smycroft * 3. All advertising materials mentioning features or use of this software
52cde1d475Smycroft * must display the following acknowledgement:
53cde1d475Smycroft * This product includes software developed by the University of
54cde1d475Smycroft * California, Berkeley and its contributors.
55cde1d475Smycroft * 4. Neither the name of the University nor the names of its contributors
56cde1d475Smycroft * may be used to endorse or promote products derived from this software
57cde1d475Smycroft * without specific prior written permission.
58cde1d475Smycroft *
59cde1d475Smycroft * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
60cde1d475Smycroft * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
61cde1d475Smycroft * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
62cde1d475Smycroft * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
63cde1d475Smycroft * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
64cde1d475Smycroft * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
65cde1d475Smycroft * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
66cde1d475Smycroft * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
67cde1d475Smycroft * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
68cde1d475Smycroft * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
69cde1d475Smycroft * SUCH DAMAGE.
70cde1d475Smycroft *
71cf92afd6Scgd * @(#)procfs_fpregs.c 8.2 (Berkeley) 6/15/94
72cde1d475Smycroft */
73cde1d475Smycroft
74e4b00f43Slukem #include <sys/cdefs.h>
75*168cd830Schristos __KERNEL_RCSID(0, "$NetBSD: procfs_fpregs.c,v 1.17 2006/11/16 01:33:38 christos Exp $");
76e4b00f43Slukem
77cde1d475Smycroft #include <sys/param.h>
78b78f59b4Sthorpej #include <sys/systm.h>
79b78f59b4Sthorpej #include <sys/time.h>
80b78f59b4Sthorpej #include <sys/kernel.h>
81cde1d475Smycroft #include <sys/proc.h>
82cde1d475Smycroft #include <sys/vnode.h>
83f1f51aa2Sthorpej #include <sys/ptrace.h>
84f1f51aa2Sthorpej
85cde1d475Smycroft #include <miscfs/procfs/procfs.h>
86cde1d475Smycroft
87cde1d475Smycroft int
procfs_dofpregs(struct lwp * curl,struct lwp * l,struct pfsnode * pfs,struct uio * uio)884d595fd7Schristos procfs_dofpregs(
894d595fd7Schristos struct lwp *curl, /* tracer */
904d595fd7Schristos struct lwp *l, /* traced */
91*168cd830Schristos struct pfsnode *pfs,
924d595fd7Schristos struct uio *uio
934d595fd7Schristos )
94cde1d475Smycroft {
95cde1d475Smycroft
9695e1ffb1Schristos return (process_dofpregs(curl, l, uio));
97cde1d475Smycroft }
98cde1d475Smycroft
99cde1d475Smycroft int
procfs_validfpregs(struct lwp * l,struct mount * mp)100*168cd830Schristos procfs_validfpregs(struct lwp *l, struct mount *mp)
101cde1d475Smycroft {
102cde1d475Smycroft
10395e1ffb1Schristos return (process_validfpregs(l));
104cde1d475Smycroft }
105