1 /* Written 2000 by Andi Kleen */
2 #ifndef __ARCH_DESC_DEFS_H
3 #define __ARCH_DESC_DEFS_H
6 * Segment descriptor structure definitions, usable from both x86_64 and i386
12 #include <linux/types.h>
14 // 8 byte segment descriptor
18 unsigned base1
: 8, type
: 4, s
: 1, dpl
: 2, p
: 1;
19 unsigned limit
: 4, avl
: 1, l
: 1, d
: 1, g
: 1, base2
: 8;
20 } __attribute__((packed
));
22 struct n_desc_struct
{
36 unsigned ist
: 3, zero0
: 5, type
: 5, dpl
: 2, p
: 1;
40 } __attribute__((packed
));
42 #define PTR_LOW(x) ((unsigned long)(x) & 0xFFFF)
43 #define PTR_MIDDLE(x) (((unsigned long)(x) >> 16) & 0xFFFF)
44 #define PTR_HIGH(x) ((unsigned long)(x) >> 32)
51 // LDT or TSS descriptor in the GDT. 16 bytes.
55 unsigned base1
: 8, type
: 5, dpl
: 2, p
: 1;
56 unsigned limit1
: 4, zero0
: 3, g
: 1, base2
: 8;
59 } __attribute__((packed
));
63 unsigned long address
;
64 } __attribute__((packed
)) ;
67 #endif /* !__ASSEMBLY__ */