From 9534fe12fdb2f57bb9d4427d00e3174432e1840d Mon Sep 17 00:00:00 2001 From: peter Date: Sat, 6 Nov 2004 03:23:36 +0000 Subject: 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. --- sys/i386/include/sysarch.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sys') 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 *); -- cgit v1.1