| 291 | // fall inside the ROM range. SYSCON writes are intercepted in `MemoryAccess` below. |
| 292 | #[inline] |
| 293 | fn route(&mut self, addr: u64) -> Option<(&mut dyn MemoryAccess, u64)> { |
| 294 | match addr { |
| 295 | a if a >= UART_BASE && a <= UART_END => Some((&mut self.uart, addr - UART_BASE)), |
| 296 | a if a >= CLINT_BASE && a <= CLINT_END => Some((&mut self.clint, addr - CLINT_BASE)), |
| 297 | a if a >= PLIC_BASE && a <= PLIC_END => Some((&mut self.plic, addr - PLIC_BASE)), |
| 298 | a if a >= FB_BASE && a <= FB_END => Some((&mut self.framebuffer, addr - FB_BASE)), |
| 299 | a if a >= KBD_BASE && a <= KBD_END => Some((&mut self.keyboard, addr - KBD_BASE)), |