Of the device tree binary format endianness on little-endianplatform

Yoder Stuart-B08248 stuart.yoder at freescale.com
Thu Feb 19 06:28:33 EST 2009


 

> -----Original Message-----
> From: 
> devicetree-discuss-bounces+stuart.yoder=freescale.com at ozlabs.o
> rg 
> [mailto:devicetree-discuss-bounces+stuart.yoder=freescale.com@
ozlabs.org] On Behalf Of Mitch Bradley
> Sent: Wednesday, February 18, 2009 11:10 AM
> To: Laurent Gregoire
> Cc: devicetree-discuss at ozlabs.org
> Subject: Re: Of the device tree binary format endianness on 
> little-endianplatform
> 
> >
> > Hi,
> >
> > We are currently investigating the use of a flattened 
> device-tree for
> > configuring some boot parameters on a new ARM platform. ARM being
> > little-endian, the first question that arise is whether we 
> should keep
> > the .dtb binary format itself big-endian or switch to little-endian?
> > Apparently the format does not specify endianness 
> specifically, and I
> > did not found any relevant information concerning this.
> >   
> 
> 
> I can't speak for flattened device trees specifically, but IEEE1275 
> (Open Firmware) specifies that integers are encoded in 
> property values 
> in big-endian byte order.  The model is 
> serialization/deserialization, 
> rather than overlaying a C struct on top of the data.
> 
> > Perhaps this has already been decided somewhere on the 
> roadmap of using
> > device-tree outside the PPC-world.

Please take a look at the ePAPR where the flattened 
device tree format is formally speced out.

http://www.power.org/resources/downloads/Power_ePAPR_APPROVED_v1.0.pdf

Integers in property values and in the DTB structure
are all big-endian.

Stuart



More information about the devicetree-discuss mailing list