This source file includes following definitions.
- do_hw_interrupt
- trap_init
1
2
3
4
5
6
7
8
9
10
11 #include <linux/sched.h>
12
13 #include <asm/system.h>
14 #include <asm/io.h>
15
16 extern asmlinkage void entInt(void);
17 void keyboard_interrupt(void);
18
19 void do_hw_interrupt(unsigned long type, unsigned long vector)
20 {
21 if (type == 1) {
22 jiffies++;
23 return;
24 }
25
26 if (type == 3) {
27 if (vector == 0x980) {
28 keyboard_interrupt();
29 return;
30 } else {
31 unsigned char c = inb_local(0x64);
32 printk("IO device interrupt, vector = %lx\n", vector);
33 if (!(c & 1)) {
34 int i;
35 printk("Hmm. Keyboard interrupt, status = %02x\n", c);
36 for (i = 0; i < 10000000 ; i++)
37 ;
38 printk("Serial line interrupt status: %02x\n", inb_local(0x3fa));
39 } else {
40 c = inb_local(0x60);
41 printk("#%02x# ", c);
42 }
43 return;
44 }
45 }
46 printk("Hardware intr %ld %ld\n", type, vector);
47 }
48
49 void trap_init(void)
50 {
51 unsigned long gptr;
52
53 __asm__("br %0,___tmp\n"
54 "___tmp:\tldgp %0,0(%0)"
55 : "=r" (gptr));
56 wrkgp(gptr);
57 wrent(entInt, 0);
58 }