Serial Console Problem

Hi Everyone !

I'm running a nanobsd image (Freebsd 8 and 8.1rc2) on a shoe box (Advantech 3360 based on Atom N450).
All is working very good, except serial console :
The system goes up
I'm seeing kernel message without any problem, the keyboard is working in beastie menu.
And then when it goes to userland all is scrapped, whatever i do :
1. in loader.conf if i put console="vidconsole, comconsole" the only message i get from serial is "FreeBSD/i386" and no login prompt, keyboard is not working but the vidconsole is working fine.
2. in loader.conf if i put console="comconsole, vidconsole" the pc act strangely, kernel messages are all good, but when freebsd enter in userland, i only have few and not complete messages and it stop at "Starting Network", and finally no login at all (but the machine is working in ssh and with keyboard/monitor). Also rc script seems to hang in this case.

Does anybody have an idea ?

Thanks for your help !

PS 1 : you will find screenlog for case 1 (screenlog.vidconsole) and for case 2 (screenlog.comconsole)
PS 2 : sorry for my english...
 
You might have to check /etc/ttys (it should contain information about your console)... Just some thoughts, never set serial console on FreeBSD myself...
 
Hi alp,

My ttys file is good as i know (i had already set serial console on another computers) :
Code:
/dev/ttyu0  "/usr/libexec/getty std.9600" vt100 on secure
(i ve tried also with vt220 without any success).

I've also tried this evening with Nanobsd based on freebsd 7.2 (sio) and i have got this message from kernel while booting :
Code:
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A, console
sio0: [FILTER]
 
More Precision

Hi !

Still working on my problem, and i have found a way to get it working : i have disabled the acpi.

So i get this message on boot time for uart device :
Code:
uart0: <16550 or compatible> at port 0x3f8-0x3ff irq 4 flags 0x10 pnpid PNP0501 on isa0
uart0: [FILTER]
uart0: console (115200,n,8,1)
and finally the console is working using serial port.

Since i need acpi working (because of others devices, and for remote shutdown control), is there anybody who can help me getting serial console AND acpi working together ?

Thanks
 
konks said:
Since i need acpi working (because of others devices, and for remote shutdown control), is there anybody who can help me getting serial console AND acpi working together ?
The manufacturer of that hardware could probably help...
 
aragon said:
The manufacturer of that hardware could probably help...

The serial port is held by the "Super I/O Controller" SMSC SCH3114 :
Code:
Multiple Serial Ports
SCH3114 - 4 Full Function Serial Ports
High Speed NS16C550 Compatible UARTs with Send/Receive 16-Byte FIFOs
Supports 230k, 460k, 921k and 1.5M Baud
Programmable Baud Rate Generator
Modem Control Circuitry
480 Address and 15 IRQ Options
Support IRQ Sharing Among Serial Ports
RS485 Auto Direction Control Mode
If someone had already seen this kind of controller....

Thanks
 
Last info (if someone is interested) :

Instead booting without acpi from beastie menu, i've put it out from kernel configuration.

Now all is working perfectly, with acpi.ko load a boot time...

I've got all my device, shutdown...etc...

Can't figure why this was not working when acpi was in kernel configuration.... if anybody have an explanation, i'm very interested !

Thanks
 
Disable just a part of ACPI

Hey konks, it's two years later... but thanks for your investigation, it helped me a lot. I faced exactly the same issue with serial console you've described. It plagues FreeBSD 8.3 and newer (ever since cio was replaced by uart, which attaches to acpi). Your solution is to disable ACPI and thus make uart attach to iso instead of acpi.

Disabling ACPI is often not feasible on modern x64 hardware. Loading it later at boot as a kernel module (which would help as well) is an overkill, especially since GENERIC FreeBSD has acpi compiled in the kernel and thus it would require you to rebuild your kernel.

Luckily you can disable ACPI only for the problematic serial console (uart) device. The device will not attach to acpi, but to isa instead. And magically the console (login with getty) will work!!

1) Confirm your device is attached to acpi at the moment:
# dmesg | grep uart
Code:
uart0: <16550 or compatible> at port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0

2) Identify the location of the device in the ACPI namespace:
$ sysctl -a | grep 'uart.0'
Code:
dev.uart.0.%desc: 16550 or compatible
dev.uart.0.%driver: uart
dev.uart.0.%location: handle=\_SB_.PCI0.SBRG.UAR1
dev.uart.0.%pnpinfo: _HID=PNP0501 _UID=1
dev.uart.0.%parent: acpi0

3) Disable this location in ACPI:
$ echo 'debug.acpi.avoid="\_SB_.PCI0.SBRG.UAR1"' >> /boot/loader.conf.local

4) Restart and confirm your device is not attached to acpi anymore:
# dmesg | grep uart
Code:
uart0: <16550 or compatible> at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0

The rest of ACPI is still active, your console works and you didn't have to rebuild the kernel! Worked for me for JNF99-525 (jnf99fl-525-lf) motherboard.

As far as I understand it, it is not ACPI's fault, but rather the information provided by BIOS is inaccurate. So another solution (which didn't work for me) is to update your BIOS. Took me a while to figure it out, hope it helps someone.
 
FreeBSD 9.1 Release on a Jetway JNC9C-550-lf Mini-ITX.

Simply could not read data from sensors (GPS etc) on the onboard serial ports (cuau0 and cuau1).

This code in /boot/loader.conf.local solved my problem.

Code:
debug.acpi.avoid="\_SB_.PCI0.SBRG.UAR1 \_SB_.PCI0.SBRG.UAR2"

Thank you very much.
 
Back
Top