Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/include/vfp.h
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | struct vfpstate { | ||||
uint32_t vfp_fpcr; | uint32_t vfp_fpcr; | ||||
uint32_t vfp_fpsr; | uint32_t vfp_fpsr; | ||||
}; | }; | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
struct pcb; | struct pcb; | ||||
struct thread; | struct thread; | ||||
void vfp_init(void); | void vfp_init_secondary(void); | ||||
void vfp_enable(void); | void vfp_enable(void); | ||||
void vfp_disable(void); | void vfp_disable(void); | ||||
void vfp_discard(struct thread *); | void vfp_discard(struct thread *); | ||||
void vfp_store(struct vfpstate *); | void vfp_store(struct vfpstate *); | ||||
void vfp_restore(struct vfpstate *); | void vfp_restore(struct vfpstate *); | ||||
void vfp_new_thread(struct thread *, struct thread *, bool); | void vfp_new_thread(struct thread *, struct thread *, bool); | ||||
void vfp_reset_state(struct thread *, struct pcb *); | void vfp_reset_state(struct thread *, struct pcb *); | ||||
void vfp_restore_state(void); | void vfp_restore_state(void); | ||||
Show All 10 Lines | |||||
#define FPU_KERN_NOCTX 0x0004 | #define FPU_KERN_NOCTX 0x0004 | ||||
struct fpu_kern_ctx *fpu_kern_alloc_ctx(u_int); | struct fpu_kern_ctx *fpu_kern_alloc_ctx(u_int); | ||||
void fpu_kern_free_ctx(struct fpu_kern_ctx *); | void fpu_kern_free_ctx(struct fpu_kern_ctx *); | ||||
void fpu_kern_enter(struct thread *, struct fpu_kern_ctx *, u_int); | 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_leave(struct thread *, struct fpu_kern_ctx *); | ||||
int fpu_kern_thread(u_int); | int fpu_kern_thread(u_int); | ||||
int is_fpu_kern_thread(u_int); | int is_fpu_kern_thread(u_int); | ||||
struct vfpstate *fpu_save_area_alloc(void); | |||||
void fpu_save_area_free(struct vfpstate *fsa); | |||||
void fpu_save_area_reset(struct vfpstate *fsa); | |||||
/* Convert to and from Aarch32 FPSCR to Aarch64 FPCR/FPSR */ | /* Convert to and from Aarch32 FPSCR to Aarch64 FPCR/FPSR */ | ||||
#define VFP_FPSCR_FROM_SRCR(vpsr, vpcr) ((vpsr) | ((vpcr) & 0x7c00000)) | #define VFP_FPSCR_FROM_SRCR(vpsr, vpcr) ((vpsr) | ((vpcr) & 0x7c00000)) | ||||
#define VFP_FPSR_FROM_FPSCR(vpscr) ((vpscr) &~ 0x7c00000) | #define VFP_FPSR_FROM_FPSCR(vpscr) ((vpscr) &~ 0x7c00000) | ||||
#define VFP_FPCR_FROM_FPSCR(vpsrc) ((vpsrc) & 0x7c00000) | #define VFP_FPCR_FROM_FPSCR(vpsrc) ((vpsrc) & 0x7c00000) | ||||
#ifdef COMPAT_FREEBSD32 | #ifdef COMPAT_FREEBSD32 | ||||
void get_fpcontext32(struct thread *td, mcontext32_vfp_t *mcp); | void get_fpcontext32(struct thread *td, mcontext32_vfp_t *mcp); | ||||
void set_fpcontext32(struct thread *td, mcontext32_vfp_t *mcp); | void set_fpcontext32(struct thread *td, mcontext32_vfp_t *mcp); | ||||
#endif | #endif | ||||
#endif | #endif | ||||
#endif | #endif | ||||
#endif /* !_MACHINE_VFP_H_ */ | #endif /* !_MACHINE_VFP_H_ */ |