* This function initializes 8259 interrupt controller */
| 31 | * This function initializes 8259 interrupt controller |
| 32 | */ |
| 33 | void rt_hw_pic_init() |
| 34 | { |
| 35 | outb(IO_PIC1, 0x11); |
| 36 | outb(IO_PIC1+1, IRQ_OFFSET); |
| 37 | outb(IO_PIC1+1, 1<<IRQ_SLAVE); |
| 38 | outb(IO_PIC1+1, 0x3); |
| 39 | outb(IO_PIC1+1, 0xff); |
| 40 | outb(IO_PIC1, 0x68); |
| 41 | outb(IO_PIC1, 0x0a); |
| 42 | outb(IO_PIC2, 0x11); |
| 43 | outb(IO_PIC2+1, IRQ_OFFSET + 8); |
| 44 | outb(IO_PIC2+1, IRQ_SLAVE); |
| 45 | outb(IO_PIC2+1, 0x3); |
| 46 | outb(IO_PIC2+1, 0xff); |
| 47 | outb(IO_PIC2, 0x68); |
| 48 | outb(IO_PIC2, 0x0a); |
| 49 | |
| 50 | if (irq_mask_8259A != 0xFFFF) |
| 51 | { |
| 52 | outb(IO_PIC1+1, (char)irq_mask_8259A); |
| 53 | outb(IO_PIC2+1, (char)(irq_mask_8259A >> 8)); |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | void rt_hw_interrupt_handle(int vector, void* param) |
| 58 | { |
no test coverage detected