Merge 15329:15546 from trunk
[reactos.git] / reactos / ntoskrnl / ke / i386 / irqhand.s
1
2 #include <internal/i386/segment.h>
3 #include <../hal/halx86/include/halirq.h>
4
5 .global _irq_handler_0
6 _irq_handler_0:
7 cld
8 pusha
9 pushl %ds
10 pushl %es
11 pushl %fs
12 pushl %gs
13 movl $0xceafbeef,%eax
14 pushl %eax
15 movw $KERNEL_DS,%ax
16 movw %ax,%ds
17 movw %ax,%es
18 movw %ax,%gs
19 movl $PCR_SELECTOR, %eax
20 movl %eax, %fs
21 pushl %esp
22 pushl $(IRQ_BASE + 0)
23 call _KiInterruptDispatch
24 addl $0xC, %esp
25 popl %gs
26 popl %fs
27 popl %es
28 popl %ds
29 popa
30 iret
31
32 .global _irq_handler_1
33 _irq_handler_1:
34 cld
35 pusha
36 pushl %ds
37 pushl %es
38 pushl %fs
39 pushl %gs
40 movl $0xceafbeef,%eax
41 pushl %eax
42 movw $KERNEL_DS,%ax
43 movw %ax,%ds
44 movw %ax,%es
45 movw %ax,%gs
46 movl $PCR_SELECTOR, %eax
47 movl %eax, %fs
48 pushl %esp
49 pushl $(IRQ_BASE + 1)
50 call _KiInterruptDispatch
51 addl $0xC, %esp
52 popl %gs
53 popl %fs
54 popl %es
55 popl %ds
56 popa
57 iret
58
59 .global _irq_handler_2
60 _irq_handler_2:
61 cld
62 pusha
63 pushl %ds
64 pushl %es
65 pushl %fs
66 pushl %gs
67 movl $0xceafbeef,%eax
68 pushl %eax
69 movw $KERNEL_DS,%ax
70 movw %ax,%ds
71 movw %ax,%es
72 movw %ax,%gs
73 movl $PCR_SELECTOR, %eax
74 movl %eax, %fs
75 pushl %esp
76 pushl $(IRQ_BASE + 2)
77 call _KiInterruptDispatch
78 addl $0xC, %esp
79 popl %gs
80 popl %fs
81 popl %es
82 popl %ds
83 popa
84 iret
85
86 .global _irq_handler_3
87 _irq_handler_3:
88 cld
89 pusha
90 pushl %ds
91 pushl %es
92 pushl %fs
93 pushl %gs
94 movl $0xceafbeef,%eax
95 pushl %eax
96 movw $KERNEL_DS,%ax
97 movw %ax,%ds
98 movw %ax,%es
99 movw %ax,%gs
100 movl $PCR_SELECTOR, %eax
101 movl %eax, %fs
102 pushl %esp
103 pushl $(IRQ_BASE + 3)
104 call _KiInterruptDispatch
105 addl $0xC, %esp
106 popl %gs
107 popl %fs
108 popl %es
109 popl %ds
110 popa
111 iret
112
113 .global _irq_handler_4
114 _irq_handler_4:
115 cld
116 pusha
117 pushl %ds
118 pushl %es
119 pushl %fs
120 pushl %gs
121 movl $0xceafbeef,%eax
122 pushl %eax
123 movw $KERNEL_DS,%ax
124 movw %ax,%ds
125 movw %ax,%es
126 movw %ax,%gs
127 movl $PCR_SELECTOR, %eax
128 movl %eax, %fs
129 pushl %esp
130 pushl $(IRQ_BASE + 4)
131 call _KiInterruptDispatch
132 addl $0xC, %esp
133 popl %gs
134 popl %fs
135 popl %es
136 popl %ds
137 popa
138 iret
139
140 .global _irq_handler_5
141 _irq_handler_5:
142 cld
143 pusha
144 pushl %ds
145 pushl %es
146 pushl %fs
147 pushl %gs
148 movl $0xceafbeef,%eax
149 pushl %eax
150 movw $KERNEL_DS,%ax
151 movw %ax,%ds
152 movw %ax,%es
153 movw %ax,%gs
154 movl $PCR_SELECTOR, %eax
155 movl %eax, %fs
156 pushl %esp
157 pushl $(IRQ_BASE + 5)
158 call _KiInterruptDispatch
159 addl $0xC, %esp
160 popl %gs
161 popl %fs
162 popl %es
163 popl %ds
164 popa
165 iret
166
167 .global _irq_handler_6
168 _irq_handler_6:
169 cld
170 pusha
171 pushl %ds
172 pushl %es
173 pushl %fs
174 pushl %gs
175 movl $0xceafbeef,%eax
176 pushl %eax
177 movw $KERNEL_DS,%ax
178 movw %ax,%ds
179 movw %ax,%es
180 movw %ax,%gs
181 movl $PCR_SELECTOR, %eax
182 movl %eax, %fs
183 pushl %esp
184 pushl $(IRQ_BASE + 6)
185 call _KiInterruptDispatch
186 addl $0xC, %esp
187 popl %gs
188 popl %fs
189 popl %es
190 popl %ds
191 popa
192 iret
193
194 .global _irq_handler_7
195 _irq_handler_7:
196 cld
197 pusha
198 pushl %ds
199 pushl %es
200 pushl %fs
201 pushl %gs
202 movl $0xceafbeef,%eax
203 pushl %eax
204 movw $KERNEL_DS,%ax
205 movw %ax,%ds
206 movw %ax,%es
207 movw %ax,%gs
208 movl $PCR_SELECTOR, %eax
209 movl %eax, %fs
210 pushl %esp
211 pushl $(IRQ_BASE + 7)
212 call _KiInterruptDispatch
213 addl $0xC, %esp
214 popl %gs
215 popl %fs
216 popl %es
217 popl %ds
218 popa
219 iret
220
221 .global _irq_handler_8
222 _irq_handler_8:
223 cld
224 pusha
225 pushl %ds
226 pushl %es
227 pushl %fs
228 pushl %gs
229 movl $0xceafbeef,%eax
230 pushl %eax
231 movw $KERNEL_DS,%ax
232 movw %ax,%ds
233 movw %ax,%es
234 movw %ax,%gs
235 movl $PCR_SELECTOR, %eax
236 movl %eax, %fs
237 pushl %esp
238 pushl $(IRQ_BASE + 8)
239 call _KiInterruptDispatch
240 addl $0xC, %esp
241 popl %gs
242 popl %fs
243 popl %es
244 popl %ds
245 popa
246 iret
247
248 .global _irq_handler_9
249 _irq_handler_9:
250 cld
251 pusha
252 pushl %ds
253 pushl %es
254 pushl %fs
255 pushl %gs
256 movl $0xceafbeef,%eax
257 pushl %eax
258 movw $KERNEL_DS,%ax
259 movw %ax,%ds
260 movw %ax,%es
261 movw %ax,%gs
262 movl $PCR_SELECTOR, %eax
263 movl %eax, %fs
264 pushl %esp
265 pushl $(IRQ_BASE + 9)
266 call _KiInterruptDispatch
267 addl $0xC, %esp
268 popl %gs
269 popl %fs
270 popl %es
271 popl %ds
272 popa
273 iret
274
275 .global _irq_handler_10
276 _irq_handler_10:
277 cld
278 pusha
279 pushl %ds
280 pushl %es
281 pushl %fs
282 pushl %gs
283 movl $0xceafbeef,%eax
284 pushl %eax
285 movw $KERNEL_DS,%ax
286 movw %ax,%ds
287 movw %ax,%es
288 movw %ax,%gs
289 movl $PCR_SELECTOR, %eax
290 movl %eax, %fs
291 pushl %esp
292 pushl $(IRQ_BASE + 10)
293 call _KiInterruptDispatch
294 addl $0xC, %esp
295 popl %gs
296 popl %fs
297 popl %es
298 popl %ds
299 popa
300 iret
301
302 .global _irq_handler_11
303 _irq_handler_11:
304 cld
305 pusha
306 pushl %ds
307 pushl %es
308 pushl %fs
309 pushl %gs
310 movl $0xceafbeef,%eax
311 pushl %eax
312 movw $KERNEL_DS,%ax
313 movw %ax,%ds
314 movw %ax,%es
315 movw %ax,%gs
316 movl $PCR_SELECTOR, %eax
317 movl %eax, %fs
318 pushl %esp
319 pushl $(IRQ_BASE + 11)
320 call _KiInterruptDispatch
321 addl $0xC, %esp
322 popl %gs
323 popl %fs
324 popl %es
325 popl %ds
326 popa
327 iret
328
329 .global _irq_handler_12
330 _irq_handler_12:
331 cld
332 pusha
333 pushl %ds
334 pushl %es
335 pushl %fs
336 pushl %gs
337 movl $0xceafbeef,%eax
338 pushl %eax
339 movw $KERNEL_DS,%ax
340 movw %ax,%ds
341 movw %ax,%es
342 movw %ax,%gs
343 movl $PCR_SELECTOR, %eax
344 movl %eax, %fs
345 pushl %esp
346 pushl $(IRQ_BASE + 12)
347 call _KiInterruptDispatch
348 addl $0xC, %esp
349 popl %gs
350 popl %fs
351 popl %es
352 popl %ds
353 popa
354 iret
355
356 .global _irq_handler_13
357 _irq_handler_13:
358 cld
359 pusha
360 pushl %ds
361 pushl %es
362 pushl %fs
363 pushl %gs
364 movl $0xceafbeef,%eax
365 pushl %eax
366 movw $KERNEL_DS,%ax
367 movw %ax,%ds
368 movw %ax,%es
369 movw %ax,%gs
370 movl $PCR_SELECTOR, %eax
371 movl %eax, %fs
372 pushl %esp
373 pushl $(IRQ_BASE + 13)
374 call _KiInterruptDispatch
375 addl $0xC, %esp
376 popl %gs
377 popl %fs
378 popl %es
379 popl %ds
380 popa
381 iret
382
383 .global _irq_handler_14
384 _irq_handler_14:
385 cld
386 pusha
387 pushl %ds
388 pushl %es
389 pushl %fs
390 pushl %gs
391 movl $0xceafbeef,%eax
392 pushl %eax
393 movw $KERNEL_DS,%ax
394 movw %ax,%ds
395 movw %ax,%es
396 movw %ax,%gs
397 movl $PCR_SELECTOR, %eax
398 movl %eax, %fs
399 pushl %esp
400 pushl $(IRQ_BASE + 14)
401 call _KiInterruptDispatch
402 addl $0xC, %esp
403 popl %gs
404 popl %fs
405 popl %es
406 popl %ds
407 popa
408 iret
409
410 .global _irq_handler_15
411 _irq_handler_15:
412 cld
413 pusha
414 pushl %ds
415 pushl %es
416 pushl %fs
417 pushl %gs
418 movl $0xceafbeef,%eax
419 pushl %eax
420 movw $KERNEL_DS,%ax
421 movw %ax,%ds
422 movw %ax,%es
423 movw %ax,%gs
424 movl $PCR_SELECTOR, %eax
425 movl %eax, %fs
426 pushl %esp
427 pushl $(IRQ_BASE + 15)
428 call _KiInterruptDispatch
429 addl $0xC, %esp
430 popl %gs
431 popl %fs
432 popl %es
433 popl %ds
434 popa
435 iret