ia64/xen-unstable

view xen-2.4.16/include/asm-i386/desc.h @ 86:4a10fe9b20ec

bitkeeper revision 1.15 (3e24a984iRiWWcgfKCxu2p5q3YbxXw)

Many files:
First half of support for per-domain GDTs and LDTs
author kaf24@labyrinth.cl.cam.ac.uk
date Wed Jan 15 00:21:24 2003 +0000 (2003-01-15)
parents 1ef2026299c3
children
line source
1 #ifndef __ARCH_DESC_H
2 #define __ARCH_DESC_H
4 #define __FIRST_TSS_ENTRY 8
5 #define __TSS(n) ((n) + __FIRST_TSS_ENTRY)
7 #ifndef __ASSEMBLY__
8 struct desc_struct {
9 unsigned long a,b;
10 };
12 extern struct desc_struct gdt_table[];
13 extern struct desc_struct *idt, *gdt;
15 struct Xgt_desc_struct {
16 unsigned short size;
17 unsigned long address __attribute__((packed));
18 };
20 #define idt_descr (*(struct Xgt_desc_struct *)((char *)&idt - 2))
21 #define gdt_descr (*(struct Xgt_desc_struct *)((char *)&gdt - 2))
23 #define load_TR(n) __asm__ __volatile__("ltr %%ax"::"a" (__TSS(n)<<3))
25 #define __load_LDT(n) __asm__ __volatile__("lldt %%ax"::"a" ((n)<<3))
27 extern void set_intr_gate(unsigned int irq, void * addr);
28 extern void set_tss_desc(unsigned int n, void *addr);
30 #endif /* !__ASSEMBLY__ */
32 #endif