On 18 January 2012 14:35, Mark Langsdorf <mark.langsd...@calxeda.com> wrote: > I can set the smp_loader code so that I can boot 2 cpus > and verify their existence in /proc/cpuinfo, but I can't > get 3 cpus to boot at all, no matter how I hack the existing > arm_boot code.
Right, multiple secondary cores requires multiple addresses to be polled which we don't support in arm_boot.c at the moment. > Is there a good example of how to write secondary smp boot > code other than arm_boot.c? Should I just expect to pull > most of arm_boot.c into highbank and adjust from there? I > don't want to duplicate code like that, but I need more > flexibility than I can easily add to arm_boot.c. Nope, I'm afraid you're the first one to run into this. arm_boot.c started off as just implementing the realview secondary boot protocol, and exynos4 and vexpress have been close enough to piggyback on it. So highbank is the first board that's different enough to need its own code. A big chunk of arm_boot.c is the primary CPU boot code, which should be standard for all arm platforms, so that shouldn't need to change. So we just need a reasonably clean solution for a platform to provide its own secondary boot code. I'm vaguely thinking about providing a hook function for 'write secondary boot code' and one for 'post-cpu-reset hook for secondary cpus', which would go in the "if (info->nb_cpus > 1) {...}" condition in arm_load_kernel() and in the else-clause of "if (env == first_cpu) in do_cpu_reset(). Can you try something along those lines? thanks -- PMM