diff options
Diffstat (limited to 'sys/arm/include/vfp.h')
-rw-r--r-- | sys/arm/include/vfp.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/sys/arm/include/vfp.h b/sys/arm/include/vfp.h index b9cc6efb9589..1a9f8e2c448a 100644 --- a/sys/arm/include/vfp.h +++ b/sys/arm/include/vfp.h @@ -1,5 +1,5 @@ /*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2012 Mark Tinguely * @@ -25,7 +25,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * $FreeBSD$ */ #ifndef _MACHINE__VFP_H_ @@ -139,6 +138,11 @@ #define COPROC10 (0x3 << 20) #define COPROC11 (0x3 << 22) +#define FPU_KERN_NORMAL 0x0000 +#define FPU_KERN_NOWAIT 0x0001 +#define FPU_KERN_KTHR 0x0002 +#define FPU_KERN_NOCTX 0x0004 + #ifndef LOCORE struct vfp_state { uint64_t reg[32]; @@ -152,8 +156,21 @@ struct vfp_state { void get_vfpcontext(struct thread *, mcontext_vfp_t *); void set_vfpcontext(struct thread *, mcontext_vfp_t *); void vfp_init(void); +void vfp_new_thread(struct thread*, struct thread*, bool); void vfp_store(struct vfp_state *, boolean_t); void vfp_discard(struct thread *); +void vfp_restore_state(void); +void vfp_save_state(struct thread *, struct pcb *); + +struct fpu_kern_ctx; + +struct fpu_kern_ctx *fpu_kern_alloc_ctx(u_int); +void fpu_kern_free_ctx(struct fpu_kern_ctx *); +void fpu_kern_enter(struct thread *, struct fpu_kern_ctx *, u_int); +int fpu_kern_leave(struct thread *, struct fpu_kern_ctx *); +int fpu_kern_thread(u_int); +int is_fpu_kern_thread(u_int); + #endif /* _KERNEL */ #endif /* LOCORE */ |