2000-09-13 08:47:00 +04:00
|
|
|
/* $NetBSD: sysarch.h,v 1.10 2000/09/13 04:47:01 thorpej Exp $ */
|
1994-10-27 07:14:23 +03:00
|
|
|
|
1993-12-20 08:25:02 +03:00
|
|
|
#ifndef _I386_SYSARCH_H_
|
|
|
|
#define _I386_SYSARCH_H_
|
|
|
|
|
1993-09-19 22:58:14 +04:00
|
|
|
/*
|
|
|
|
* Architecture specific syscalls (i386)
|
|
|
|
*/
|
|
|
|
#define I386_GET_LDT 0
|
|
|
|
#define I386_SET_LDT 1
|
1995-10-11 07:19:29 +03:00
|
|
|
#define I386_IOPL 2
|
|
|
|
#define I386_GET_IOPERM 3
|
|
|
|
#define I386_SET_IOPERM 4
|
1996-01-08 16:51:30 +03:00
|
|
|
#define I386_VM86 5
|
2000-09-13 08:47:00 +04:00
|
|
|
#define I386_PMC_INFO 8
|
|
|
|
#define I386_PMC_STARTSTOP 9
|
|
|
|
#define I386_PMC_READ 10
|
1993-09-19 22:58:14 +04:00
|
|
|
|
1995-05-06 23:19:57 +04:00
|
|
|
struct i386_get_ldt_args {
|
|
|
|
int start;
|
|
|
|
union descriptor *desc;
|
|
|
|
int num;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct i386_set_ldt_args {
|
|
|
|
int start;
|
|
|
|
union descriptor *desc;
|
|
|
|
int num;
|
|
|
|
};
|
|
|
|
|
1995-10-11 07:19:29 +03:00
|
|
|
struct i386_iopl_args {
|
|
|
|
int iopl;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct i386_get_ioperm_args {
|
|
|
|
u_long *iomap;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct i386_set_ioperm_args {
|
|
|
|
u_long *iomap;
|
|
|
|
};
|
|
|
|
|
2000-09-13 08:47:00 +04:00
|
|
|
struct i386_pmc_info_args {
|
|
|
|
int type;
|
|
|
|
int flags;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define PMC_TYPE_NONE 0
|
|
|
|
#define PMC_TYPE_I586 1
|
|
|
|
#define PMC_TYPE_I686 2
|
|
|
|
|
|
|
|
#define PMC_INFO_HASTSC 0x01
|
|
|
|
|
|
|
|
#define PMC_NCOUNTERS 2
|
|
|
|
|
|
|
|
struct i386_pmc_startstop_args {
|
|
|
|
int counter;
|
|
|
|
u_int64_t val;
|
|
|
|
u_int8_t event;
|
|
|
|
u_int8_t unit;
|
|
|
|
u_int8_t compare;
|
|
|
|
u_int8_t flags;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define PMC_SETUP_KERNEL 0x01
|
|
|
|
#define PMC_SETUP_USER 0x02
|
|
|
|
#define PMC_SETUP_EDGE 0x04
|
|
|
|
#define PMC_SETUP_INV 0x08
|
|
|
|
|
|
|
|
struct i386_pmc_read_args {
|
|
|
|
int counter;
|
|
|
|
u_int64_t val;
|
|
|
|
u_int64_t time;
|
|
|
|
};
|
|
|
|
|
1995-03-28 22:13:48 +04:00
|
|
|
#ifndef _KERNEL
|
1993-09-19 22:58:14 +04:00
|
|
|
int i386_get_ldt __P((int, union descriptor *, int));
|
|
|
|
int i386_set_ldt __P((int, union descriptor *, int));
|
1995-10-11 07:19:29 +03:00
|
|
|
int i386_iopl __P((int));
|
|
|
|
int i386_get_ioperm __P((u_long *));
|
|
|
|
int i386_set_ioperm __P((u_long *));
|
2000-09-13 08:47:00 +04:00
|
|
|
int i386_pmc_info __P((struct i386_pmc_info_args *));
|
|
|
|
int i386_pmc_startstop __P((struct i386_pmc_startstop_args *));
|
|
|
|
int i386_pmc_read __P((struct i386_pmc_read_args *));
|
1998-02-26 00:24:56 +03:00
|
|
|
int sysarch __P((int, void *));
|
1993-09-19 22:58:14 +04:00
|
|
|
#endif
|
1993-12-20 08:25:02 +03:00
|
|
|
|
|
|
|
#endif /* !_I386_SYSARCH_H_ */
|