1 ; meinOS - A unix-like x86 microkernel operating system
2 ; Copyright (C) 2008 Janosch Gräf <janosch.graef@gmx.net>
4 ; This program is free software: you can redistribute it and/or modify
5 ; it under the terms of the GNU General Public License as published by
6 ; the Free Software Foundation, either version 3 of the License, or
7 ; (at your option) any later version.
9 ; This program is distributed in the hope that it will be useful,
10 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ; GNU General Public License for more details.
14 ; You should have received a copy of the GNU General Public License
15 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
17 global isr00
,isr01
,isr02
,isr03
,isr04
,isr05
,isr06
,isr07
,isr08
,isr09
,isr0A
,isr0B
,isr0C
,isr0D
,isr0E
,isr0F
18 global isr10
,isr11
,isr12
,isr13
,isr14
,isr15
,isr16
,isr17
,isr18
,isr19
,isr1A
,isr1B
,isr1C
,isr1D
,isr1E
,isr1F
19 global isr20
,isr21
,isr22
,isr23
,isr24
,isr25
,isr26
,isr27
,isr28
,isr29
,isr2A
,isr2B
,isr2C
,isr2D
,isr2E
,isr2F
20 global isr30
,isr31
,isr32
,isr33
,isr34
,isr35
,isr36
,isr37
25 extern syscall_handler
26 extern interrupt_handler
27 extern lapic_timer_calibrate
41 ; Pointer to ISRs as array
43 isr_table
dd isr00
,isr01
,isr02
,isr03
,isr04
,isr05
,isr06
,isr07
,isr08
,isr09
,isr0A
,isr0B
,isr0C
,isr0D
,isr0E
,isr0F
, \
44 isr10
,isr11
,isr12
,isr13
,isr14
,isr15
,isr16
,isr17
,isr18
,isr19
,isr1A
,isr1B
,isr1C
,isr1D
,isr1E
,isr1F
, \
45 isr20
,isr21
,isr22
,isr23
,isr24
,isr25
,isr26
,isr27
,isr28
,isr29
,isr2A
,isr2B
,isr2C
,isr2D
,isr2E
,isr2F
, \
46 isr30
,isr31
,isr32
,isr33
,isr34
,isr35
,isr36
,isr37
62 ; Interrupt Service Routines
64 push DWORD 0 ; dummy error code
69 call interrupt_handler
76 push DWORD 0 ; dummy error code
81 call interrupt_handler
88 push DWORD 0 ; dummy error code
93 call interrupt_handler
100 push DWORD 0 ; dummy error code
105 call interrupt_handler
112 push DWORD 0 ; dummy error code
117 call interrupt_handler
124 push DWORD 0 ; dummy error code
129 call interrupt_handler
136 push DWORD 0 ; dummy error code
141 call interrupt_handler
148 push DWORD 0 ; dummy error code
153 call interrupt_handler
164 call interrupt_handler
171 push DWORD 0 ; dummy error code
176 call interrupt_handler
187 call interrupt_handler
198 call interrupt_handler
209 call interrupt_handler
220 call interrupt_handler
231 call interrupt_handler
238 push DWORD 0 ; dummy error code
243 call interrupt_handler
250 push DWORD 0 ; dummy error code
255 call interrupt_handler
262 push DWORD 0 ; dummy error code
267 call interrupt_handler
274 push DWORD 0 ; dummy error code
279 call interrupt_handler
286 push DWORD 0 ; dummy error code
291 call interrupt_handler
298 push DWORD 0 ; dummy error code
303 call interrupt_handler
310 push DWORD 0 ; dummy error code
315 call interrupt_handler
322 push DWORD 0 ; dummy error code
327 call interrupt_handler
334 push DWORD 0 ; dummy error code
339 call interrupt_handler
346 push DWORD 0 ; dummy error code
351 call interrupt_handler
358 push DWORD 0 ; dummy error code
363 call interrupt_handler
370 push DWORD 0 ; dummy error code
375 call interrupt_handler
382 push DWORD 0 ; dummy error code
387 call interrupt_handler
394 push DWORD 0 ; dummy error code
399 call interrupt_handler
406 push DWORD 0 ; dummy error code
411 call interrupt_handler
418 push DWORD 0 ; dummy error code
423 call interrupt_handler
430 push DWORD 0 ; dummy error code
435 call interrupt_handler
441 isr20: ; PIT timer interrupt (for calibration of APIC timer)
443 mov eax,[isr_uselapic
]
446 call lapic_timer_calibrate
453 push DWORD 0 ; dummy error code
458 call interrupt_handler
465 push DWORD 0 ; dummy error code
470 call interrupt_handler
477 push DWORD 0 ; dummy error code
482 call interrupt_handler
489 push DWORD 0 ; dummy error code
494 call interrupt_handler
501 push DWORD 0 ; dummy error code
506 call interrupt_handler
513 push DWORD 0 ; dummy error code
518 call interrupt_handler
525 push DWORD 0 ; dummy error code
530 call interrupt_handler
537 push DWORD 0 ; dummy error code
542 call interrupt_handler
549 push DWORD 0 ; dummy error code
554 call interrupt_handler
561 push DWORD 0 ; dummy error code
566 call interrupt_handler
573 push DWORD 0 ; dummy error code
578 call interrupt_handler
585 push DWORD 0 ; dummy error code
590 call interrupt_handler
597 push DWORD 0 ; dummy error code
602 call interrupt_handler
609 push DWORD 0 ; dummy error code
614 call interrupt_handler
621 push DWORD 0 ; dummy error code
626 call interrupt_handler
633 push DWORD 0 ; dummy error code
638 call interrupt_handler
645 push DWORD 0 ; dummy error code
650 call interrupt_handler
656 isr32: ; Performance monitor
657 push DWORD 0 ; dummy error code
662 call interrupt_handler
669 push DWORD 0 ; dummy error code
674 call interrupt_handler
681 push DWORD 0 ; dummy error code
686 call interrupt_handler
693 push DWORD 0 ; dummy error code
698 call interrupt_handler
705 push DWORD 0 ; dummy error code
710 call interrupt_handler
716 isr37: ; Syscall interrupt
717 push DWORD 0 ; dummy error code
727 ; call syscallhandler
734 add esp,4 ; pop error code