On Tue, 13 May 2025, at 22:00, BALATON Zoltan wrote:
> On Tue, 13 May 2025, Alexey Kardashevskiy wrote:
> > On Wed, 30 Apr 2025, at 21:21, BALATON Zoltan wrote:
> >> On Wed, 23 Apr 2025, BALATON Zoltan wrote:
> >>> The FDT does not normally store name properties but reconstructs it
> >>> from path but Open Firmware specification says each node should at
> >>> least have this property. This is correctly handled in getprop but
> >>> nextprop should also return it even if not present as a property.
> >>>
> >>> Explicit name properties are still allowed because they are needed
> >>> e.g. on the root node that guests expect to have specific names as
> >>> seen on real machines instead of being empty so sometimes the node
> >>> name may need to be overriden. For example on pegasos MorphOS checks
> >>> the name of "/" and expects to find bplan,Pegasos2 which is how it
> >>> identifies the machine.
> >>>
> >>> Signed-off-by: BALATON Zoltan <bala...@eik.bme.hu>
> >>> ---
> >>> v3:
> >>> Keep phandle properties
> >>> Changed commit message
> >>
> >> Ping?
> >>
> >
> > sorry for the delay, looks okay to me but (probably was answered but I
> > forgot because I am slow) I still do not understand what is adding the
> > explicit property called "name" so vof_nextprop() needs to check if it
> > is the actual property. Thanks,
>
> Look at this series where this is used (I also included this patch there
> as patch 2 which is identical to this v3 standalone patch):
>
> https://patchew.org/QEMU/cover.1746139668.git.bala...@eik.bme.hu/
>
> This patch allows removing explicit name properties in patch 3 and move
> the static parts into a dtb file in patch 4. Dtb does not allow to set
> name property and will use the path name for it but e.g. the root of the
> device tree on some machines must have a specific name. On Apple it's
> called device-tree and on pegasos it's bPlan,Pegasos and some guests (e.g.
> MorphOS) checks this to detect what machine they run on so will fail it we
> return / or no name for the name of the root node. Therefore in patch 4 I
> still have a
>
> qemu_fdt_setprop_string(fdt, "/", "name", "bplan,Pegasos2");
>
> to make this work, and for some nodes it may still be needed although for
> most the path name from dtb will be correct so no need to add a name
> property for those. But becuase of these nodes that need a name different
> from their path we still need to allow explicit name properties.
Well I guess that ok then.
Reviewed-by: Alexey Kardashevskiy <a...@ozlabs.ru>
>
> Regards,
> BALATON Zoltan
>