From owner-freebsd-stable@FreeBSD.ORG Wed Jun 5 19:30:02 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1CD58564 for ; Wed, 5 Jun 2013 19:30:02 +0000 (UTC) (envelope-from haramrae@gmail.com) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) by mx1.freebsd.org (Postfix) with ESMTP id AA7E71CB8 for ; Wed, 5 Jun 2013 19:30:01 +0000 (UTC) Received: by mail-wi0-f169.google.com with SMTP id hn14so5318521wib.4 for ; Wed, 05 Jun 2013 12:30:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=hmv2EBZE+9up8Dl4HWtxjsxvNtGdSAO5+v3Bw2//FTE=; b=VYODZm+mN7lX+FG6Ci3DsJMIKuXiwjOPZ9X5O49d+qBxaL7vQpRFJW4Ikf3cOUNtRY Kds/kLhBxlpDE/y9qkDQOTymGh1CsbzFsDM+w1K1+jEq2UdPR7fwC/6OHPXRRH7egb4c Q7y/X8WK71kBEmib4b5dBSButEoa+BrR2FKYIliB9tCWeKaudfOsScJlEd4ZZ04R9hy2 zwEKuSZHVt5C+HiDI0+Kg2DOSQbvqFTEF6Q3d178Cdyw5uE5N7/uIfUp29E0nFpPgOPx SgaFldRZ5thNbMQjKMwNOQpIXnBwGwwRqxY6Jyk/SgPs7nZTyDgHch4KkSeqXOJ0Krut tR9Q== X-Received: by 10.194.242.229 with SMTP id wt5mr23063418wjc.36.1370460599993; Wed, 05 Jun 2013 12:29:59 -0700 (PDT) Received: from hollewijn.internal (8d690a59.ftth.concepts.nl. [141.105.10.89]) by mx.google.com with ESMTPSA id fx7sm12539751wic.11.2013.06.05.12.29.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 05 Jun 2013 12:29:58 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: Serial terminal issues From: Alban Hertroys In-Reply-To: <20130605005918.GA5709@icarus.home.lan> Date: Wed, 5 Jun 2013 21:29:56 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <93196E06-1775-46A4-A3E9-1C8A3B8C4E94@gmail.com> References: <383C78B1-4F16-408F-8144-63B470D0C129@gmail.com> <20130605005918.GA5709@icarus.home.lan> To: Jeremy Chadwick X-Mailer: Apple Mail (2.1503) Cc: "freebsd-stable@freebsd.org" X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jun 2013 19:30:02 -0000 On Jun 5, 2013, at 2:59, Jeremy Chadwick wrote: > On Tue, Jun 04, 2013 at 11:32:48PM +0200, Alban Hertroys wrote: >> I can't seem to get my serial terminal to work with my new system. >>=20 >> I had a serial terminal connected to my old system that worked great >> and copied /boot.config, /boot/loader.conf and /etc/ttys settings = over >> from it. >>=20 >> The new system has a Gigabyte GA970A-UD3 board with just a serial >> header on the board. I bought a serial connector backplate in an >> electronics store and connected it to the board. Could the pinout be >> different or something? >=20 > It is very possible. You should have asked Gigabyte what exact = product > (specifically part number) to purchase that provided a > header-to-backplane DB9 port, or if they could send you one (many will > for free). Always use what the mainboard vendor tells you. Always. I contacted Gigabyte, but haven't heard from them yet. For the Dutch readers: their website is at gigabyte.co.nl. You = absolutely don't want to go to gigabyte.nl - not safe for work, not at = all (guess where I was=85). > It's also very possible the cable you're using to connect from the > Gigabyte board to something (you didn't disclose what) is wired wrong. I doubt that. It has worked fine before in the same setup with the = previous PC and only stopped working once I connected it to the new PC. = The new PC is the only variable, I expect that's where the problem is. The other end of the serial cable is connected to a Bull serial terminal = (TWSH004/A). The cable has been that same serial cable for the last 10 = years or so. >>> cat /boot.config=20 >> -D -S19200 >=20 > Please try using "-S19200 -Dh" (please read carefully). The order of > the arguments may matter as well (there has been some speculation on = the > lists about this, and I do not care to do the analysis; just passing > information on blindly). That's interesting, I didn't expect that. I'll test that when I get = around to playing with the serial port again. That said, these settings worked in the old PC. I copied boot.config = straight over from my backups. >>> cat /boot/loader.conf=20 >> boot_multicons=3D"YES" >> boot_serial=3D"YES" >> comconsole_speed=3D"19200" >> console=3D"comconsole,vidconsole" >=20 > You do not need any of this given what /boot.config contains. Please > remove it all. Good to know, I never liked having this information in duplicate. >>> =46rom /var/log/messages: >> Jun 4 21:28:50 solfertje kernel: uart0: <16550 or compatible> port = 0x3f8-0x3ff irq=20 >> 4 flags 0x10 on acpi0 >> Jun 4 21:28:50 solfertje kernel: uart0: console (19200,n,8,1) >> Jun 4 21:28:50 solfertje kernel: orm0: at iomem = 0xd5000-0xd67ff,0xd7000-0xd7fff on isa0 >> Jun 4 21:28:50 solfertje kernel: sc0: at flags = 0x100 on isa0 >> Jun 4 21:28:50 solfertje kernel: sc0: VGA <16 virtual consoles, = flags=3D0x300> >> Jun 4 21:28:50 solfertje kernel: vga0: at port = 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 >> Jun 4 21:28:50 solfertje kernel: atkbdc0: at port 0x60,0x64 on isa0 >> Jun 4 21:28:50 solfertje kernel: atkbd0: irq 1 on = atkbdc0 >> Jun 4 21:28:50 solfertje kernel: kbd0 at atkbd0 >> Jun 4 21:28:50 solfertje kernel: atkbd0: [GIANT-LOCKED] >=20 > Okay, so what's the problem? You're not seeing any I/O on the serial > port? I get a blank screen with just a cursor. It's not blinking because = blinking cursors get on my nerves. Whether that means no I/O at all or the wrong kind of I/O I can't tell. = I haven't set up a terminal like this in 10 years as the previous setup = always just worked once set up. It's quite possible that I forgot some = important detail. > How do you have your serial device connected to something on the > other end? Meaning: solfertje has a serial port, and it's connected = to > what exactly? The Bull terminal mentioned above. > Are you sure the device its connected to is working? Well, it was still working great a few days ago before I replaced the PC = it was connected to, so I assume it still does. (snipped useful information that doesn't apply to my case as my cable = has proven to be correct) >=20 >> I didn't see any options in the BIOS to set the console speed (just >> address and IRQ, those are in the above). ISTR that my old mobo did >> allow to set that information, but then again, that board (Tyan = Tiger) >> gave me access to the BIOS through the serial console. >=20 > This has absolutely no relevancy. I thought as much, but it is one obvious difference between the old and = new situation... > Serial port speed settings in a BIOS pertain to BIOS-level console > redirection -- that redirection is lost the instant anything (boot > loader, kernel, etc.) touches SMI and/or interrupts and starts > "fiddling" with the serial port. That's the bit I wasn't entirely certain of - that there is no possible = interaction from having a BIOS console to the point where the OS takes = over. That's why I mentioned it. I assumed that if the BIOS had set up the serial port to 19200 baud and = the OS didn't specify it, that it would be possible that the speed set = up in the BIOS would still be in effect and that the serial terminal = just incidentally worked for the last 10 years because of that. = Far-fetched, I know. That's another theory shot down. > What you're adjusting in FreeBSD is 1) the FreeBSD boot loader = touching > the serial port, and 2) the FreeBSD kernel outputting to a serial port > (it also initialises/sets the serial port), and 3) getty et al = spawning > a login prompt on the serial port. Regarding 2). I found some references on the internet pertaining = settings in the kernel config file to adjust serial console settings. = Could that be what I'm missing? I'm fairly certain the last kernel I used on the old PC was the GENERIC = i386 kernel. I don't think there are any significant differences = regarding serial console between STABLE-i386 (of a few months ago) and = STABLE-amd64? > I would point you to my "FreeBSD via serial console and PXE" document, > except there are one-offs specific to the PXE portions that are not > relevant to your situation. The important part is that I've used > FreeBSD serial console for almost 16 years and have a very good > understanding of what works (including vs. what some developers say > "should" work; i.e. reality vs. pragmatism). True, but there's relatively much interaction between the different = parts that you need to get right before a serial console works at all. = Such as having everything on the same baud-rate, for an obvious example. My guess is that the problem is indeed the connection from the = motherboard header to the bracket on the case. I'll verify the cabling = of that part sometime this weekend. Thanks for the help so far. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll find there is no forest.