1 1.10 thorpej /* $NetBSD: sysarch.h,v 1.10 2000/09/13 04:47:01 thorpej 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.10 thorpej #define I386_PMC_INFO 8 16 1.10 thorpej #define I386_PMC_STARTSTOP 9 17 1.10 thorpej #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.10 thorpej struct i386_pmc_info_args { 44 1.10 thorpej int type; 45 1.10 thorpej int flags; 46 1.10 thorpej }; 47 1.10 thorpej 48 1.10 thorpej #define PMC_TYPE_NONE 0 49 1.10 thorpej #define PMC_TYPE_I586 1 50 1.10 thorpej #define PMC_TYPE_I686 2 51 1.10 thorpej 52 1.10 thorpej #define PMC_INFO_HASTSC 0x01 53 1.10 thorpej 54 1.10 thorpej #define PMC_NCOUNTERS 2 55 1.10 thorpej 56 1.10 thorpej struct i386_pmc_startstop_args { 57 1.10 thorpej int counter; 58 1.10 thorpej u_int64_t val; 59 1.10 thorpej u_int8_t event; 60 1.10 thorpej u_int8_t unit; 61 1.10 thorpej u_int8_t compare; 62 1.10 thorpej u_int8_t flags; 63 1.10 thorpej }; 64 1.10 thorpej 65 1.10 thorpej #define PMC_SETUP_KERNEL 0x01 66 1.10 thorpej #define PMC_SETUP_USER 0x02 67 1.10 thorpej #define PMC_SETUP_EDGE 0x04 68 1.10 thorpej #define PMC_SETUP_INV 0x08 69 1.10 thorpej 70 1.10 thorpej struct i386_pmc_read_args { 71 1.10 thorpej int counter; 72 1.10 thorpej u_int64_t val; 73 1.10 thorpej u_int64_t time; 74 1.10 thorpej }; 75 1.10 thorpej 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.10 thorpej int i386_pmc_info __P((struct i386_pmc_info_args *)); 83 1.10 thorpej int i386_pmc_startstop __P((struct i386_pmc_startstop_args *)); 84 1.10 thorpej 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