[PATCH kernel] RFC: prom_init: Fetch flatten device tree from the system firmware

Alexey Kardashevskiy aik at ozlabs.ru
Mon Oct 16 22:08:02 AEDT 2017


On 16/10/17 21:20, Segher Boessenkool wrote:
> 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. 

Sure, that is what my proposed fdt-boot-cpu  does already.

> Most (if not all) references
> in /chosen are.





-- 
Alexey


More information about the Linuxppc-dev mailing list