Home | History | Annotate | Line # | Download | only in include
      1  1.15     skrll /*	$NetBSD: sysarch.h,v 1.15 2021/10/06 05:33:15 skrll Exp $	*/
      2   1.1      matt 
      3   1.1      matt /*
      4   1.1      matt  * Copyright (c) 1996-1997 Mark Brinicombe.
      5   1.1      matt  * All rights reserved.
      6   1.1      matt  *
      7   1.1      matt  * Redistribution and use in source and binary forms, with or without
      8   1.1      matt  * modification, are permitted provided that the following conditions
      9   1.1      matt  * are met:
     10   1.1      matt  * 1. Redistributions of source code must retain the above copyright
     11   1.1      matt  *    notice, this list of conditions and the following disclaimer.
     12   1.1      matt  * 2. Redistributions in binary form must reproduce the above copyright
     13   1.1      matt  *    notice, this list of conditions and the following disclaimer in the
     14   1.1      matt  *    documentation and/or other materials provided with the distribution.
     15   1.1      matt  * 3. All advertising materials mentioning features or use of this software
     16   1.1      matt  *    must display the following acknowledgement:
     17   1.1      matt  *	This product includes software developed by Mark Brinicombe.
     18   1.1      matt  * 4. The name of the company nor the name of the author may be used to
     19   1.1      matt  *    endorse or promote products derived from this software without specific
     20   1.1      matt  *    prior written permission.
     21   1.1      matt  *
     22   1.1      matt  * THIS SOFTWARE IS PROVIDED BY AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
     23   1.1      matt  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     24   1.1      matt  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     25   1.1      matt  * IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
     26   1.1      matt  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
     27   1.1      matt  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
     28   1.1      matt  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     29   1.1      matt  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     30   1.1      matt  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     31   1.1      matt  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     32   1.1      matt  * SUCH DAMAGE.
     33   1.1      matt  */
     34   1.1      matt 
     35   1.1      matt #ifndef _ARM_SYSARCH_H_
     36   1.1      matt #define _ARM_SYSARCH_H_
     37   1.3     chris 
     38   1.5    kleink #include <sys/cdefs.h>
     39   1.5    kleink 
     40   1.3     chris /*
     41  1.12     joerg  * Pickup definition of size_t and uintptr_t
     42   1.3     chris  */
     43  1.12     joerg #include <machine/ansi.h>
     44   1.3     chris #include <sys/stdint.h>
     45  1.10      matt #ifndef _KERNEL
     46  1.10      matt #include <stdbool.h>
     47  1.10      matt #endif
     48   1.1      matt 
     49  1.12     joerg #ifdef	_BSD_SIZE_T_
     50  1.12     joerg typedef	_BSD_SIZE_T_ size_t;
     51  1.12     joerg #undef	_BSD_SIZE_T_
     52  1.12     joerg #endif
     53  1.12     joerg 
     54   1.1      matt /*
     55   1.4   thorpej  * Architecture specific syscalls (arm)
     56   1.1      matt  */
     57   1.1      matt 
     58   1.4   thorpej #define ARM_SYNC_ICACHE		0
     59   1.4   thorpej #define ARM_DRAIN_WRITEBUF	1
     60   1.8      matt #define ARM_VFP_FPSCR		2
     61   1.9      matt #define ARM_FPU_USED		3
     62   1.1      matt 
     63   1.4   thorpej struct arm_sync_icache_args {
     64   1.2      matt 	uintptr_t	addr;		/* Virtual start address */
     65   1.2      matt 	size_t		len;		/* Region size */
     66   1.1      matt };
     67   1.1      matt 
     68   1.8      matt struct arm_vfp_fpscr_args {
     69   1.8      matt 	uint32_t	fpscr_clear;	/* bits to clear */
     70   1.8      matt 	uint32_t	fpscr_set;	/* bits to set */
     71   1.8      matt };
     72   1.8      matt 
     73   1.9      matt struct arm_unaligned_faults_args {
     74  1.15     skrll 	bool		enabled;	/* unaligned faults are enabled */
     75   1.9      matt };
     76   1.9      matt 
     77   1.1      matt #ifndef _KERNEL
     78   1.5    kleink __BEGIN_DECLS
     79  1.14  christos int	arm_sync_icache(uintptr_t, size_t);
     80  1.14  christos int	arm_drain_writebuf(void);
     81  1.14  christos int	sysarch(int, void *);
     82   1.5    kleink __END_DECLS
     83   1.1      matt #endif
     84   1.1      matt 
     85   1.1      matt #endif /* !_ARM_SYSARCH_H_ */
     86