summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/include/sysarch.h
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2004-02-27 23:45:56 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2004-02-27 23:45:56 +0000
commit1e9430b41c24a6cade530e3d23239b81338b3547 (patch)
treebf6cd12673ad664600e2a1a1fa1e2a343c53b600 /sys/arch/amd64/include/sysarch.h
parent4921339a9dca220d0b38262be57229e5646eec10 (diff)
move to amd64_() functions
Diffstat (limited to 'sys/arch/amd64/include/sysarch.h')
-rw-r--r--sys/arch/amd64/include/sysarch.h81
1 files changed, 36 insertions, 45 deletions
diff --git a/sys/arch/amd64/include/sysarch.h b/sys/arch/amd64/include/sysarch.h
index a026643116e..4a2ed77b4c5 100644
--- a/sys/arch/amd64/include/sysarch.h
+++ b/sys/arch/amd64/include/sysarch.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysarch.h,v 1.2 2004/02/26 01:46:49 deraadt Exp $ */
+/* $OpenBSD: sysarch.h,v 1.3 2004/02/27 23:45:55 deraadt Exp $ */
/* $NetBSD: sysarch.h,v 1.1 2003/04/26 18:39:48 fvdl Exp $ */
#ifndef _AMD64_SYSARCH_H_
@@ -7,53 +7,46 @@
/*
* Architecture specific syscalls (amd64)
*/
-#define X86_64_GET_LDT 0
-#define X86_64_SET_LDT 1
-#define X86_64_IOPL 2
-#define X86_64_GET_IOPERM 3
-#define X86_64_SET_IOPERM 4
-#define X86_64_VM86 5
-#define X86_64_PMC_INFO 8
-#define X86_64_PMC_STARTSTOP 9
-#define X86_64_PMC_READ 10
-#define X86_64_GET_MTRR 11
-#define X86_64_SET_MTRR 12
+#define AMD64_GET_LDT 0
+#define AMD64_SET_LDT 1
+#define AMD64_IOPL 2
+#define AMD64_GET_IOPERM 3
+#define AMD64_SET_IOPERM 4
+#define AMD64_VM86 5
+#define AMD64_PMC_INFO 8
+#define AMD64_PMC_STARTSTOP 9
+#define AMD64_PMC_READ 10
+#define AMD64_GET_MTRR 11
+#define AMD64_SET_MTRR 12
/*
- * XXXfvdl todo.
+ * XXX todo.
*/
-
-#if 1
-
-struct x86_64_get_ldt_args {
+struct amd64_get_ldt_args {
int start;
union descriptor *desc;
int num;
};
-struct x86_64_set_ldt_args {
+struct amd64_set_ldt_args {
int start;
union descriptor *desc;
int num;
};
-#endif
-
-struct x86_64_iopl_args {
+struct amd64_iopl_args {
int iopl;
};
-#if 1
-
-struct x86_64_get_ioperm_args {
+struct amd64_get_ioperm_args {
u_long *iomap;
};
-struct x86_64_set_ioperm_args {
+struct amd64_set_ioperm_args {
u_long *iomap;
};
-struct x86_64_pmc_info_args {
+struct amd64_pmc_info_args {
int type;
int flags;
};
@@ -66,7 +59,7 @@ struct x86_64_pmc_info_args {
#define PMC_NCOUNTERS 2
-struct x86_64_pmc_startstop_args {
+struct amd64_pmc_startstop_args {
int counter;
u_int64_t val;
u_int8_t event;
@@ -80,40 +73,38 @@ struct x86_64_pmc_startstop_args {
#define PMC_SETUP_EDGE 0x04
#define PMC_SETUP_INV 0x08
-struct x86_64_pmc_read_args {
+struct amd64_pmc_read_args {
int counter;
u_int64_t val;
u_int64_t time;
};
-#endif /* todo */
-
-struct x86_64_get_mtrr_args {
+struct amd64_get_mtrr_args {
struct mtrr *mtrrp;
int *n;
};
-struct x86_64_set_mtrr_args {
+struct amd64_set_mtrr_args {
struct mtrr *mtrrp;
int *n;
};
#ifdef _KERNEL
-int x86_64_iopl(struct proc *, void *, register_t *);
-int x86_64_get_mtrr(struct proc *, void *, register_t *);
-int x86_64_set_mtrr(struct proc *, void *, register_t *);
+int amd64_iopl(struct proc *, void *, register_t *);
+int amd64_get_mtrr(struct proc *, void *, register_t *);
+int amd64_set_mtrr(struct proc *, void *, register_t *);
#else
-int x86_64_get_ldt(int, union descriptor *, int);
-int x86_64_set_ldt(int, union descriptor *, int);
-int x86_64_iopl(int);
-int x86_64_get_ioperm(u_long *);
-int x86_64_set_ioperm(u_long *);
-int x86_64_pmc_info(struct x86_64_pmc_info_args *);
-int x86_64_pmc_startstop(struct x86_64_pmc_startstop_args *);
-int x86_64_pmc_read(struct x86_64_pmc_read_args *);
-int x86_64_set_mtrr(struct mtrr *, int *);
-int x86_64_get_mtrr(struct mtrr *, int *);
+int amd64_get_ldt(int, union descriptor *, int);
+int amd64_set_ldt(int, union descriptor *, int);
+int amd64_iopl(int);
+int amd64_get_ioperm(u_long *);
+int amd64_set_ioperm(u_long *);
+int amd64_pmc_info(struct amd64_pmc_info_args *);
+int amd64_pmc_startstop(struct amd64_pmc_startstop_args *);
+int amd64_pmc_read(struct amd64_pmc_read_args *);
+int amd64_set_mtrr(struct mtrr *, int *);
+int amd64_get_mtrr(struct mtrr *, int *);
int sysarch(int, void *);
#endif