This source file includes following definitions.
- start_thread
1
2
3
4
5
6
7 #ifndef __ASM_I386_PROCESSOR_H
8 #define __ASM_I386_PROCESSOR_H
9
10
11
12
13 extern char hard_math;
14 extern char x86;
15 extern char x86_vendor_id[13];
16 extern char x86_model;
17 extern char x86_mask;
18 extern int x86_capability;
19 extern int fdiv_bug;
20 extern char ignore_irq13;
21 extern char wp_works_ok;
22 extern char hlt_works_ok;
23
24 #define start_bh_atomic() \
25 __asm__ __volatile__("incl _intr_count")
26
27 #define end_bh_atomic() \
28 __asm__ __volatile__("decl _intr_count")
29
30
31
32
33
34 extern int EISA_bus;
35 #define MCA_bus 0
36 #define MCA_bus__is_a_macro
37
38
39
40
41
42 #define TASK_SIZE (0xC0000000UL)
43
44
45
46
47 #define IO_BITMAP_SIZE 32
48
49 struct i387_hard_struct {
50 long cwd;
51 long swd;
52 long twd;
53 long fip;
54 long fcs;
55 long foo;
56 long fos;
57 long st_space[20];
58 };
59
60 struct i387_soft_struct {
61 long cwd;
62 long swd;
63 long twd;
64 long fip;
65 long fcs;
66 long foo;
67 long fos;
68 long top;
69 struct fpu_reg regs[8];
70 unsigned char lookahead;
71 struct info *info;
72 unsigned long entry_eip;
73 };
74
75 union i387_union {
76 struct i387_hard_struct hard;
77 struct i387_soft_struct soft;
78 };
79
80 struct thread_struct {
81 unsigned short back_link,__blh;
82 unsigned long esp0;
83 unsigned short ss0,__ss0h;
84 unsigned long esp1;
85 unsigned short ss1,__ss1h;
86 unsigned long esp2;
87 unsigned short ss2,__ss2h;
88 unsigned long cr3;
89 unsigned long eip;
90 unsigned long eflags;
91 unsigned long eax,ecx,edx,ebx;
92 unsigned long esp;
93 unsigned long ebp;
94 unsigned long esi;
95 unsigned long edi;
96 unsigned short es, __esh;
97 unsigned short cs, __csh;
98 unsigned short ss, __ssh;
99 unsigned short ds, __dsh;
100 unsigned short fs, __fsh;
101 unsigned short gs, __gsh;
102 unsigned short ldt, __ldth;
103 unsigned short trace, bitmap;
104 unsigned long io_bitmap[IO_BITMAP_SIZE+1];
105 unsigned long tr;
106 unsigned long cr2, trap_no, error_code;
107
108 union i387_union i387;
109
110 struct vm86_struct * vm86_info;
111 unsigned long screen_bitmap;
112 unsigned long v86flags, v86mask, v86mode;
113 };
114
115 #define INIT_TSS { \
116 0,0, \
117 sizeof(init_kernel_stack) + (long) &init_kernel_stack, \
118 KERNEL_DS, 0, \
119 0,0,0,0,0,0, \
120 (long) &swapper_pg_dir, \
121 0,0,0,0,0,0,0,0,0,0, \
122 USER_DS,0,USER_DS,0,USER_DS,0,USER_DS,0,USER_DS,0,USER_DS,0, \
123 _LDT(0),0, \
124 0, 0x8000, \
125 {~0, }, \
126 _TSS(0), 0, 0,0, \
127 { { 0, }, }, \
128 NULL, 0, 0, 0, 0 \
129 }
130
131 static inline void start_thread(struct pt_regs * regs, unsigned long eip, unsigned long esp)
132 {
133 regs->cs = USER_CS;
134 regs->ds = regs->es = regs->ss = regs->fs = regs->gs = USER_DS;
135 regs->eip = eip;
136 regs->esp = esp;
137 }
138
139 #endif