Date: Sat, 11 Mar 2017 13:19:16 -0600 From: Karl Denninger <karl@denninger.net> To: freebsd-arm@freebsd.org Subject: Re: Odd-looking serial console prompt on RPI2 Message-ID: <ed5b8c65-adbf-ef39-39a4-d1030541bb9c@denninger.net> In-Reply-To: <1489259878.40576.62.camel@freebsd.org> References: <20170302000334.GA99403@www.zefox.net> <1488419304.60166.26.camel@freebsd.org> <20170302020116.GA98466@bluezbox.com> <1488420309.60166.32.camel@freebsd.org> <CA%2B7sy7Bv=-2mx2MJP18ZnbNp2yO2hKukw=KALn711txaxsk=rg@mail.gmail.com> <1488664965.69705.24.camel@freebsd.org> <20170307190937.r7n45xj67tnhevv4@mutt-hbsd> <20170307192918.2garie2ow6lzekg7@mutt-hbsd> <20170311174940.bze4k7ndjdemmu4l@mutt-hbsd> <1489255444.40576.57.camel@freebsd.org> <20170311180947.ro5obisuaemvudkp@mutt-hbsd> <1489259878.40576.62.camel@freebsd.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On 3/11/2017 13:17, Ian Lepore wrote: > On Sat, 2017-03-11 at 13:09 -0500, Shawn Webb wrote: >> On Sat, Mar 11, 2017 at 11:04:04AM -0700, Ian Lepore wrote: >>> On Sat, 2017-03-11 at 12:49 -0500, Shawn Webb wrote: >>>> On Tue, Mar 07, 2017 at 02:29:18PM -0500, Shawn Webb wrote: >>>>> >>>>> On Tue, Mar 07, 2017 at 02:09:37PM -0500, Shawn Webb wrote: >>>>>> >>>>>> On Sat, Mar 04, 2017 at 03:02:45PM -0700, Ian Lepore wrote: >>>>>>> >>>>>>> The bugs should be fixed as of r314682. ?It looks like the >>>>>>> bugs >>>>>>> have >>>>>>> long been in the pl011 driver, but were masked by having a >>>>>>> fifo >>>>>>> depth >>>>>>> of 1 byte -- it all sorta worked by accident previously. >>>>>> Thanks for the fix! But it looks to be only partial. When I >>>>>> connect to >>>>>> the serial console via either cu or screen, I don't get >>>>>> corrupted >>>>>> text, >>>>>> but no keypresses are registered. Hitting enter at the login >>>>>> prompt does >>>>>> absolutely nothing. I'm at the latest commit of >>>>>> hardened/current/master >>>>>> on HardenedBSD for both the RPI3 and my laptop. >>>>>> >>>>>> I'm using this serial cable from Adafruit: >>>>>> https://www.adafruit.com/product/954 >>>>> It looks like I had a bad cable. Sorry for the line noise. >>>>> Switching to >>>>> a different cable worked. >>>> Looks like the problem is back, but manifest in a different way. >>>> Screenshot: >>>> >>>> https://goo.gl/photos/XYx6v1jCTVCGrnhd6 >>>> >>>> Thanks, >>>> >>> I wonder if rpi3 needs the same smaller-fifo fix as a 32-bit rpi. >>> ?Just >>> to test that theory, can you see if the attached patch fixes >>> problem? >>> ?If it does, I'll figure out how to detect rpi3 at runtime and set >>> the >>> sizes properly. >>> >>> -- Ian >>> >>> Index: sys/dev/uart/uart_dev_pl011.c >>> =================================================================== >>> --- sys/dev/uart/uart_dev_pl011.c (revision 314917) >>> +++ sys/dev/uart/uart_dev_pl011.c (working copy) >>> @@ -464,7 +464,7 @@ uart_pl011_bus_probe(struct uart_softc *sc) >>> is_bcm2835 = ofw_bus_is_compatible(sc->sc_dev, >>> "brcm,bcm2835-pl011") || >>> ofw_bus_is_compatible(sc->sc_dev, "broadcom,bcm2835- >>> uart"); >>> #else >>> - is_bcm2835 = false; >>> + is_bcm2835 = true; >>> #endif >>> hwrev = __uart_getreg(&sc->sc_bas, UART_PIDREG_2) >> 4; >>> if (hwrev <= 2 || is_bcm2835) { >> Sure. I'll report back either tonight or tomorrow. >> >> Thanks, >> > Actually, I think a proper solution will be something like the attached > patch. After some spelunking on the web I think the rpi3 fifos are the > smaller size because the fdt data contains the linux-style workaround > (which overrides the primecell periphid value with fdt data). This > patch looks for that in addition to looking for the rpi compatible > strings (still required to handle old-style freebsd fdt data). > > -- Ian > > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" I can build for and test both the RPI2 and 3 if you'd like on serial console; I have both sitting here on my workbench. Just tell me which rev to check out and what to patch on it. -- Karl Denninger karl@denninger.net <mailto:karl@denninger.net> /The Market Ticker/ /[S/MIME encrypted email preferred]/ [-- Attachment #2 --] 0 *H 010 `He 0 *H \0X0@=0 *H 010 UUS10UFlorida10U Niceville10U Cuda Systems LLC10UCuda Systems LLC CA1"0 *H Cuda Systems LLC CA0 161218194535Z 211217194535Z0W10 UUS10UFlorida10U Cuda Systems LLC10Ukarl@denninger.net0"0 *H 0 ͍fd`1ie6";fSz`5¹/?{=Ӵowjħ_fnӴMG\ҢҖ4ib}>@mJo&mM; Q9U cj]p퐆W.2E= ^¢tzĄ'5i7_`~#dY `]R]N%R}EXzqV@[oN T>5AwYˡA"\v&YG]+($p:M,T?=mJkMљg*ym L!J[./d?W^LysD'1 +V'~{-SSX= q-f=%&V<m4BeSet| l2m 6iO{wv +aHXˈ5=~é*C!?uJr3tb'3`Oe)üLxt&3N526llU .|Cp[l? 007++0)0'+0http://cudasystems.net:88880 U0 0 `HB0U0, `HB OpenSSL Generated Certificate0U/Zi 0GhG0U#0$q}ݽʒm50U0karl@denninger.net0 *H b%X%gwq Ɂэr K[DMJ35W6 sz8d|qB2Cyw2PbV} â[!W{HD7oD.TZ'w6~g( -,]R8P{*[f<1=7jGj9铚~3f2AʺN k~@vz^j(>ͺyh2y{/9}4.45#S|<fW!.,Bss*Q+h=}l@ "q "M&6J5*,G {hɫjbNgǠ.ЃXȶ4$O.5evHlZba!4eE!x|Za1nZ5TuPvW|#G+ DZpI7S'n0 haGa@vZ e|]Cu+))vRyY100010 UUS10UFlorida10U Niceville10U Cuda Systems LLC10UCuda Systems LLC CA1"0 *H Cuda Systems LLC CA=0 `He M0 *H 1 *H 0 *H 1 170311191916Z0O *H 1B@SA fDߦz+ r_=8z;jnyoiyV[M=ޔ0l *H 1_0]0 `He*0 `He0 *H 0*H 0 *H @0+0 *H (0 +710010 UUS10UFlorida10U Niceville10U Cuda Systems LLC10UCuda Systems LLC CA1"0 *H Cuda Systems LLC CA=0*H 1010 UUS10UFlorida10U Niceville10U Cuda Systems LLC10UCuda Systems LLC CA1"0 *H Cuda Systems LLC CA=0 *H mkH3I^'Qڃwݪi:bp`]&,ߌ Ŧ3YꗝD*Pw_<cr#C{_ M(cF盋~in2&u!{&1r;4݃ 'bXó>BGJMJq.g"f`Aʫ<ed`פ% }8(/3S[:bKLO@ϫU4g};UGY>F3H!/Zh.1mk#2yY_ov9IEyΆYjR~A_tQF~;X.t#͛O]__&y}vŜ_מNPxыg9gKA{YI15L.BOJmMl((yW*h{_lq@`ÀyzbGlwJUNow}5JR+@J)ѵ<8f?:w{'qcgWhelp
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ed5b8c65-adbf-ef39-39a4-d1030541bb9c>
