1
2
3
4
5
6
7 #include <asm/system.h>
8
9 #define halt .long PAL_halt
10 #define rti .long PAL_rti
11
12
13
14
15
16
17
18
19 #define SAVE_ALL \
20 subq $30,160,$30; \
21 stq $0,0($30); \
22 stq $1,8($30); \
23 stq $2,16($30); \
24 stq $3,24($30); \
25 stq $4,32($30); \
26 stq $5,40($30); \
27 stq $6,48($30); \
28 stq $7,56($30); \
29 stq $8,64($30); \
30 stq $19,72($30); \
31 stq $20,80($30); \
32 stq $21,88($30); \
33 stq $22,96($30); \
34 stq $23,104($30); \
35 stq $24,112($30); \
36 stq $25,120($30); \
37 stq $26,128($30); \
38 stq $27,136($30); \
39 stq $28,144($30)
40
41 #define RESTORE_ALL \
42 ldq $0,0($30); \
43 ldq $1,8($30); \
44 ldq $2,16($30); \
45 ldq $3,24($30); \
46 ldq $4,32($30); \
47 ldq $5,40($30); \
48 ldq $6,48($30); \
49 ldq $7,56($30); \
50 ldq $8,64($30); \
51 ldq $19,72($30); \
52 ldq $20,80($30); \
53 ldq $21,88($30); \
54 ldq $22,96($30); \
55 ldq $23,104($30); \
56 ldq $24,112($30); \
57 ldq $25,120($30); \
58 ldq $26,128($30); \
59 ldq $27,136($30); \
60 ldq $28,144($30); \
61 addq $30,160,$30
62
63 .text
64 .set noat
65
66 .align 3
67 .globl entInt
68 .ent entInt
69 entInt:
70 SAVE_ALL
71
72 lda $0,intr_count
73 ldq $1,0($0)
74 addq $1,1,$1
75 stq $1,0($0)
76
77 lda $27,do_entInt
78 jsr $26,($27),do_entInt
79
80 1: lda $0,intr_count
81 ldq $1,0($0)
82 subq $1,1,$1
83 bne $1,2f
84 lda $2,bh_active
85 ldq $3,0($2)
86 lda $2,bh_mask
87 ldq $2,0($2)
88 and $2,$3,$2
89 bne $2,3f
90 2: stq $1,0($0)
91 RESTORE_ALL
92 rti
93 .align 3
94 3: lda $27,do_bottom_half
95 jsr $26,($27),do_bottom_half
96 br $31,1b
97 .end entInt
98
99 .align 3
100 .globl entMM
101 .ent entMM
102 entMM:
103 SAVE_ALL
104 lda $27,do_page_fault
105 jsr $26,($27),do_page_fault
106 RESTORE_ALL
107 rti
108 .end entMM
109
110 .align 3
111 .globl entArith
112 .ent entArith
113 entArith:
114 SAVE_ALL
115 lda $27,do_entArith
116 jsr $26,($27),do_entArith
117 RESTORE_ALL
118 rti
119 .end entArith
120
121 .align 3
122 .globl entIF
123 .ent entIF
124 entIF:
125 SAVE_ALL
126 lda $27,do_entIF
127 jsr $26,($27),do_entIF
128 RESTORE_ALL
129 rti
130 .end entIF
131
132 .align 3
133 .globl entUna
134 .ent entUna
135 entUna:
136 SAVE_ALL
137 lda $27,do_entUna
138 jsr $26,($27),do_entUna
139 RESTORE_ALL
140 rti
141 .end entUna
142
143
144
145
146
147
148
149
150
151
152 .align 3
153 .globl kernel_fork
154 .ent kernel_fork
155 kernel_fork:
156 subq $30,6*8,$30
157 stq $31,0($30)
158 stq $26,8($30)
159 stq $29,16($30)
160 stq $16,24($30)
161 stq $17,32($30)
162 stq $18,40($30)
163 SAVE_ALL
164 lda $27,sys_fork
165 jsr $26,($27),sys_fork
166 br ret_from_sys_call
167 .end kernel_fork
168
169 .align 3
170 .globl sys_fork
171 .ent sys_fork
172 sys_fork:
173 subq $30,64,$30
174 stq $9,0($30)
175 stq $10,8($30)
176 stq $11,16($30)
177 stq $12,24($30)
178 stq $13,32($30)
179 stq $14,40($30)
180 stq $15,48($30)
181 stq $26,56($30)
182
183 bis $30,$30,$16
184 lda $27,alpha_fork
185 jsr $26,($27),alpha_fork
186
187 ldq $9,0($30)
188 ldq $10,8($30)
189 ldq $11,16($30)
190 ldq $12,24($30)
191 ldq $13,32($30)
192 ldq $14,40($30)
193 ldq $15,48($30)
194 ldq $26,56($30)
195 ldq $0,64($30)
196 addq $30,64,$30
197 ret $31,($26),1
198 .end sys_fork
199
200 .align 3
201 .globl entSys
202 .globl ret_from_sys_call
203 .ent entSys
204 entSys:
205 SAVE_ALL
206 lda $27,do_entSys
207 jsr $26,($27),do_entSys
208 stq $0,0($30)
209 ret_from_sys_call:
210 RESTORE_ALL
211 rti
212 .end entSys
213
214 .align 3
215 .globl sys_call_table
216 sys_call_table:
217 .quad 0