aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/segment.h
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-01-30 07:31:09 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:31:09 -0500
commit15ee09b40831ae88eb8a804a647b6935eb8b7114 (patch)
treebbb9e9e09b3f058a59052d4e682619221dbd25ca /include/asm-x86/segment.h
parentcef189508b2f043fdc2e354645803b6ce004aac3 (diff)
x86: unify common parts of segment.h
Although segment handling in i386 and x86_64 are very different, there's a common part. Put them in segment.h instead of arch specific headers Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/segment.h')
-rw-r--r--include/asm-x86/segment.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/asm-x86/segment.h b/include/asm-x86/segment.h
index b3a7a3e9fb19..3c9b306bc4bf 100644
--- a/include/asm-x86/segment.h
+++ b/include/asm-x86/segment.h
@@ -11,4 +11,20 @@
11#define get_kernel_rpl() 0 11#define get_kernel_rpl() 0
12#endif 12#endif
13 13
14/* User mode is privilege level 3 */
15#define USER_RPL 0x3
16/* LDT segment has TI set, GDT has it cleared */
17#define SEGMENT_LDT 0x4
18#define SEGMENT_GDT 0x0
19
20/* Bottom two bits of selector give the ring privilege level */
21#define SEGMENT_RPL_MASK 0x3
22/* Bit 2 is table indicator (LDT/GDT) */
23#define SEGMENT_TI_MASK 0x4
24
25#define IDT_ENTRIES 256
26#define GDT_SIZE (GDT_ENTRIES * 8)
27#define GDT_ENTRY_TLS_ENTRIES 3
28#define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8)
29
14#endif 30#endif