Home | History | Annotate | Line # | Download | only in include
sysarch.h revision 1.1.2.4
      1  1.1.2.4  skrll /*	$NetBSD: sysarch.h,v 1.1.2.4 2005/11/10 13:51:35 skrll Exp $	*/
      2      1.1   fvdl 
      3      1.1   fvdl #ifndef _AMD64_SYSARCH_H_
      4      1.1   fvdl #define _AMD64_SYSARCH_H_
      5      1.1   fvdl 
      6      1.1   fvdl /*
      7      1.1   fvdl  * Architecture specific syscalls (amd64)
      8      1.1   fvdl  */
      9      1.1   fvdl #define X86_64_GET_LDT	0
     10      1.1   fvdl #define X86_64_SET_LDT	1
     11      1.1   fvdl #define	X86_64_IOPL	2
     12      1.1   fvdl #define	X86_64_GET_IOPERM	3
     13      1.1   fvdl #define	X86_64_SET_IOPERM	4
     14      1.1   fvdl #define	X86_64_VM86	5
     15      1.1   fvdl #define	X86_64_PMC_INFO	8
     16      1.1   fvdl #define	X86_64_PMC_STARTSTOP 9
     17      1.1   fvdl #define	X86_64_PMC_READ	10
     18      1.1   fvdl #define X86_64_GET_MTRR   11
     19      1.1   fvdl #define X86_64_SET_MTRR   12
     20      1.1   fvdl 
     21      1.1   fvdl /*
     22      1.1   fvdl  * XXXfvdl todo.
     23      1.1   fvdl  */
     24      1.1   fvdl 
     25      1.1   fvdl struct x86_64_get_ldt_args {
     26  1.1.2.4  skrll 	void *desc;
     27  1.1.2.4  skrll 	unsigned len;
     28      1.1   fvdl };
     29      1.1   fvdl 
     30      1.1   fvdl struct x86_64_set_ldt_args {
     31  1.1.2.4  skrll 	void *desc;
     32  1.1.2.4  skrll 	unsigned len;
     33      1.1   fvdl };
     34      1.1   fvdl 
     35      1.1   fvdl struct x86_64_iopl_args {
     36      1.1   fvdl 	int iopl;
     37      1.1   fvdl };
     38      1.1   fvdl 
     39      1.1   fvdl #if 0
     40      1.1   fvdl 
     41      1.1   fvdl struct x86_64_get_ioperm_args {
     42      1.1   fvdl 	u_long *iomap;
     43      1.1   fvdl };
     44      1.1   fvdl 
     45      1.1   fvdl struct x86_64_set_ioperm_args {
     46      1.1   fvdl 	u_long *iomap;
     47      1.1   fvdl };
     48      1.1   fvdl 
     49      1.1   fvdl struct x86_64_pmc_info_args {
     50      1.1   fvdl 	int	type;
     51      1.1   fvdl 	int	flags;
     52      1.1   fvdl };
     53      1.1   fvdl 
     54      1.1   fvdl #define	PMC_TYPE_NONE		0
     55      1.1   fvdl #define	PMC_TYPE_I586		1
     56      1.1   fvdl #define	PMC_TYPE_I686		2
     57      1.1   fvdl 
     58      1.1   fvdl #define	PMC_INFO_HASTSC		0x01
     59      1.1   fvdl 
     60      1.1   fvdl #define	PMC_NCOUNTERS		2
     61      1.1   fvdl 
     62      1.1   fvdl struct x86_64_pmc_startstop_args {
     63      1.1   fvdl 	int counter;
     64      1.1   fvdl 	u_int64_t val;
     65      1.1   fvdl 	u_int8_t event;
     66      1.1   fvdl 	u_int8_t unit;
     67      1.1   fvdl 	u_int8_t compare;
     68      1.1   fvdl 	u_int8_t flags;
     69      1.1   fvdl };
     70      1.1   fvdl 
     71      1.1   fvdl #define	PMC_SETUP_KERNEL	0x01
     72      1.1   fvdl #define	PMC_SETUP_USER		0x02
     73      1.1   fvdl #define	PMC_SETUP_EDGE		0x04
     74      1.1   fvdl #define	PMC_SETUP_INV		0x08
     75      1.1   fvdl 
     76      1.1   fvdl struct x86_64_pmc_read_args {
     77      1.1   fvdl 	int counter;
     78      1.1   fvdl 	u_int64_t val;
     79      1.1   fvdl 	u_int64_t time;
     80      1.1   fvdl };
     81      1.1   fvdl 
     82      1.1   fvdl #endif /* todo */
     83      1.1   fvdl 
     84      1.1   fvdl struct x86_64_get_mtrr_args {
     85      1.1   fvdl 	struct mtrr *mtrrp;
     86      1.1   fvdl 	int *n;
     87      1.1   fvdl };
     88      1.1   fvdl 
     89      1.1   fvdl struct x86_64_set_mtrr_args {
     90      1.1   fvdl 	struct mtrr *mtrrp;
     91      1.1   fvdl 	int *n;
     92      1.1   fvdl };
     93      1.1   fvdl 
     94      1.1   fvdl 
     95      1.1   fvdl #ifdef _KERNEL
     96      1.1   fvdl int x86_64_iopl __P((struct lwp *, void *, register_t *));
     97      1.1   fvdl int x86_64_get_mtrr __P((struct lwp *, void *, register_t *));
     98      1.1   fvdl int x86_64_set_mtrr __P((struct lwp *, void *, register_t *));
     99      1.1   fvdl #else
    100  1.1.2.1  skrll #include <sys/cdefs.h>
    101  1.1.2.1  skrll 
    102  1.1.2.1  skrll __BEGIN_DECLS
    103  1.1.2.4  skrll int x86_64_get_ldt __P((void *, int));
    104  1.1.2.4  skrll int x86_64_set_ldt __P((void *, int));
    105      1.1   fvdl int x86_64_iopl __P((int));
    106      1.1   fvdl int x86_64_get_ioperm __P((u_long *));
    107      1.1   fvdl int x86_64_set_ioperm __P((u_long *));
    108      1.1   fvdl int x86_64_pmc_info __P((struct x86_64_pmc_info_args *));
    109      1.1   fvdl int x86_64_pmc_startstop __P((struct x86_64_pmc_startstop_args *));
    110      1.1   fvdl int x86_64_pmc_read __P((struct x86_64_pmc_read_args *));
    111      1.1   fvdl int x86_64_set_mtrr __P((struct mtrr *, int *));
    112      1.1   fvdl int x86_64_get_mtrr __P((struct mtrr *, int *));
    113      1.1   fvdl int sysarch __P((int, void *));
    114  1.1.2.1  skrll __END_DECLS
    115      1.1   fvdl #endif
    116      1.1   fvdl 
    117      1.1   fvdl #endif /* !_AMD64_SYSARCH_H_ */
    118