From owner-freebsd-arm@freebsd.org Sat Mar 11 18:20:24 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E954D060C6 for ; Sat, 11 Mar 2017 18:20:24 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0023A264 for ; Sat, 11 Mar 2017 18:20:23 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 4b9424e8-0687-11e7-b3c2-c9f38144898e X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 4b9424e8-0687-11e7-b3c2-c9f38144898e; Sat, 11 Mar 2017 18:19:42 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v2BIKLbb001724; Sat, 11 Mar 2017 11:20:21 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1489256421.40576.59.camel@freebsd.org> Subject: Re: Odd-looking serial console prompt on RPI2 From: Ian Lepore To: Shawn Webb Cc: freebsd-arm@freebsd.org Date: Sat, 11 Mar 2017 11:20:21 -0700 In-Reply-To: <20170311180947.ro5obisuaemvudkp@mutt-hbsd> References: <20170302000334.GA99403@www.zefox.net> <1488419304.60166.26.camel@freebsd.org> <20170302020116.GA98466@bluezbox.com> <1488420309.60166.32.camel@freebsd.org> <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> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Mar 2017 18:20:24 -0000 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, > I've just learned that the rpi3 uses fdt data (I thought it was acpi), so that patch won't do anything as-is.  Move the is_bcm2835=true outside after the #endif so it's just always in effect, to test the concept.  I think I know a different way to detect the rpi3 at runtime if need be. -- Ian