1 1.9.14.1 bouyer /* $NetBSD: sysarch.h,v 1.9.14.1 2000/11/20 20:09:31 bouyer Exp $ */ 2 1.3 cgd 3 1.2 mycroft #ifndef _I386_SYSARCH_H_ 4 1.2 mycroft #define _I386_SYSARCH_H_ 5 1.2 mycroft 6 1.1 brezak /* 7 1.1 brezak * Architecture specific syscalls (i386) 8 1.1 brezak */ 9 1.1 brezak #define I386_GET_LDT 0 10 1.1 brezak #define I386_SET_LDT 1 11 1.7 mycroft #define I386_IOPL 2 12 1.7 mycroft #define I386_GET_IOPERM 3 13 1.7 mycroft #define I386_SET_IOPERM 4 14 1.8 mycroft #define I386_VM86 5 15 1.9.14.1 bouyer #define I386_PMC_INFO 8 16 1.9.14.1 bouyer #define I386_PMC_STARTSTOP 9 17 1.9.14.1 bouyer #define I386_PMC_READ 10 18 1.5 mycroft 19 1.5 mycroft struct i386_get_ldt_args { 20 1.5 mycroft int start; 21 1.5 mycroft union descriptor *desc; 22 1.5 mycroft int num; 23 1.5 mycroft }; 24 1.5 mycroft 25 1.5 mycroft struct i386_set_ldt_args { 26 1.5 mycroft int start; 27 1.5 mycroft union descriptor *desc; 28 1.5 mycroft int num; 29 1.5 mycroft }; 30 1.1 brezak 31 1.7 mycroft struct i386_iopl_args { 32 1.7 mycroft int iopl; 33 1.7 mycroft }; 34 1.7 mycroft 35 1.7 mycroft struct i386_get_ioperm_args { 36 1.7 mycroft u_long *iomap; 37 1.7 mycroft }; 38 1.7 mycroft 39 1.7 mycroft struct i386_set_ioperm_args { 40 1.7 mycroft u_long *iomap; 41 1.7 mycroft }; 42 1.7 mycroft 43 1.9.14.1 bouyer struct i386_pmc_info_args { 44 1.9.14.1 bouyer int type; 45 1.9.14.1 bouyer int flags; 46 1.9.14.1 bouyer }; 47 1.9.14.1 bouyer 48 1.9.14.1 bouyer #define PMC_TYPE_NONE 0 49 1.9.14.1 bouyer #define PMC_TYPE_I586 1 50 1.9.14.1 bouyer #define PMC_TYPE_I686 2 51 1.9.14.1 bouyer 52 1.9.14.1 bouyer #define PMC_INFO_HASTSC 0x01 53 1.9.14.1 bouyer 54 1.9.14.1 bouyer #define PMC_NCOUNTERS 2 55 1.9.14.1 bouyer 56 1.9.14.1 bouyer struct i386_pmc_startstop_args { 57 1.9.14.1 bouyer int counter; 58 1.9.14.1 bouyer u_int64_t val; 59 1.9.14.1 bouyer u_int8_t event; 60 1.9.14.1 bouyer u_int8_t unit; 61 1.9.14.1 bouyer u_int8_t compare; 62 1.9.14.1 bouyer u_int8_t flags; 63 1.9.14.1 bouyer }; 64 1.9.14.1 bouyer 65 1.9.14.1 bouyer #define PMC_SETUP_KERNEL 0x01 66 1.9.14.1 bouyer #define PMC_SETUP_USER 0x02 67 1.9.14.1 bouyer #define PMC_SETUP_EDGE 0x04 68 1.9.14.1 bouyer #define PMC_SETUP_INV 0x08 69 1.9.14.1 bouyer 70 1.9.14.1 bouyer struct i386_pmc_read_args { 71 1.9.14.1 bouyer int counter; 72 1.9.14.1 bouyer u_int64_t val; 73 1.9.14.1 bouyer u_int64_t time; 74 1.9.14.1 bouyer }; 75 1.9.14.1 bouyer 76 1.4 jtc #ifndef _KERNEL 77 1.1 brezak int i386_get_ldt __P((int, union descriptor *, int)); 78 1.1 brezak int i386_set_ldt __P((int, union descriptor *, int)); 79 1.7 mycroft int i386_iopl __P((int)); 80 1.7 mycroft int i386_get_ioperm __P((u_long *)); 81 1.7 mycroft int i386_set_ioperm __P((u_long *)); 82 1.9.14.1 bouyer int i386_pmc_info __P((struct i386_pmc_info_args *)); 83 1.9.14.1 bouyer int i386_pmc_startstop __P((struct i386_pmc_startstop_args *)); 84 1.9.14.1 bouyer int i386_pmc_read __P((struct i386_pmc_read_args *)); 85 1.9 perry int sysarch __P((int, void *)); 86 1.1 brezak #endif 87 1.2 mycroft 88 1.2 mycroft #endif /* !_I386_SYSARCH_H_ */ 89