root/kernel/asm.s

/* [previous][next][first][last][top][bottom][index][help] */
   1 /*
   2  *  linux/kernel/asm.s
   3  *
   4  *  (C) 1991  Linus Torvalds
   5  */
   6 
   7 /*
   8  * asm.s contains the low-level code for interrupts that cannot
   9  * result in an task-switch. These are things like the hd- and
  10  * floppy-interrupt etc. With these interrupts, we don't have to
  11  * care about the stack layout etc.
  12  */
  13 
  14 .globl _floppy_interrupt,_parallel_interrupt
  15 
  16 _floppy_interrupt:
  17         cld
  18         pushl %eax
  19         pushl %ecx
  20         pushl %edx
  21         push %ds
  22         push %es
  23         push %fs
  24         movl $0x10,%eax
  25         mov %ax,%ds
  26         mov %ax,%es
  27         movl $0x17,%eax
  28         mov %ax,%fs
  29         movb $0x20,%al
  30         outb %al,$0x20          # EOI to interrupt controller #1
  31         xorl %eax,%eax
  32         xchgl _do_floppy,%eax
  33         testl %eax,%eax
  34         jne 1f
  35         movl $_unexpected_floppy_interrupt,%eax
  36 1:      call *%eax              # "interesting" way of handling intr.
  37         pop %fs
  38         pop %es
  39         pop %ds
  40         popl %edx
  41         popl %ecx
  42         popl %eax
  43         iret
  44 
  45 _parallel_interrupt:
  46         cld
  47         pushl %eax
  48         movb $0x20,%al
  49         outb %al,$0x20
  50         popl %eax
  51         iret

/* [previous][next][first][last][top][bottom][index][help] */