From cfe60d7a951fd74830b83a2c7dd98cbdd9b2b7cd Mon Sep 17 00:00:00 2001 From: fvdl Date: Tue, 28 May 2002 23:07:35 +0000 Subject: [PATCH] Shuffle order of selectors around to appease syscall/sysret (bah). --- sys/arch/x86_64/include/segments.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/sys/arch/x86_64/include/segments.h b/sys/arch/x86_64/include/segments.h index 1d5e0898b902..f07a9a7a6bd9 100644 --- a/sys/arch/x86_64/include/segments.h +++ b/sys/arch/x86_64/include/segments.h @@ -1,4 +1,4 @@ -/* $NetBSD: segments.h,v 1.2 2002/01/03 04:28:31 thorpej Exp $ */ +/* $NetBSD: segments.h,v 1.3 2002/05/28 23:07:35 fvdl Exp $ */ /*- * Copyright (c) 1995, 1997 @@ -278,21 +278,18 @@ void set_mem_segment __P((struct mem_segment_descriptor *, void *, size_t, /* * Byte offsets in the Local Descriptor Table (LDT) + * Strange order because of syscall/sysret insns */ #define LSYS5CALLS_SEL 0 /* iBCS system call gate */ - -#if 0 -/* Sorry, no room. Luckily, it's not needed. */ -#define LSYS5SIGR_SEL 1 /* iBCS sigreturn gate */ -#endif - -#define LUCODE_SEL 16 /* User code descriptor */ -#define LUDATA_SEL 24 /* User data descriptor */ +#define LUCODE32_SEL 8 /* 32 bit user code descriptor */ +#define LUDATA_SEL 16 /* User data descriptor */ +#define LUCODE_SEL 24 /* User code descriptor */ #define LSOL26CALLS_SEL 32 /* Solaris 2.6 system call gate */ -#define LUCODE32_SEL 48 /* 32 bit user code descriptor */ -#define LUDATA32_SEL 56 /* 32 bit user data descriptor */ +#define LUDATA32_SEL 56 /* 32 bit user data descriptor (needed?)*/ #define LBSDICALLS_SEL 128 /* BSDI system call gate */ #define LDT_SIZE 144 +#define LSYSRETBASE_SEL LUCODE32_SEL + #endif /* _X86_64_SEGMENTS_H_ */