[SLOF] [Qemu-ppc] [PATCH v4] board-qemu: add private hcall to inform host on "phandle" update

Segher Boessenkool segher at kernel.crashing.org
Mon Oct 2 07:37:07 AEDT 2017


On Sat, Sep 30, 2017 at 01:17:55PM +1000, David Gibson wrote:
> On Fri, Sep 29, 2017 at 03:18:41AM -0500, Segher Boessenkool wrote:
> > I'm a bit worried about the phandles FDT requires, which are a different
> > size than what OF uses (OF uses cell size, which is 64 bit on 64-bit OF;
> > the device tree specification uses 32 bit always).
> 
> Um.  Wat.
> 
> Maybe this was theoretically possible at some point.  Maybe there's
> just never been a 64-bit OF in this sense.  But in practice phandles
> (and all cells) have been always 32-bit for a very, very long time.

All cells (and all phandles) are 64 bits on a 64-bit OF.  This is what
a 64-bit OF _is_, fundamentally: it uses 64-bit cells.  Cells are the
fundamental data type: for example stack entries are cells.

The things in the device tree are 32 bits.  A few places in the Open
Firmware specification unfortunately call those "cells" as well.

With the status quo (32-bit phandles in the device tree, so the client
uses 32-bit phandles as well) we can still use phandles with a non-zero
upper 32 bits in OF, using one of various translation schemes.  I was
worried that the translation via FDT would prevent that, force OF to
always use only memory in the low 4GB.  I now think that not much changes,
and in practice we will always use low 4GB addresses for OF's memory
anyway.  The recommendation in 1275.6 (the 64-bit extension) is similar.


Segher


More information about the SLOF mailing list