On Mon, Oct 16, 2017 at 06:07:06PM +1100, Alexey Kardashevskiy wrote: > On 16/10/17 17:46, David Gibson wrote:
> >>>> + /* Fixup the boot cpuid */ > >>>> + hdr->boot_cpuid_phys = cpu_to_be32(prom.cpu); > >>> > >>> If SLOF is generating a tree it really should get this header field > >>> right as well. > >> > >> > >> Ah, I did not realize it is just a phandle from /chosen/cpu. Will > >> fix. > > > > It's not a phandle. It's just the "address" (i.e. reg value) of the > > boot cpu. > > Well, it is "reg" of a CPU with phandle==/chosen/cpu so my fdt code needs > to look there to pick the right "reg" rather than just plain 0. I'll fix > this but in general can it possibly be not a zero in QEMU/SLOF? /chosen/cpu is an ihandle, not a phandle. Most (if not all) references in /chosen are. Segher