Skip to contentSkip to conversation

rockchip breakage with "spl: Remove overwrite of relocated malloc limit"

U-Boot Heiko Stübner 3 participants 5 messages Mar 7, 2017

lore
Share & tools
lore
#0 lore raw

Hi,

I just realized patch b3d2861eb20a ("spl: Remove overwrite of relocated malloc limit") introduces breakage in my rk3188 uboot code (and should most likely also affect the very similar other rockchip spl boards).

The boards call spl_init in their board_init_f functions because they need the spl infrastructure to find and bringup the devicetree stuff and things like pinctrl and ram.

With the recent change mentioned above, spl_init fails with

	spl_init() failed: -12
because
	dm_init_and_scan() returned error -12
because
	dm_init() failed: -12

...
because
Missing uclass for driver root_driver
because
uclass_add calls calloc, which fails with the -ENOMEM (-12)

I still lack uboot experience to see the correct way forward. Reverting that patch of course makes my board start uboot again [and most likely the other Rockchip SPLs as well], but there is possibly some better solution [Or there is simply something very wrong with my rk3188 stuff :-) ].

Heiko

#1 lore raw

Hi Heiko,

That patch break all the Rockchip SoCs SPL which using spl_init().

Eddie send one patch for rk3288 by add a spl_early_init(), which is under review, I also look forward for better solution.

Thanks,
- Kever

Quoted 33 lines · Heiko Stübner

Hi,

I just realized patch b3d2861eb20a ("spl: Remove overwrite of relocated malloc limit") introduces breakage in my rk3188 uboot code (and should most likely also affect the very similar other rockchip spl boards).

The boards call spl_init in their board_init_f functions because they need the spl infrastructure to find and bringup the devicetree stuff and things like pinctrl and ram.

With the recent change mentioned above, spl_init fails with

	spl_init() failed: -12
because
	dm_init_and_scan() returned error -12
because
	dm_init() failed: -12

...
because
Missing uclass for driver root_driver
because
uclass_add calls calloc, which fails with the -ENOMEM (-12)

I still lack uboot experience to see the correct way forward. Reverting that patch of course makes my board start uboot again [and most likely the other Rockchip SPLs as well], but there is possibly some better solution [Or there is simply something very wrong with my rk3188 stuff :-) ].

Heiko
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

#2 lore raw

Hi,

Quoted 6 lines · Kever Yang

Hi Heiko,

That patch break all the Rockchip SoCs SPL which using spl_init().

Eddie send one patch for rk3288 by add a spl_early_init(), which is under review, I also look forward for better solution.

Is this a problem for the upcoming release? I have not seen the breakage on firefly (although I found a few other problems) so did not think it needed to be resolved right away.

Regards,
Simon

Quoted 48 lines

Thanks,
- Kever

Quoted 40 lines · Heiko Stübner

Hi,

I just realized patch b3d2861eb20a ("spl: Remove overwrite of relocated malloc
limit") introduces breakage in my rk3188 uboot code (and should most likely
also affect the very similar other rockchip spl boards).

The boards call spl_init in their board_init_f functions because they need the
spl infrastructure to find and bringup the devicetree stuff and things like
pinctrl and ram.

With the recent change mentioned above, spl_init fails with

        spl_init() failed: -12
because
        dm_init_and_scan() returned error -12
because
        dm_init() failed: -12

...
because
Missing uclass for driver root_driver
because
uclass_add calls calloc, which fails with the -ENOMEM (-12)

I still lack uboot experience to see the correct way forward. Reverting that
patch of course makes my board start uboot again [and most likely the other
Rockchip SPLs as well], but there is possibly some better solution [Or there is simply something very wrong with my rk3188 stuff :-) ].

Heiko
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

#3 lore raw

Am Dienstag, 7. März 2017, 10:01:02 CET schrieb Simon Glass:

Quoted 5 lines

Hi,

Quoted 2 lines · Kever Yang

Hi Heiko,

Quoted 8 lines
Quoted 4 lines

That patch break all the Rockchip SoCs SPL which using spl_init().

Eddie send one patch for rk3288 by add a spl_early_init(), which is under review, I also look forward for better solution.

Is this a problem for the upcoming release? I have not seen the breakage on firefly (although I found a few other problems) so did not think it needed to be resolved right away.

not for the rk3188 - as it is not part of a release yet, but if you look at Eddie's patches, it seems like it of course affects rk3288.

Although I'd think there must be a nicer way than duplicating spl_init to fix that issue :-) .

Heiko

Quoted 50 lines
Quoted 50 lines · Heiko Stübner
Quoted 49 lines

Hi,

I just realized patch b3d2861eb20a ("spl: Remove overwrite of relocated malloc
limit") introduces breakage in my rk3188 uboot code (and should most likely
also affect the very similar other rockchip spl boards).

The boards call spl_init in their board_init_f functions because they need
the
spl infrastructure to find and bringup the devicetree stuff and things like
pinctrl and ram.

With the recent change mentioned above, spl_init fails with

        spl_init() failed: -12

because

dm_init_and_scan() returned error -12

because

        dm_init() failed: -12

...
because

Missing uclass for driver root_driver

because

uclass_add calls calloc, which fails with the -ENOMEM (-12)

I still lack uboot experience to see the correct way forward. Reverting that
patch of course makes my board start uboot again [and most likely the other
Rockchip SPLs as well], but there is possibly some better solution [Or there is simply something very wrong with my rk3188 stuff :-) ].

Heiko
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

#4 lore raw

Hi,

Quoted 16 lines · Heiko Stübner

Am Dienstag, 7. März 2017, 10:01:02 CET schrieb Simon Glass:

Quoted 5 lines

Hi,

Quoted 2 lines · Kever Yang

Hi Heiko,

Quoted 8 lines
Quoted 4 lines

That patch break all the Rockchip SoCs SPL which using spl_init().

Eddie send one patch for rk3288 by add a spl_early_init(), which is under review, I also look forward for better solution.

Is this a problem for the upcoming release? I have not seen the breakage on firefly (although I found a few other problems) so did not think it needed to be resolved right away.

Quoted 5 lines

not for the rk3188 - as it is not part of a release yet, but if you look at Eddie's patches, it seems like it of course affects rk3288.

Although I'd think there must be a nicer way than duplicating spl_init to fix that issue :-) .

I think it makes sense, although the core code can go in a common function. I'm hoping to look at it this week.

For me, rk3288 fails for a few reasons, and I didn't see this as a primary one. I'll take another look.

Regards,
Simon

Quoted 56 lines

Heiko

Quoted 50 lines
Quoted 50 lines · Heiko Stübner
Quoted 49 lines

Hi,

I just realized patch b3d2861eb20a ("spl: Remove overwrite of relocated malloc
limit") introduces breakage in my rk3188 uboot code (and should most likely
also affect the very similar other rockchip spl boards).

The boards call spl_init in their board_init_f functions because they need
the
spl infrastructure to find and bringup the devicetree stuff and things like
pinctrl and ram.

With the recent change mentioned above, spl_init fails with

        spl_init() failed: -12

because

dm_init_and_scan() returned error -12

because

        dm_init() failed: -12

...
because

Missing uclass for driver root_driver

because

uclass_add calls calloc, which fails with the -ENOMEM (-12)

I still lack uboot experience to see the correct way forward. Reverting that
patch of course makes my board start uboot again [and most likely the other
Rockchip SPLs as well], but there is possibly some better solution [Or there is simply something very wrong with my rk3188 stuff :-) ].

Heiko
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot