The only difference is below, and Tim Fletcher's is the larger one $ diff *.dts 587a588 > ts-attached = <0x0>; Seem the problem is that there is no enough reserved space to add the required nodes.
After some investigation, I've found a bug in the u-boot's PSCI code. Since this feature is introduced by Marc Zyngier, I add him to the cc list. Currently, PSCI's fdt node is added in bootm's go subcommand by armv7_update_dt, but I think the proper place is the prep command. There are 2 reasons for my proposed change. 1. It is not compatible with falcon's spl command, which expect everything is ready at prep stage, this may be not a big issue, because falcon boot mode is not enabled on sunxi7i boards, and the PSCI patch currently does not take falcon mode into consideration anyway. 2. It cannot reliably add the nodes as in Tim Fletcher's case. Currently, u-boot basically does these things to setup fdt: boot_relocate_fdt reserves CONFIG_SYS_FDT_PAD extra bytes, which should be enough for all fdt changes. image_setup_libfdt do the necessary changes, and call fdt_resize to shrink to its actual size plus some bytes for its internal use, plus paddings to page boundary. Then armv7_update_dt calls fdt_resize again (??), add add PSCI nodes to the tree. That means armv7_update_dt works by chance: if there is not enough padding, it will fail. I think armv7_update_dt should be invoked in image_setup_libfdt. There are already some arch/board specific hooks in it, namely arch_fixup_memory_node and ft_board_setup, maybe we can add another one, or just use one of them. And the fdt_resize call in armv7_update_dt should be removed. > -----Original Message----- > From: [email protected] [mailto:linux- > [email protected]] On Behalf Of Hans de Goede > Sent: Wednesday, January 1, 2014 12:26 AM > To: [email protected] > Subject: Re: [linux-sunxi] Re: New sunxi-next tree with usb (ehci only), hs > timers, and other stuff. > > Hi, > > On 12/31/2013 05:13 PM, Tim Fletcher wrote: > > <snip> > > >>> Gives the same problem, the second cpu fails to boot with error -38 > >>> > >>> Can you upload your kernel and dtb images and I'll try and boot them > >>> to cut out me doing something wrong compiling? > >> > >> I've put them both here: > >> http://people.fedoraproject.org/~jwrdegoede/sunxi-kernel/ > >> > >> I've also added an u-boot binary for the cubietruck, to apply use: > >> > >> sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdc bs=1024 seek=8 > > > > That works and boots with both CPU working. > > > > Your dtb has a different sha1sum to both the working and none working > ones that I have. > > That is likely because of this commit: > https://github.com/linux-sunxi/linux- > sunxi/commit/683b357379fd5d69048fe63dfcb470b47be48f74 > > > If I boot the kernel I have built with your dtb file than I get both CPUs > working. > > > > If I boot the kernel and dtb I have built from git then I only get 1 cpu so it's > not a u-boot issue. > > > > I've uploaded my .config and dtb file here: > > http://co-lo.night-shade.org.uk/~tim/cubietruck/ > > I've just pushed my latest work to: > https://github.com/linux-sunxi/linux-sunxi/commits/sunxi-devel > > Which I'm currently maintaining and is the tree to use if you want to follow > upstream sunxi development. > > Try comparing the sun7i-a20.dtsi and sun7i-a20-cubietruck.dts files there > with the ones you're using. Maybe there is some other change there too, or > maybe somehow just having something extra in the dtb (making it larger) > mysteriously fixes things ? > > Regards, > > Hans > > p.s. > > I'm going AFK till 2014, see you then, and happy new year. > > -- > You received this message because you are subscribed to the Google Groups > "linux-sunxi" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
