Home | History | Annotate | Line # | Download | only in include
sysarch.h revision 1.10.6.1
      1 /*	$NetBSD: sysarch.h,v 1.10.6.1 2001/09/13 01:13:49 thorpej Exp $	*/
      2 
      3 #ifndef _I386_SYSARCH_H_
      4 #define _I386_SYSARCH_H_
      5 
      6 /*
      7  * Architecture specific syscalls (i386)
      8  */
      9 #define I386_GET_LDT	0
     10 #define I386_SET_LDT	1
     11 #define	I386_IOPL	2
     12 #define	I386_GET_IOPERM	3
     13 #define	I386_SET_IOPERM	4
     14 #define	I386_VM86	5
     15 #define	I386_PMC_INFO	8
     16 #define	I386_PMC_STARTSTOP 9
     17 #define	I386_PMC_READ	10
     18 #define I386_GET_MTRR	11
     19 #define I386_SET_MTRR	12
     20 
     21 struct i386_get_ldt_args {
     22 	int start;
     23 	union descriptor *desc;
     24 	int num;
     25 };
     26 
     27 struct i386_set_ldt_args {
     28 	int start;
     29 	union descriptor *desc;
     30 	int num;
     31 };
     32 
     33 struct i386_get_mtrr_args {
     34 	struct mtrr *mtrrp;
     35 	int *n;
     36 };
     37 
     38 struct i386_set_mtrr_args {
     39 	struct mtrr *mtrrp;
     40 	int *n;
     41 };
     42 
     43 struct i386_iopl_args {
     44 	int iopl;
     45 };
     46 
     47 struct i386_get_ioperm_args {
     48 	u_long *iomap;
     49 };
     50 
     51 struct i386_set_ioperm_args {
     52 	u_long *iomap;
     53 };
     54 
     55 struct i386_pmc_info_args {
     56 	int	type;
     57 	int	flags;
     58 };
     59 
     60 #define	PMC_TYPE_NONE		0
     61 #define	PMC_TYPE_I586		1
     62 #define	PMC_TYPE_I686		2
     63 
     64 #define	PMC_INFO_HASTSC		0x01
     65 
     66 #define	PMC_NCOUNTERS		2
     67 
     68 struct i386_pmc_startstop_args {
     69 	int counter;
     70 	u_int64_t val;
     71 	u_int8_t event;
     72 	u_int8_t unit;
     73 	u_int8_t compare;
     74 	u_int8_t flags;
     75 };
     76 
     77 #define	PMC_SETUP_KERNEL	0x01
     78 #define	PMC_SETUP_USER		0x02
     79 #define	PMC_SETUP_EDGE		0x04
     80 #define	PMC_SETUP_INV		0x08
     81 
     82 struct i386_pmc_read_args {
     83 	int counter;
     84 	u_int64_t val;
     85 	u_int64_t time;
     86 };
     87 
     88 struct mtrr;
     89 
     90 #ifndef _KERNEL
     91 int i386_get_ldt __P((int, union descriptor *, int));
     92 int i386_set_ldt __P((int, union descriptor *, int));
     93 int i386_iopl __P((int));
     94 int i386_get_ioperm __P((u_long *));
     95 int i386_set_ioperm __P((u_long *));
     96 int i386_pmc_info __P((struct i386_pmc_info_args *));
     97 int i386_pmc_startstop __P((struct i386_pmc_startstop_args *));
     98 int i386_pmc_read __P((struct i386_pmc_read_args *));
     99 int i386_set_mtrr __P((struct mtrr *, int *));
    100 int i386_get_mtrr __P((struct mtrr *, int *));
    101 int sysarch __P((int, void *));
    102 #endif
    103 
    104 #endif /* !_I386_SYSARCH_H_ */
    105