* [U-Boot] i.MX6: Prealloc pinctrl make U-Boot hang at relocation (data abort)
@ 2017-10-16 22:44 Jagan Teki
2017-10-16 22:53 ` Jagan Teki
2017-10-23 6:55 ` Lokesh Vutla
0 siblings, 2 replies; 4+ messages in thread
From: Jagan Teki @ 2017-10-16 22:44 UTC (permalink / raw)
To: u-boot
Hi,
I'm trying to use SPL_OF_CONTROL with u-boot,dm-spl So I've marked
u-boot,dm-spl with pinctrl since MMC used the pinconfig.
The issue observed here is SPL handover to U-Boot proper and before
relocation U-Boot probed imx_thermal dm-driver through device_probe.
But the same time device_probe unnecessary probing all u-boot,dm-spl
marked nodes(which are strictly related for SPL) Since pinctrl marked
as u-boot, dm-spl the same probed and this might be the show-stopper.
Based on the data abort, the code hang at relocation code, relocate.S,
eventually stop calling uclass_get_device( was called in
arch/arm/mach-imx/cpu.c) during board_f or unmark u-boot,dm-spl make
U-Boot boots.
Below are relocation code hang point and Log dump, request for any inputs.
Relocation code:
----------------------
/* relative fix: increase location by offset */
add r0, r0, r4
87800ac4: e0800004 add r0, r0, r4
ldr r1, [r0]
87800ac8: e5901000 ldr r1, [r0] /* HANG */
add r1, r1, r4
87800acc: e0811004 add r1, r1, r4
str r1, [r0]
87800ad0: e5801000 str r1, [r0]
87800ad4 <fixnext>:
Log:
-----
U-Boot SPL 2017.11-rc1-00165-g7340683-dirty (Oct 17 2017 - 04:00:01)
Trying to boot from MMC1
device_probe: Process pinctrl for soc
device_probe: Process pinctrl for aips-bus at 02000000
initialized IMX pinctrl driver
device_probe: Process pinctrl for aips-bus at 02100000
device_probe: Process pinctrl for usdhc at 02190000
device_probe: Process pinctrl for usdhc1grp
device_probe: Process pinctrl for gpio at 0209c000
Expected Linux image is not found. Trying to start U-boot
U-Boot 2017.11-rc1-00165-g7340683-dirty (Oct 17 2017 - 04:00:01 +0530)
U-Boot code: 87800000 -> 8783FB38 BSS: -> 87857338
CPU: Freescale i.MX6UL rev1.1 528 MHz (running at 396 MHz)
CPU: Industrial temperature grade (-40C to 105C)
device_probe: Process pinctrl for imx_thermal
device_probe: Process pinctrl for soc
device_probe: Process pinctrl for aips-bus at 02000000
initialized IMX pinctrl driver
at 31C
Reset cause: POR
Model: Engicam Is.IoT MX6UL MMC Starterkit
DRAM: Monitor len: 00057338
Ram size: 08000000
Ram top: 88000000
TLB table from 87ff0000 to 87ff4000
Reserving 348k for U-Boot at: 87f98000
Reserving 16384k for malloc() at: 86f98000
Reserving 80 Bytes for Board Info at: 86f97fb0
Reserving 240 Bytes for Global Data at: 86f97ec0
Reserving 24448 Bytes for FDT at: 86f91f40
RAM Configuration:
Bank #0: 80000000
DRAM: 128 MiB
New Stack Pointer is: 86f91f20
Relocation Offset is: 00798000
Relocating to 87f98000, new gd at 86f97ec0, sp at 86f91f20
data abort
pc : [<87800ac8>] lr : [<87f986ac>]
sp : 86f91f20 ip : 0000001c fp : 00000017
r10: 8783fa98 r9 : 86f97ec0 r8 : 00913b18
r7 : deadbeef r6 : 0091de88 r5 : 87800320 r4 : 00798000
r3 : 87848848 r2 : 87843820 r1 : 00000017 r0 : 02878000
Flags: nZCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...
resetting ...
thanks!
--
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] i.MX6: Prealloc pinctrl make U-Boot hang at relocation (data abort)
2017-10-16 22:44 [U-Boot] i.MX6: Prealloc pinctrl make U-Boot hang at relocation (data abort) Jagan Teki
@ 2017-10-16 22:53 ` Jagan Teki
2017-10-22 14:34 ` Simon Glass
2017-10-23 6:55 ` Lokesh Vutla
1 sibling, 1 reply; 4+ messages in thread
From: Jagan Teki @ 2017-10-16 22:53 UTC (permalink / raw)
To: u-boot
+ Tom
On 17-Oct-2017 12:44 AM, "Jagan Teki" <jagannadh.teki@gmail.com> wrote:
Hi,
I'm trying to use SPL_OF_CONTROL with u-boot,dm-spl So I've marked
u-boot,dm-spl with pinctrl since MMC used the pinconfig.
The issue observed here is SPL handover to U-Boot proper and before
relocation U-Boot probed imx_thermal dm-driver through device_probe.
But the same time device_probe unnecessary probing all u-boot,dm-spl
marked nodes(which are strictly related for SPL) Since pinctrl marked
as u-boot, dm-spl the same probed and this might be the show-stopper.
Based on the data abort, the code hang at relocation code, relocate.S,
eventually stop calling uclass_get_device( was called in
arch/arm/mach-imx/cpu.c) during board_f or unmark u-boot,dm-spl make
U-Boot boots.
Below are relocation code hang point and Log dump, request for any inputs.
Relocation code:
----------------------
/* relative fix: increase location by offset */
add r0, r0, r4
87800ac4: e0800004 add r0, r0, r4
ldr r1, [r0]
87800ac8: e5901000 ldr r1, [r0] /* HANG */
add r1, r1, r4
87800acc: e0811004 add r1, r1, r4
str r1, [r0]
87800ad0: e5801000 str r1, [r0]
87800ad4 <fixnext>:
Log:
-----
U-Boot SPL 2017.11-rc1-00165-g7340683-dirty (Oct 17 2017 - 04:00:01)
Trying to boot from MMC1
device_probe: Process pinctrl for soc
device_probe: Process pinctrl for aips-bus at 02000000
initialized IMX pinctrl driver
device_probe: Process pinctrl for aips-bus at 02100000
device_probe: Process pinctrl for usdhc at 02190000
device_probe: Process pinctrl for usdhc1grp
device_probe: Process pinctrl for gpio at 0209c000
Expected Linux image is not found. Trying to start U-boot
U-Boot 2017.11-rc1-00165-g7340683-dirty (Oct 17 2017 - 04:00:01 +0530)
U-Boot code: 87800000 -> 8783FB38 BSS: -> 87857338
CPU: Freescale i.MX6UL rev1.1 528 MHz (running at 396 MHz)
CPU: Industrial temperature grade (-40C to 105C)
device_probe: Process pinctrl for imx_thermal
device_probe: Process pinctrl for soc
device_probe: Process pinctrl for aips-bus at 02000000
initialized IMX pinctrl driver
at 31C
Reset cause: POR
Model: Engicam Is.IoT MX6UL MMC Starterkit
DRAM: Monitor len: 00057338
Ram size: 08000000
Ram top: 88000000
TLB table from 87ff0000 to 87ff4000
Reserving 348k for U-Boot at: 87f98000
Reserving 16384k for malloc() at: 86f98000
Reserving 80 Bytes for Board Info at: 86f97fb0
Reserving 240 Bytes for Global Data at: 86f97ec0
Reserving 24448 Bytes for FDT at: 86f91f40
RAM Configuration:
Bank #0: 80000000
DRAM: 128 MiB
New Stack Pointer is: 86f91f20
Relocation Offset is: 00798000
Relocating to 87f98000, new gd at 86f97ec0, sp at 86f91f20
data abort
pc : [<87800ac8>] lr : [<87f986ac>]
sp : 86f91f20 ip : 0000001c fp : 00000017
r10: 8783fa98 r9 : 86f97ec0 r8 : 00913b18
r7 : deadbeef r6 : 0091de88 r5 : 87800320 r4 : 00798000
r3 : 87848848 r2 : 87843820 r1 : 00000017 r0 : 02878000
Flags: nZCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...
resetting ...
thanks!
--
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] i.MX6: Prealloc pinctrl make U-Boot hang at relocation (data abort)
2017-10-16 22:53 ` Jagan Teki
@ 2017-10-22 14:34 ` Simon Glass
0 siblings, 0 replies; 4+ messages in thread
From: Simon Glass @ 2017-10-22 14:34 UTC (permalink / raw)
To: u-boot
Hi Jagan,
On 17 October 2017 at 00:53, Jagan Teki <jagannadh.teki@gmail.com> wrote:
> + Tom
>
>
> On 17-Oct-2017 12:44 AM, "Jagan Teki" <jagannadh.teki@gmail.com> wrote:
>
> Hi,
>
> I'm trying to use SPL_OF_CONTROL with u-boot,dm-spl So I've marked
> u-boot,dm-spl with pinctrl since MMC used the pinconfig.
>
> The issue observed here is SPL handover to U-Boot proper and before
> relocation U-Boot probed imx_thermal dm-driver through device_probe.
> But the same time device_probe unnecessary probing all u-boot,dm-spl
> marked nodes(which are strictly related for SPL) Since pinctrl marked
> as u-boot, dm-spl the same probed and this might be the show-stopper.
>
> Based on the data abort, the code hang at relocation code, relocate.S,
> eventually stop calling uclass_get_device( was called in
> arch/arm/mach-imx/cpu.c) during board_f or unmark u-boot,dm-spl make
> U-Boot boots.
>
> Below are relocation code hang point and Log dump, request for any inputs.
>
> Relocation code:
> ----------------------
>
> /* relative fix: increase location by offset */
> add r0, r0, r4
> 87800ac4: e0800004 add r0, r0, r4
> ldr r1, [r0]
> 87800ac8: e5901000 ldr r1, [r0] /* HANG */
> add r1, r1, r4
> 87800acc: e0811004 add r1, r1, r4
> str r1, [r0]
> 87800ad0: e5801000 str r1, [r0]
>
> 87800ad4 <fixnext>:
>
> Log:
> -----
> U-Boot SPL 2017.11-rc1-00165-g7340683-dirty (Oct 17 2017 - 04:00:01)
> Trying to boot from MMC1
>
> device_probe: Process pinctrl for soc
>
> device_probe: Process pinctrl for aips-bus at 02000000
> initialized IMX pinctrl driver
>
> device_probe: Process pinctrl for aips-bus at 02100000
>
> device_probe: Process pinctrl for usdhc at 02190000
>
> device_probe: Process pinctrl for usdhc1grp
>
> device_probe: Process pinctrl for gpio at 0209c000
> Expected Linux image is not found. Trying to start U-boot
>
>
> U-Boot 2017.11-rc1-00165-g7340683-dirty (Oct 17 2017 - 04:00:01 +0530)
>
> U-Boot code: 87800000 -> 8783FB38 BSS: -> 87857338
> CPU: Freescale i.MX6UL rev1.1 528 MHz (running at 396 MHz)
> CPU: Industrial temperature grade (-40C to 105C)
> device_probe: Process pinctrl for imx_thermal
>
> device_probe: Process pinctrl for soc
>
> device_probe: Process pinctrl for aips-bus at 02000000
> initialized IMX pinctrl driver
> at 31C
> Reset cause: POR
> Model: Engicam Is.IoT MX6UL MMC Starterkit
> DRAM: Monitor len: 00057338
> Ram size: 08000000
> Ram top: 88000000
> TLB table from 87ff0000 to 87ff4000
> Reserving 348k for U-Boot at: 87f98000
> Reserving 16384k for malloc() at: 86f98000
> Reserving 80 Bytes for Board Info at: 86f97fb0
> Reserving 240 Bytes for Global Data at: 86f97ec0
> Reserving 24448 Bytes for FDT at: 86f91f40
>
> RAM Configuration:
> Bank #0: 80000000
> DRAM: 128 MiB
> New Stack Pointer is: 86f91f20
> Relocation Offset is: 00798000
> Relocating to 87f98000, new gd at 86f97ec0, sp at 86f91f20
> data abort
> pc : [<87800ac8>] lr : [<87f986ac>]
> sp : 86f91f20 ip : 0000001c fp : 00000017
> r10: 8783fa98 r9 : 86f97ec0 r8 : 00913b18
> r7 : deadbeef r6 : 0091de88 r5 : 87800320 r4 : 00798000
> r3 : 87848848 r2 : 87843820 r1 : 00000017 r0 : 02878000
> Flags: nZCv IRQs off FIQs off Mode SVC_32
> Resetting CPU ...
>
> resetting ...
>
> thanks!
> --
> Jagan Teki
> Free Software Engineer | www.openedev.com
> U-Boot, Linux | Upstream Maintainer
> Hyderabad, India.
>
>
I am no sure of the issue, but I suggest debugging it for a root cause.
Regards,
Simon
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] i.MX6: Prealloc pinctrl make U-Boot hang at relocation (data abort)
2017-10-16 22:44 [U-Boot] i.MX6: Prealloc pinctrl make U-Boot hang at relocation (data abort) Jagan Teki
2017-10-16 22:53 ` Jagan Teki
@ 2017-10-23 6:55 ` Lokesh Vutla
1 sibling, 0 replies; 4+ messages in thread
From: Lokesh Vutla @ 2017-10-23 6:55 UTC (permalink / raw)
To: u-boot
+Heiko
On Tuesday 17 October 2017 04:14 AM, Jagan Teki wrote:
> Hi,
>
> I'm trying to use SPL_OF_CONTROL with u-boot,dm-spl So I've marked
> u-boot,dm-spl with pinctrl since MMC used the pinconfig.
>
> The issue observed here is SPL handover to U-Boot proper and before
> relocation U-Boot probed imx_thermal dm-driver through device_probe.
> But the same time device_probe unnecessary probing all u-boot,dm-spl
This statement is not entirely true. device_probe() tries to get pinctrl
for every device. So pinctrl is being probed as part of imx_thermal probe.
> marked nodes(which are strictly related for SPL) Since pinctrl marked
> as u-boot, dm-spl the same probed and this might be the show-stopper.
But then, u-boot,dm-spl marked nodes should not be probed in u-boot
proper. IMHO, this needs to be fixed.
Heiko, what is this expected behavior here?
>
> Based on the data abort, the code hang at relocation code, relocate.S,
> eventually stop calling uclass_get_device( was called in
> arch/arm/mach-imx/cpu.c) during board_f or unmark u-boot,dm-spl make
> U-Boot boots.
So, I looked at drivers/pinctrl/nxp/pinctrl-imx6.c and observed that
there is an uninitialized global variable[1]. Before re location, BSS is
overlapped with DT area. IIUC, your dtb is being corrupted in this case.
Can you try initializing imx6_pinctrl_soc_info with some non-zero values
and see if it helps?
[1]
http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/pinctrl/nxp/pinctrl-imx6.c;h=0f767d90790a0dbeb974029a7d88cac6c03ae23f;hb=HEAD#l14
Thanks and regards,
Lokesh
>
> Below are relocation code hang point and Log dump, request for any inputs.
>
> Relocation code:
> ----------------------
>
> /* relative fix: increase location by offset */
> add r0, r0, r4
> 87800ac4: e0800004 add r0, r0, r4
> ldr r1, [r0]
> 87800ac8: e5901000 ldr r1, [r0] /* HANG */
> add r1, r1, r4
> 87800acc: e0811004 add r1, r1, r4
> str r1, [r0]
> 87800ad0: e5801000 str r1, [r0]
>
> 87800ad4 <fixnext>:
>
> Log:
> -----
> U-Boot SPL 2017.11-rc1-00165-g7340683-dirty (Oct 17 2017 - 04:00:01)
> Trying to boot from MMC1
>
> device_probe: Process pinctrl for soc
>
> device_probe: Process pinctrl for aips-bus at 02000000
> initialized IMX pinctrl driver
>
> device_probe: Process pinctrl for aips-bus at 02100000
>
> device_probe: Process pinctrl for usdhc at 02190000
>
> device_probe: Process pinctrl for usdhc1grp
>
> device_probe: Process pinctrl for gpio at 0209c000
> Expected Linux image is not found. Trying to start U-boot
>
>
> U-Boot 2017.11-rc1-00165-g7340683-dirty (Oct 17 2017 - 04:00:01 +0530)
>
> U-Boot code: 87800000 -> 8783FB38 BSS: -> 87857338
> CPU: Freescale i.MX6UL rev1.1 528 MHz (running at 396 MHz)
> CPU: Industrial temperature grade (-40C to 105C)
> device_probe: Process pinctrl for imx_thermal
>
> device_probe: Process pinctrl for soc
>
> device_probe: Process pinctrl for aips-bus at 02000000
> initialized IMX pinctrl driver
> at 31C
> Reset cause: POR
> Model: Engicam Is.IoT MX6UL MMC Starterkit
> DRAM: Monitor len: 00057338
> Ram size: 08000000
> Ram top: 88000000
> TLB table from 87ff0000 to 87ff4000
> Reserving 348k for U-Boot at: 87f98000
> Reserving 16384k for malloc() at: 86f98000
> Reserving 80 Bytes for Board Info at: 86f97fb0
> Reserving 240 Bytes for Global Data at: 86f97ec0
> Reserving 24448 Bytes for FDT at: 86f91f40
>
> RAM Configuration:
> Bank #0: 80000000
> DRAM: 128 MiB
> New Stack Pointer is: 86f91f20
> Relocation Offset is: 00798000
> Relocating to 87f98000, new gd at 86f97ec0, sp at 86f91f20
> data abort
> pc : [<87800ac8>] lr : [<87f986ac>]
> sp : 86f91f20 ip : 0000001c fp : 00000017
> r10: 8783fa98 r9 : 86f97ec0 r8 : 00913b18
> r7 : deadbeef r6 : 0091de88 r5 : 87800320 r4 : 00798000
> r3 : 87848848 r2 : 87843820 r1 : 00000017 r0 : 02878000
> Flags: nZCv IRQs off FIQs off Mode SVC_32
> Resetting CPU ...
>
> resetting ...
>
> thanks!
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-23 6:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-16 22:44 [U-Boot] i.MX6: Prealloc pinctrl make U-Boot hang at relocation (data abort) Jagan Teki
2017-10-16 22:53 ` Jagan Teki
2017-10-22 14:34 ` Simon Glass
2017-10-23 6:55 ` Lokesh Vutla
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.