外部中断分发器:CPU 外部中断 -> PLIC -> 设备 handler
| 24 | |
| 25 | // 外部中断分发器:CPU 外部中断 -> PLIC -> 设备 handler |
| 26 | auto ExternalInterruptHandler(uint64_t /*cause*/, cpu_io::TrapContext* context) |
| 27 | -> uint64_t { |
| 28 | auto& plic = InterruptSingleton::instance().plic(); |
| 29 | auto source_id = plic.Which(); |
| 30 | plic.Do(source_id, context); |
| 31 | plic.Done(source_id); |
| 32 | return 0; |
| 33 | } |
| 34 | |
| 35 | // ebreak 中断处理 |
| 36 | auto EbreakHandler(uint64_t exception_code, cpu_io::TrapContext* context) |