Open et-tommythorn opened 3 years ago
Ok, the UART model is not complete and in particular the lack of interrupt support is (presumedly) the root of this. I started fixing it, but ratholed into a complete rewrite.
I enhanced the UART model (8250) to support interrupts, but it exposed what appears to be a deeper issue with interrupts. Still working on this (and might be related to why virtio isn't working)
Not technically related to serial input, but after much debugging I have found that on kernel 4.15 virtio console in tinyemu worked and doesn't in 5.12. This will affect Dromajo the same and may be a more general virtio issue. One option is to bisect linux and try to find out what changed.
Progress:
PLIC fixed and the actual issue here is that we had set the frequency way too high for simulation. Fix forthcoming.
With commit a936f7d we need just a few things to close this bug: the PLIC configuration appears to have been wrong all this time and shouldn't use intr 11 (commit pending), periodic polling of UARTs is required, and finally setting the console=ttyS0,115200
in the cmdline.
I haven't yet looked into why, but keyboard input takes seconds to arrive which seems far slower than the rest of the execution speed. This looks like a bug.