Whilst testing some FreeBSD/riscv interrupt controller reworking I noticed that we see crazy numbers of interrupts coming from uart1 (uart0 is fine):
jrtc27@unmatched:~$ vmstat -i | grep ,40\\\|rate interrupt total rate plic0,40: 274516098 121558
(and that’s with the device disabled for a while so the average has fallen off; I’ve seen it as high as ~190 kHz)
Given that this is the UART wired to the M.2 E-key slot, which is empty on my board, I’m wondering whether a pull-up has been forgotten on the RX line internally (there isn’t one on the board according to the schematic, and presumably uart0 doesn’t need one since it’s always connected at both ends), so the signal is floating and thus leading to spurious received characters?
On Linux it seems that, whilst the count is 0 in normal use, if I attach to /dev/ttySIF1 with screen then /proc/interrupts does start to show the count going up quite quickly, albeit not quite so absurdly high (still ~2 kHz…). Presumably Linux lazily enables/disables the UART, whereas FreeBSD keeps its UARTs fully working even when not open (and not the console), and maybe it’s also throttling. I guess that explains why it went unnoticed, if my suspicion is indeed correct?