From: Thierry Bultel <tbultel@free.fr>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: nicolas Mabire <nicolas.mabire@basystemes.fr>, xenomai@xenomai.org
Subject: Re: [Xenomai] IMX kernel 3.0.35_4.1.0 + adeos-ipipe-3.0.43-mx6q-1.18-14 -> very slow boot
Date: Wed, 12 Nov 2014 17:17:47 +0100 [thread overview]
Message-ID: <5463882B.4060104@free.fr> (raw)
In-Reply-To: <20141112155528.GY17476@sisyphus.hd.free.fr>
Le 12/11/2014 16:55, Gilles Chanteperdrix a écrit :
> On Wed, Nov 12, 2014 at 04:44:24PM +0100, Thierry Bultel wrote:
>> Le 12/11/2014 16:29, Gilles Chanteperdrix a écrit :
>>> On Wed, Nov 12, 2014 at 04:20:50PM +0100, Thierry Bultel wrote:
>>>> Le 12/11/2014 15:30, Gilles Chanteperdrix a écrit :
>>>>> On Wed, Nov 12, 2014 at 03:27:11PM +0100, Thierry Bultel wrote:
>>>>>> Le 12/11/2014 14:34, Gilles Chanteperdrix a écrit :
>>>>>>> On Wed, Nov 12, 2014 at 02:17:11PM +0100, Thierry Bultel wrote:
>>>>>>>> Le 11/11/2014 21:03, Gilles Chanteperdrix a écrit :
>>>>>>>>> On Tue, Nov 11, 2014 at 08:57:34PM +0100, Thierry Bultel wrote:
>>>>>>>>>> Le 10/11/2014 13:36, Gilles Chanteperdrix a écrit :
>>>>>>>>>>> You can use printascii in the timer interrupt acknowledge routine to
>>>>>>>>>>> print a character every HZ ticks, this will give bad latency, but
>>>>>>>>>>> should work.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> For unknown reason, the kernel gets stuck after
>>>>>>>>>> "console [tty0] enabled, bootconsole disabled" if I use printascii
>>>>>>>>>> in do_local_timer().
>>>>>>>>>> earlyprintk seems broken as well.
>>>>>>>>>
>>>>>>>>> Without doing this, does earlyprintk work?
>>>>>>>>
>>>>>>>> No it does not. In fact, this kernel is strange with early debug.
>>>>>>>> Namely, even without earlyprintk, when it comes to disable the
>>>>>>>> bootconsole to use the normal one, it uses then re-prints everything
>>>>>>>> was printed before, making think that it has restarted from the
>>>>>>>> beginning.
>>>>>>>>
>>>>>>>> I confirm that calling printascii in do_local_timer() leads to a
>>>>>>>> kernel panic. Same thing if I use __ipipe_serial_debug instead.
>>>>>>>> I have used a counter (one per cpu) to start logging after 30000
>>>>>>>> ticks and it crashes after that delay.
>>>>>>>
>>>>>>> Having looked at the sources, I do not find a debug-macro.S for
>>>>>>> imx6. So, I doubt printascii can work at all. Maybe a first step is
>>>>>>> to implement this missing support.
>>>>>>
>>>>>> I think that the implementation is in arch/arm/plat-mxc/include
>>>>>> /mach/debug-macro.S
>>>>>
>>>>> And the debug UART you are using is UART2 ?
>>>>>
>>>> Yes,
>>>> and I have found out why the logs before the console switch were
>>>> displayed twice. This is because the BSP directly calls
>>>>
>>>> early_console_setup(UART2_BASE_ADDR, uart_clk);
>>>>
>>>> removing it does not make earlyprintk or printascii work better,
>>>> unfortunately.
>>>
>>> Do you get the "Uncompressing kernel..." message on the console?
>>>
>> This is all what I get when adding earlyprintk=serial,ttymxc1,115200
>> to the bootargs:
>>
>>
>> Uncompressing Linux... done, booting the kernel.
>> Linux version 3.0.43_4.1.0 (localuser@thierry-desktop) (gcc version
>> 4.7.3 (Buildroot 2014.02-rc3-g7ebc513) ) #20 SMP PREEMPT Wed Nov 12
>> 16:10:51 CET 2014
>> CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
>> CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
>> Machine: Freescale i.MX 6Quad VAB-820 Board
>> bootconsole [earlycon0] enabled
>> Memory policy: ECC disabled, Data cache writealloc
>> CPU identified as i.MX6Q, silicon rev 1.2
>>
>> <nothing after>
>
> Your problem seems to be that a static mapping for the UART2
> registers is missing: printascii only works so long as the MMU is
> not enabled.
>
> Please try the following patch:
> diff --git a/arch/arm/mach-mx6/mm.c b/arch/arm/mach-mx6/mm.c
> index ad66a94..789d265 100644
> --- a/arch/arm/mach-mx6/mm.c
> +++ b/arch/arm/mach-mx6/mm.c
> @@ -56,6 +56,11 @@ static struct map_desc mx6_io_desc[] __initdata = {
> .pfn = __phys_to_pfn(ARM_PERIPHBASE),
> .length = ARM_PERIPHBASE_SIZE,
> .type = MT_DEVICE},
> + {
> + .virtual = IMX_IO_ADDRESS(MX6Q_UART2_BASE_ADDR),
> + .pfn = __phys_to_pfn(MX6Q_UART2_BASE_ADDR),
> + .length = 4096,
> + .type = MT_DEVICE},
> };
>
> static void mx6_set_cpu_type(void)
>
>
Many thanks Gilles, that solves both my call to printascii and
earlyprintk in bootargs.
I keep trying to reproduce the freeze
Thierry
next prev parent reply other threads:[~2014-11-12 16:17 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-05 20:38 [Xenomai] IMX kernel 3.0.35_4.1.0 + adeos-ipipe-3.0.43-mx6q-1.18-14 -> very slow boot Thierry Bultel
2014-11-05 20:59 ` Gilles Chanteperdrix
2014-11-06 10:57 ` tbultel
2014-11-06 11:47 ` Gilles Chanteperdrix
2014-11-06 12:34 ` Gilles Chanteperdrix
2014-11-06 12:52 ` Gilles Chanteperdrix
2014-11-06 14:41 ` tbultel
2014-11-06 14:51 ` Gilles Chanteperdrix
2014-11-06 16:04 ` Lennart Sorensen
2014-11-06 16:08 ` Gilles Chanteperdrix
2014-11-07 9:48 ` tbultel
2014-11-07 9:52 ` Gilles Chanteperdrix
2014-11-07 9:59 ` Gilles Chanteperdrix
2014-11-07 12:47 ` tbultel
2014-11-07 19:58 ` Gilles Chanteperdrix
2014-11-09 17:48 ` Thierry Bultel
2014-11-10 12:36 ` Gilles Chanteperdrix
2014-11-11 19:57 ` Thierry Bultel
2014-11-11 20:03 ` Gilles Chanteperdrix
2014-11-12 13:17 ` Thierry Bultel
2014-11-12 13:34 ` Gilles Chanteperdrix
2014-11-12 14:27 ` Thierry Bultel
2014-11-12 14:30 ` Gilles Chanteperdrix
2014-11-12 15:20 ` Thierry Bultel
2014-11-12 15:29 ` Gilles Chanteperdrix
2014-11-12 15:44 ` Thierry Bultel
2014-11-12 15:55 ` Gilles Chanteperdrix
2014-11-12 16:17 ` Thierry Bultel [this message]
2014-11-12 16:15 ` Gilles Chanteperdrix
2014-11-12 18:53 ` Lennart Sorensen
2014-11-12 19:06 ` Gilles Chanteperdrix
2014-11-12 19:13 ` Lennart Sorensen
2014-11-12 19:28 ` Gilles Chanteperdrix
2014-11-12 19:35 ` Lennart Sorensen
2014-11-13 14:44 ` tbultel
2014-11-13 14:51 ` Gilles Chanteperdrix
2014-11-13 15:03 ` tbultel
2014-11-13 15:10 ` Gilles Chanteperdrix
2014-11-13 15:23 ` tbultel
2014-11-13 15:26 ` Gilles Chanteperdrix
2014-11-14 10:15 ` tbultel
2014-11-14 10:28 ` Gilles Chanteperdrix
2014-11-16 20:44 ` Thierry Bultel
2014-11-17 10:12 ` Gilles Chanteperdrix
2014-11-17 10:43 ` tbultel
2014-11-06 12:48 ` Gilles Chanteperdrix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5463882B.4060104@free.fr \
--to=tbultel@free.fr \
--cc=gilles.chanteperdrix@xenomai.org \
--cc=nicolas.mabire@basystemes.fr \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.