UART grab patch
Warner Losh
imp at bsdimp.com
Sat Dec 28 23:31:00 UTC 2013
OK. Looks like my initial assessment of mountroot was too optimistic. With the exception of the imx driver, all the uart drivers in the tree fell victim to this bug. I hit a second one with the Raspberry Pi, and went looking.
I've uploaded a patch to http://people.freebsd.org/~imp/uart-grab.diff that should solve the problem. I don't have all these systems to test on, so I'm hoping people can report back to me what works and what doesn't. Boot -a with and without the patch for all serial consoles will tell you if it is working. Type stuff. If it appears exactly as you type it, then the patch is working. If not, please let me know.
The basic strategy for all these is to disable RX interrupts when the console is grabbed, and enable them when it is ungrabbed. This has to be done in the hardware, since masking the interrupt at the CPU or PIC level will cause many UARTs to misbehave and/or prevent other interrupts from happening that are shared which can cause problems on some platforms.
Comments and critiques of these patches are welcome. I posted to arch@ because it affects so many different platforms at once, and this seems like a arch at y thing...
Warner
More information about the freebsd-arch
mailing list