summaryrefslogtreecommitdiffstats
path: root/sys/i386/include
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2004-11-06 03:23:36 +0000
committerpeter <peter@FreeBSD.org>2004-11-06 03:23:36 +0000
commit9534fe12fdb2f57bb9d4427d00e3174432e1840d (patch)
treebbd6afe40dcd5facabcaae2e15a1a784595e14d7 /sys/i386/include
parent0555f41924686df7f256f83a9955f14de6a1e504 (diff)
downloadFreeBSD-src-9534fe12fdb2f57bb9d4427d00e3174432e1840d.zip
FreeBSD-src-9534fe12fdb2f57bb9d4427d00e3174432e1840d.tar.gz
Begin an invasion of i386-land by amd64.
Expose some of the amd64-specific sysarch functions to allow alternative implementations of the %fs/%gs code for TLS, threads, etc. USER_LDT does not exist on the amd64 kernel, so we have to implement things other ways.
Diffstat (limited to 'sys/i386/include')
-rw-r--r--sys/i386/include/sysarch.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/i386/include/sysarch.h b/sys/i386/include/sysarch.h
index 01c52a9..b117943 100644
--- a/sys/i386/include/sysarch.h
+++ b/sys/i386/include/sysarch.h
@@ -44,6 +44,12 @@
/* xxxxx */
#define I386_VM86 6
+/* These four only exist when running an i386 binary on amd64 */
+#define _AMD64_GET_FSBASE 128
+#define _AMD64_SET_FSBASE 129
+#define _AMD64_GET_GSBASE 130
+#define _AMD64_SET_GSBASE 131
+
struct i386_ldt_args {
unsigned int start;
union descriptor *descs;
@@ -68,6 +74,11 @@ union descriptor;
struct dbreg;
__BEGIN_DECLS
+/* These four only exist when running an i386 binary on amd64 */
+int _amd64_get_fsbase(void **);
+int _amd64_get_gsbase(void **);
+int _amd64_set_fsbase(void *);
+int _amd64_set_gsbase(void *);
int i386_get_ldt(int, union descriptor *, int);
int i386_set_ldt(int, union descriptor *, int);
int i386_get_ioperm(unsigned int, unsigned int *, int *);
OpenPOWER on IntegriCloud