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
37
38
39
40
41 #define TASK_SIZE 0xc0000000
42
43
44
45
46 #define IO_BITMAP_SIZE 32
47
48 struct i387_hard_struct {
49 long cwd;
50 long swd;
51 long twd;
52 long fip;
53 long fcs;
54 long foo;
55 long fos;
56 long st_space[20];
57 };
58
59 struct i387_soft_struct {
60 long cwd;
61 long swd;
62 long twd;
63 long fip;
64 long fcs;
65 long foo;
66 long fos;
67 long top;
68 struct fpu_reg regs[8];
69 unsigned char lookahead;
70 struct info *info;
71 unsigned long entry_eip;
72 };
73
74 union i387_union {
75 struct i387_hard_struct hard;
76 struct i387_soft_struct soft;
77 };
78
79 struct thread_struct {
80 unsigned short back_link,__blh;
81 unsigned long esp0;
82 unsigned short ss0,__ss0h;
83 unsigned long esp1;
84 unsigned short ss1,__ss1h;
85 unsigned long esp2;
86 unsigned short ss2,__ss2h;
87 unsigned long cr3;
88 unsigned long eip;
89 unsigned long eflags;
90 unsigned long eax,ecx,edx,ebx;
91 unsigned long esp;
92 unsigned long ebp;
93 unsigned long esi;
94 unsigned long edi;
95 unsigned short es, __esh;
96 unsigned short cs, __csh;
97 unsigned short ss, __ssh;
98 unsigned short ds, __dsh;
99 unsigned short fs, __fsh;
100 unsigned short gs, __gsh;
101 unsigned short ldt, __ldth;
102 unsigned short trace, bitmap;
103 unsigned long io_bitmap[IO_BITMAP_SIZE+1];
104 unsigned long tr;
105 unsigned long cr2, trap_no, error_code;
106
107 union i387_union i387;
108
109 struct vm86_struct * vm86_info;
110 unsigned long screen_bitmap;
111 unsigned long v86flags, v86mask, v86mode;
112 };
113
114 #define INIT_TSS { \
115 0,0, \
116 sizeof(init_kernel_stack) + (long) &init_kernel_stack, \
117 KERNEL_DS, 0, \
118 0,0,0,0,0,0, \
119 (long) &swapper_pg_dir, \
120 0,0,0,0,0,0,0,0,0,0, \
121 USER_DS,0,USER_DS,0,USER_DS,0,USER_DS,0,USER_DS,0,USER_DS,0, \
122 _LDT(0),0, \
123 0, 0x8000, \
124 {~0, }, \
125 _TSS(0), 0, 0,0, \
126 { { 0, }, }, \
127 NULL, 0, 0, 0, 0 \
128 }
129
130 #endif