Dynamic IRQ handling
This commit is contained in:
@ -38,8 +38,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
.type except ## exc, @function; \
|
||||
except ## exc:; \
|
||||
cli; \
|
||||
push $0; \
|
||||
push $exc; \
|
||||
pushl $0; \
|
||||
pushl $exc; \
|
||||
jmp temp_except_hndlr;
|
||||
|
||||
#define EXCEPT_ERR(exc) \
|
||||
@ -47,7 +47,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
.type except ## exc, @function; \
|
||||
except ## exc:; \
|
||||
cli; \
|
||||
push $exc; \
|
||||
pushl $exc; \
|
||||
jmp temp_except_hndlr;
|
||||
|
||||
EXCEPT_NOERR(0)
|
||||
@ -87,42 +87,42 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
temp_except_hndlr:
|
||||
pushal
|
||||
xorl %eax, %eax
|
||||
mov %ds, %ax
|
||||
push %eax
|
||||
movw %ds, %ax
|
||||
pushl %eax
|
||||
|
||||
/* load kernel DS */
|
||||
mov $0x10, %ax
|
||||
mov %ax, %ds
|
||||
mov %ax, %es
|
||||
mov %ax, %fs
|
||||
mov %ax, %gs
|
||||
movw $0x10, %ax
|
||||
movw %ax, %ds
|
||||
movw %ax, %es
|
||||
movw %ax, %fs
|
||||
movw %ax, %gs
|
||||
|
||||
push %esp
|
||||
pushl %esp
|
||||
|
||||
call except_fini
|
||||
|
||||
add $0x04, %esp
|
||||
addl $4, %esp
|
||||
|
||||
/* restore DS */
|
||||
pop %ebx
|
||||
mov %bx, %ds
|
||||
mov %bx, %es
|
||||
mov %bx, %fs
|
||||
mov %bx, %gs
|
||||
popl %eax
|
||||
movw %ax, %ds
|
||||
movw %ax, %es
|
||||
movw %ax, %fs
|
||||
movw %ax, %gs
|
||||
|
||||
/* rebalance */
|
||||
popal
|
||||
add $0x8, %esp
|
||||
addl $8, %esp
|
||||
|
||||
iret
|
||||
iretl
|
||||
|
||||
#define IRQ(irq1) \
|
||||
.global irq ## irq1; \
|
||||
.type irq ## irq1, @function; \
|
||||
irq ## irq1:; \
|
||||
cli; \
|
||||
push $0; \
|
||||
push $irq1; \
|
||||
pushl $0; \
|
||||
pushl $irq1; \
|
||||
jmp temp_irq_hndlr;
|
||||
|
||||
IRQ(0)
|
||||
@ -145,31 +145,31 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
temp_irq_hndlr:
|
||||
pushal
|
||||
xorl %eax, %eax
|
||||
mov %ds, %ax
|
||||
push %eax
|
||||
movw %ds, %ax
|
||||
pushl %eax
|
||||
|
||||
/* load kernel DS */
|
||||
mov $0x10, %ax
|
||||
mov %ax, %ds
|
||||
mov %ax, %es
|
||||
mov %ax, %fs
|
||||
mov %ax, %gs
|
||||
movw $0x10, %ax
|
||||
movw %ax, %ds
|
||||
movw %ax, %es
|
||||
movw %ax, %fs
|
||||
movw %ax, %gs
|
||||
|
||||
push %esp
|
||||
pushl %esp
|
||||
|
||||
call irq_fini
|
||||
|
||||
add $0x04, %esp
|
||||
addl $4, %esp
|
||||
|
||||
/* restore DS */
|
||||
pop %ebx
|
||||
mov %bx, %ds
|
||||
mov %bx, %es
|
||||
mov %bx, %fs
|
||||
mov %bx, %gs
|
||||
popl %eax
|
||||
movw %ax, %ds
|
||||
movw %ax, %es
|
||||
movw %ax, %fs
|
||||
movw %ax, %gs
|
||||
|
||||
/* rebalance */
|
||||
popal
|
||||
add $0x8, %esp
|
||||
addl $8, %esp
|
||||
|
||||
iret
|
||||
iretl
|
||||
|
||||
Reference in New Issue
Block a user