Re: dtc: Address an assortment of portability problems
From: David Gibson <hidden>
Date: 2008-06-28 00:15:48
On Fri, Jun 27, 2008 at 09:53:03AM -0500, Scott Wood wrote:
David Gibson wrote:quoted
On Thu, Jun 26, 2008 at 10:25:28AM -0500, Scott Wood wrote:quoted
On Thu, Jun 26, 2008 at 11:03:49AM +1000, David Gibson wrote:quoted
- the endian handling functions in libfdt_env.h, based on endian.h and byteswap.h are replaced with some portable open-coded versions. Unfortunately, these result in fairly crappy code when compiled, but as far as I can determine there doesn't seem to be any POSIX, SUS or de facto standard way of determining endianness at compile time, nor standard names for byteswapping functions.Since device-tree and network byte order happen to be the same, we could use ntohl/htonl.Not for the 64-bit version.Why? They operate on uint32_t despite the "l" in the name, and there are no 64-bit fields in the device tree...
Yes there are. The memory reservations. We have and need fdt64_to_cpu(). -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson