From: Wolfgang Denk Date: Thu, 02 Dec 2004 14:16:01 +0100 Subject: [U-Boot-Users] byte-order in the u-boot .c files In-Reply-To: Your message of "Thu, 02 Dec 2004 13:59:40 +0100." <41AF11BC.6050403@web.de> Message-ID: <20041202131606.3A5D0C1430@atlas.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message <41AF11BC.6050403@web.de> you wrote: > > Now the problem is that I'm not sure if the bit order of the > documentation and the bit-order of the hex-values in the C-Code are The PowerPC documentation lists bit 0 as MSB. For a 32 bit value, bit 31 is the LSB. > It seems like not to know this is incredibly stupid as I couldn't find > anything about byte order in the README or the u-boot manual. > > Anyway, if anyone could please tell me something about the byte-order of > the u-boot code and how it relates to MPC-manual-byte-order, I'd be very > happy. Now _BYTE_order is something completely different. For your question it does not matter at all [FYI: U-Boot is (except for eventually remaining bugs) byteorder-independent]. The bit order doesn't matter, either. Just write down the constants as listed in the manual - MSB as MSB down to LSB as LSB ;-) Best regards, Wolfgang Denk -- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Brain fried - Core dumped