blob: 8efb1b79a429dd587303d0aca5020dd53446d424 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
.section .text
.global _isr_stubs
_isr_stubs:
.rept 256
pushal
call _isr_stage2
.align 8
.endr
_isr_stage2:
cld
// convert the return address into the vector nr
pop %eax
add $-_isr_stubs, %eax
shr $3, %eax
// disable paging, if present
// it's done here so the stuff on the stack is in the right order
mov %cr0, %ebx
push %ebx
and $0x7FFFFFFF, %ebx
mov %ebx, %cr0
push %eax // push the vector nr
call isr_stage3
add $4, %esp // "pop" the vector nr
pop %eax // restore old cr0
mov %eax, %cr0
popal
iret
|