[U-Boot] [PATCH 67/72] serial: Unconditionally enable CONFIG_SERIAL_MULTI
Tom Rini
trini at ti.com
Wed Oct 10 00:13:46 CEST 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 10/09/12 15:09, Stephen Warren wrote:
> On 10/09/2012 03:38 PM, Tom Rini wrote:
>> On Tue, Oct 09, 2012 at 02:33:51PM -0600, Stephen Warren wrote:
>>> On 09/29/2012 03:53 PM, Marek Vasut wrote:
>>>> Enable CONFIG_SERIAL_MULTI for all builds of U-Boot. That
>>>> includes both SPL builds and non-SPL builds, everything. To
>>>> avoid poluting this patch with removal of ifdef-endif
>>>> constructions containing CONFIG_SERIAL_MULTI, the
>>>> CONFIG_SERIAL_MULTI is temporarily added into CPPFLAGS in
>>>> config.mk . This will be again removed in following patch.
>>>
>>> Marek,
>>>
>>> This patch (at least, the version of it checked into
>>> u-boot/next) breaks U-Boot on Tegra.
>>>
>>> I believe the reason is because nothing ever calls
>>> serial_initialize() in the SPL on Tegra. If I edit
>>> arch/arm/cpu/arm720t/tegra20/spl.c function
>>> preloader_console_init() to call serial_initialize() right
>>> before it calls serial_init(), then everything works fine.
>>> Without this, drivers/serial/serial.c is never initialised (not
>>> even BSS cleared!) and so it's left set to some bogus value,
>>> and so get_current() doesn't replace it with
>>> default_serial_console(), so an invalid pointer is accessed,
>>> causing a hang or crash.
>>>
>>> I'm not sure quite what the correct solution is here. Is
>>> Tegra's custom spl.c doing too much; stuff that should come
>>> from the common spl.c is cut/paste here? Or, is adding the call
>>> to serial_initialize() the correct fix? Or, is the root-cause
>>> of the problem that BSS (serial_current) isn't being cleared to
>>> 0?
>>
>> Tegra SPL needs to either be updated ala common/spl/
>> (preloader_console_init() calls serial_init()) or switched over
>> to it.
>
> Hmm, well it's already calling serial_init() just not
> serial_initialize(). Perhaps the issue is the following code
> missing from Tegra's SPL:
>
> /* Clear the BSS. */ memset(__bss_start, 0, __bss_end__ -
> __bss_start);
>
> Anyway, I'll let Allen take a look at it, since he's most familiar
> with Tegra SPL.
Yes, if SPL wasn't previously clearing the BSS, this would be a
problem now.
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
iQIcBAEBAgAGBQJQdKGaAAoJENk4IS6UOR1W3WcP/2d60PT9cL2Y0OauFG9/7gAD
PnrwKgTGWVD5wSb4bKNxb9abFSFhoeqn9BKxAYvAQ0TPXXaMgvYdHGOe9D422K1z
V76I3At84AYqXQq/3xeVTHzqK4on1H751e4einvbcd5IelkwMoKdA94Kufq1OdeD
MR5kXp1oyE11Ty9b/OZsDQlqczY8SG5x556+sO8FFa4yoQc82LF3x8ymL0R51wlB
D38/uqbvBPCYuE6H+GAawIW7L+SJjXhMaykTyUnNbb+tfvZYMt1IGFNMq2SsL75j
Kq7WuXGLb1UBB+ebFdlzPtuEtybtBjyhbqTBBu3ikKB7SLWG5ligGVbP5WVRFNuc
p3po82Wn4erzoX9y1e+LA/9Idhm8ttXZpbwFVqNc9DveJvTfItRV6A2jJWnhRfCp
SJqh10QCvlMOKdibB4j4f4aFAiR0Og2jOSlFHPfIidPXme/ZqqM5nhmN3WFW8acU
LvEimmz5XSeJ0Uosg39JtgoXPCJwKLG9px9wby5NjxbvavE7S4wHNs1h3tHo7B8e
D+csKIvoGJLiPKSr80xesv23JogHJab+37uj8Aazc/4R3GDgBeTChPvGuxsQBoeP
ZvlaD03SuyGbQ6kQJrCa9/VZS/HR2y0lFqEk0MTvwRh0mZCCR/N/nTSI/dss9rEG
uuYMDXwlIjZ0cY/ggIrv
=PNet
-----END PGP SIGNATURE-----
More information about the U-Boot
mailing list