lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 4 Dec 2013 10:56:43 -0800
From:	Tim Kryger <tim.kryger@...aro.org>
To:	Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
	linux-serial@...r.kernel.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Patch Tracking <patches@...aro.org>,
	Gregory Clement <gregory.clement@...e-electrons.com>,
	Lior Amsalem <alior@...vell.com>,
	Jason Cooper <jason@...edaemon.net>,
	ARM Kernel List <linux-arm-kernel@...ts.infradead.org>,
	Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
Subject: Re: [PATCH v2] serial: 8250_dw: Improve unwritable LCR workaround

On Wed, Dec 4, 2013 at 5:01 AM, Ezequiel Garcia
<ezequiel.garcia@...e-electrons.com> wrote:
> On Thu, Nov 28, 2013 at 04:53:37PM -0300, Ezequiel Garcia wrote:
>> On Thu, Nov 28, 2013 at 04:47:20PM -0300, Ezequiel Garcia wrote:

>> > Changing the console port by setting "console=ttyS1,115200" gives this:
>> >
>> > [..]
>> > Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
>> > dw-apb-uart d0012000.serial: Couldn't set LCR to 191
>> > dw-apb-uart d0012000.serial: Couldn't set LCR to 191
>> > dw-apb-uart d0012000.serial: Couldn't set LCR to 224
>> > dw-apb-uart d0012000.serial: Couldn't set LCR to 224
>> > d0012000.serial: ttyS0 at MMIO 0xd0012000 (irq = 17, base_baud = 15625000) is a 16550A
>> > dw-apb-uart d0012100.serial: Couldn't set LCR to 191
>> > dw-apb-uart d0012100.serial: Couldn't set LCR to 191
>> > dw-apb-uart d0012100.serial: Couldn't set LCR to 224
>> > dw-apb-uart d0012100.serial: Couldn't set LCR to 224
>> > d0012100.serial: ttyS1 at MMIO 0xd0012100 (irq = 18, base_baud = 15625000) is a 16550A
>> > console [ttyS1] enabled
>> > dw-apb-uart d0012200.serial: Couldn't set LCR to 191
>> > dw-apb-uart d0012200.serial: Couldn't set LCR to 191
>> > dw-apb-uart d0012200.serial: Couldn't set LCR to 224
>> > dw-apb-uart d0012200.serial: Couldn't set LCR to 224
>> > d0012200.serial: ttyS2 at MMIO 0xd0012200 (irq = 31, base_baud = 15625000) is a 16550A
>> > dw-apb-uart d0012300.serial: Couldn't set LCR to 191
>> > dw-apb-uart d0012300.serial: Couldn't set LCR to 191
>> > dw-apb-uart d0012300.serial: Couldn't set LCR to 224
>> > dw-apb-uart d0012300.serial: Couldn't set LCR to 224
>> > d0012300.serial: ttyS3 at MMIO 0xd0012300 (irq = 32, base_baud = 15625000) is a 16550A
>> >
>> > So we get the "Couldn't set" message in all four ports.
>> >
>> > Tim: Any ideas?
>>
>> And another thing: the weird output on the console looks related to the
>> early boot console. If I enable 'earlyprintk' on ttyS0 but set the console
>> on ttyS1, this is what I get on ttyS0:
>>
>> bootconsole [earlycon0] enabled
>> [..]
>> Kernel command line: earlyprintk console=ttyS1,115200 root=/dev/nfs rw nfsroot=192.168.0.45:/opt/buildrootfs,v3, ip=192.168.0.159:192.168.0.45:192.168.0.1:255.255.255.0:develboard:eth0:on rootwait
>> [..]
>> Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
>> �Ɋ��Ɂ����Ɇ�������������������������������������
>> Welcome to Buildroot
>> buildroot login:
>>
>> Hope this helps you understand what's going on...
>
> Gentle ping?
>
> Any ideas about those weird characters?

If there was just one weird character, I would say it was an
indication that hardware rejected a write to LCR and then software
wrote the lower 8 bits of the baud into DLL which happens to live at
the same address offset as RBR.  However, there are a bunch of them
here so it is less clear.

It would be really helpful to get any extra information that you can
about the Synopsys IP in your SoC.  If it configured with
UART_ADD_ENCODED_PARAMS = 1, there should be a UART configuration ID
register at offset 0xF4.  Could you try reading that back?  This
register has information about the FIFO size and a few more things.

Also, I am curious what LCR value the hardware reports when the driver
fails update it.  Perhaps you can amend the error message to include
p->serial_in(p, UART_LCR) too?

-Tim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ