1 /* $OpenBSD: sysarch.h,v 1.8 2011/04/04 21:50:41 pirofti Exp $ */ 2 /* $NetBSD: sysarch.h,v 1.8 1996/01/08 13:51:44 mycroft Exp $ */ 3 4 #ifndef _MACHINE_SYSARCH_H_ 5 #define _MACHINE_SYSARCH_H_ 6 7 /* 8 * Architecture specific syscalls (i386) 9 */ 10 #define I386_GET_LDT 0 11 #define I386_SET_LDT 1 12 #define I386_IOPL 2 13 #define I386_GET_IOPERM 3 14 #define I386_SET_IOPERM 4 15 #define I386_VM86 5 16 #define I386_GET_FSBASE 6 17 #define I386_SET_FSBASE 7 18 #define I386_GET_GSBASE 8 19 #define I386_SET_GSBASE 9 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_iopl_args { 34 int iopl; 35 }; 36 37 struct i386_get_ioperm_args { 38 u_long *iomap; 39 }; 40 41 struct i386_set_ioperm_args { 42 u_long *iomap; 43 }; 44 45 #ifndef _KERNEL 46 int i386_get_ldt(int, union descriptor *, int); 47 int i386_set_ldt(int, union descriptor *, int); 48 int i386_iopl(int); 49 int i386_get_ioperm(u_long *); 50 int i386_set_ioperm(u_long *); 51 int i386_get_fsbase(void **); 52 int i386_set_fsbase(void *); 53 int i386_get_gsbase(void **); 54 int i386_set_gsbase(void *); 55 int sysarch(int, void *); 56 #else 57 int i386_get_threadbase(struct proc *, void *, int); 58 int i386_set_threadbase(struct proc *, void *, int); 59 #endif 60 61 #endif /* !_MACHINE_SYSARCH_H_ */ 62