[RFC] Flat Device Tree Spec

Michael Ellerman michael at ellerman.id.au
Tue Aug 16 17:44:03 EST 2005


Hi guys,

The latest device tree spec (1) says that the header, reserve map, flat tree 
and strings should be contiguous in memory (2), although it does mention that 
the order is not important.

From looking at the unflattening code though, the requirements are actually 
not so strict. AFAICT there's no reason the pieces (3) need to be contiguous 
at all, as long as the header is first and the offsets to the pieces fit in a 
u32.

Is there any reason why the spec needs to be so strict?

If we added a size_reserve_map and size_dt_struct, to match size_dt_strings, 
we'd have enough information to not care whether the pieces were contiguous 
or not.

The reason I'm interested is that I've changed the iSeries code to put all 
property strings in a special linker section. We then simply copy that 
section into the flat device tree. If the pieces didn't have to be contiguous 
then we could just point the off_dt_strings at the actual linker section, and 
not need to do a copy at all.

cheers

1: http://ozlabs.org/pipermail/linuxppc64-dev/2005-June/004221.html
2: See ASCII art at end of section # 1.
3: ie. the reserve map, flat tree and strings blob.

-- 
Michael Ellerman
IBM OzLabs

email: michael:ellerman.id.au
inmsg: mpe:jabber.org
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050816/05284b32/attachment.pgp 


More information about the Linuxppc64-dev mailing list