* ARM, earlyconsole and io mapping
@ 2015-03-30 12:05 Robert Jarzmik
2015-03-30 12:11 ` Thomas Petazzoni
2015-03-30 23:31 ` Peter Hurley
0 siblings, 2 replies; 5+ messages in thread
From: Robert Jarzmik @ 2015-03-30 12:05 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
I was wondering how the earlyconsole was supposed to work in order to add
support to the pxa architecture. More specifically, I don't understand how the
memory mapping is supposed to be available at the early parameters parsing.
The thing I don't understand is that :
- in kernel initialization, parse_early_param() is called before
machine_desc->map_io()
- as a consequence, the architecture didn't add the vm early mapping for serial
peripheral (which is added in pxa_map_io())
- as a consequence, earlycon_map() will fail to map the serial MMIO
(as in stack showed in [1])
Therefore, are there non-DT earlycon users on the list, and could they tell me
what way they get earlycon support in their arm boards please ?
Cheers.
--
Robert
[1] Call stack
#0 __arm_ioremap_pfn_caller (pfn=262400, offset=0, size=64, mtype=0, caller=0xc041d66c) at arch/arm/mm/ioremap.c:260
#1 0xc0015d34 in __arm_ioremap_caller (phys_addr=<value optimized out>, size=<value optimized out>, mtype=0, caller=<value optimized out>) at arch/arm/mm/ioremap.c:354
#2 0xc0015868 in __arm_ioremap (phys_addr=<value optimized out>, size=<value optimized out>, mtype=<value optimized out>) at arch/arm/mm/ioremap.c:383
#3 0xc041d66c in earlycon_map (buf=0x0, match=0x0, setup=0x40) at drivers/tty/serial/earlycon.c:48
#4 setup_earlycon (buf=0x0, match=0x0, setup=0x40) at drivers/tty/serial/earlycon.c:138
#5 0xc040a52c in do_early_param (param=0xc0424bf6 "earlycon", val=0xc0424bff "pxa,mmio,0x40100000,115200n8", unused=<value optimized out>) at init/main.c:420
#6 0xc00306bc in parse_one (doing=0xc0393668 "early options", args=0xc0424c1b "", params=<value optimized out>, num=<value optimized out>, min_level=0, max_level=0, unknown=0) at kernel/params.c:131
#7 parse_args (doing=0xc0393668 "early options", args=0xc0424c1b "", params=<value optimized out>, num=<value optimized out>, min_level=0, max_level=0, unknown=0) at kernel/params.c:216
#8 0xc040a854 in parse_early_options (cmdline=<value optimized out>) at init/main.c:430
#9 0xc040a890 in parse_early_param () at init/main.c:444
#10 0xc040d950 in setup_arch (cmdline_p=0xc07f3fd4) at arch/arm/kernel/setup.c:922
#11 0xc040a918 in start_kernel () at init/main.c:520
=> Here get_vm_area_caller() will fail in __arm_ioremap_pfn_caller().
^ permalink raw reply [flat|nested] 5+ messages in thread
* ARM, earlyconsole and io mapping
2015-03-30 12:05 ARM, earlyconsole and io mapping Robert Jarzmik
@ 2015-03-30 12:11 ` Thomas Petazzoni
2015-03-30 13:25 ` Robert Jarzmik
2015-03-30 23:31 ` Peter Hurley
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2015-03-30 12:11 UTC (permalink / raw)
To: linux-arm-kernel
Dear Robert Jarzmik,
On Mon, 30 Mar 2015 14:05:33 +0200, Robert Jarzmik wrote:
> I was wondering how the earlyconsole was supposed to work in order to add
> support to the pxa architecture. More specifically, I don't understand how the
> memory mapping is supposed to be available at the early parameters parsing.
>
> The thing I don't understand is that :
> - in kernel initialization, parse_early_param() is called before
> machine_desc->map_io()
> - as a consequence, the architecture didn't add the vm early mapping for serial
> peripheral (which is added in pxa_map_io())
> - as a consequence, earlycon_map() will fail to map the serial MMIO
> (as in stack showed in [1])
>
> Therefore, are there non-DT earlycon users on the list, and could they tell me
> what way they get earlycon support in their arm boards please ?
A very early mapping of the I/O space is done in head.S, way before you
get into C code:
http://lxr.free-electrons.com/source/arch/arm/kernel/head.S#L277
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* ARM, earlyconsole and io mapping
2015-03-30 12:11 ` Thomas Petazzoni
@ 2015-03-30 13:25 ` Robert Jarzmik
0 siblings, 0 replies; 5+ messages in thread
From: Robert Jarzmik @ 2015-03-30 13:25 UTC (permalink / raw)
To: linux-arm-kernel
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> Dear Robert Jarzmik,
>
> On Mon, 30 Mar 2015 14:05:33 +0200, Robert Jarzmik wrote:
> A very early mapping of the I/O space is done in head.S, way before you
> get into C code:
>
> http://lxr.free-electrons.com/source/arch/arm/kernel/head.S#L277
That's DEBUG_LL, right ? If that's what you mean, then I already have DEBUG_LL,
but that doesn't answer my question, as DEBUG_LL stops spitting logs after the
decompressor, and the errors I want to trap are between end of decompressor and
drivers probe.
And my question about earlycon remains, DEBUG_LL is not earlycon.
Cheers.
--
Robert
^ permalink raw reply [flat|nested] 5+ messages in thread
* ARM, earlyconsole and io mapping
2015-03-30 12:05 ARM, earlyconsole and io mapping Robert Jarzmik
2015-03-30 12:11 ` Thomas Petazzoni
@ 2015-03-30 23:31 ` Peter Hurley
2015-03-31 9:11 ` Robert Jarzmik
1 sibling, 1 reply; 5+ messages in thread
From: Peter Hurley @ 2015-03-30 23:31 UTC (permalink / raw)
To: linux-arm-kernel
Hi Robert,
On 03/30/2015 08:05 AM, Robert Jarzmik wrote:
> Hi,
>
> I was wondering how the earlyconsole was supposed to work in order to add
> support to the pxa architecture. More specifically, I don't understand how the
> memory mapping is supposed to be available at the early parameters parsing.
>
> The thing I don't understand is that :
> - in kernel initialization, parse_early_param() is called before
> machine_desc->map_io()
> - as a consequence, the architecture didn't add the vm early mapping for serial
> peripheral (which is added in pxa_map_io())
> - as a consequence, earlycon_map() will fail to map the serial MMIO
> (as in stack showed in [1])
>
> Therefore, are there non-DT earlycon users on the list, and could they tell me
> what way they get earlycon support in their arm boards please ?
Fixmap support has not been upstreamed yet, but if you're desperate, here's
the latest patch version:
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/318372.html
If you're using /chosen/stdout-path, earlycon gets turned off at dummy
VT console load, so for right now, specify your earlycon and consoles on the
command line.
Regards,
Peter Hurley
^ permalink raw reply [flat|nested] 5+ messages in thread
* ARM, earlyconsole and io mapping
2015-03-30 23:31 ` Peter Hurley
@ 2015-03-31 9:11 ` Robert Jarzmik
0 siblings, 0 replies; 5+ messages in thread
From: Robert Jarzmik @ 2015-03-31 9:11 UTC (permalink / raw)
To: linux-arm-kernel
Peter Hurley <peter@hurleysoftware.com> writes:
> Hi Robert,
>
> On 03/30/2015 08:05 AM, Robert Jarzmik wrote:
>> Hi,
>>
>> I was wondering how the earlyconsole was supposed to work in order to add
>> support to the pxa architecture. More specifically, I don't understand how the
>> memory mapping is supposed to be available at the early parameters parsing.
> Fixmap support has not been upstreamed yet, but if you're desperate, here's
> the latest patch version:
> http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/318372.html
Ah I'm not desperate, that would be nice to have tool on my automation
platform. I've gone the DEBUG_LL + JTAG/__log_buf memory dump so far.
And yet I remember viewing early concole patches a few monthes back, and I
wondered how the authors could make them work ... And as my memory didn't serve
me well, I couldn't remember your name.
> If you're using /chosen/stdout-path, earlycon gets turned off at dummy
> VT console load, so for right now, specify your earlycon and consoles on the
> command line.
Ah I'm using device-tree in only 1/3rd of the PXA tests :
- 1/3rd for legacy platform_data tests
- 1/3rd for device-tree pxa platforms
- 1/3rd for multiplatform kernel
Anyway, I hope you'll have Russell's comments addressed, and that your patch
will make it upstream. Thanks for the information, it is exactly what I was
asking for.
Cheers.
--
Robert
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-03-31 9:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-30 12:05 ARM, earlyconsole and io mapping Robert Jarzmik
2015-03-30 12:11 ` Thomas Petazzoni
2015-03-30 13:25 ` Robert Jarzmik
2015-03-30 23:31 ` Peter Hurley
2015-03-31 9:11 ` Robert Jarzmik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).