| 38 | } |
| 39 | |
| 40 | void InterruptManager::initialize8259A() |
| 41 | { |
| 42 | // ICW 1 |
| 43 | asm_out_port(0x20, 0x11); |
| 44 | asm_out_port(0xa0, 0x11); |
| 45 | // ICW 2 |
| 46 | IRQ0_8259A_MASTER = 0x20; |
| 47 | IRQ0_8259A_SLAVE = 0x28; |
| 48 | asm_out_port(0x21, IRQ0_8259A_MASTER); |
| 49 | asm_out_port(0xa1, IRQ0_8259A_SLAVE); |
| 50 | // ICW 3 |
| 51 | asm_out_port(0x21, 4); |
| 52 | asm_out_port(0xa1, 2); |
| 53 | // ICW 4 |
| 54 | asm_out_port(0x21, 1); |
| 55 | asm_out_port(0xa1, 1); |
| 56 | |
| 57 | // OCW 1 屏蔽主片所有中断,但主片的IRQ2需要开启 |
| 58 | asm_out_port(0x21, 0xfb); |
| 59 | // OCW 1 屏蔽从片所有中断 |
| 60 | asm_out_port(0xa1, 0xff); |
| 61 | } |
| 62 | |
| 63 | void InterruptManager::enableTimeInterrupt() |
| 64 | { |
nothing calls this directly
no outgoing calls
no test coverage detected