lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <470BC0D5.70305@freescale.com>
Date:	Tue, 09 Oct 2007 12:56:37 -0500
From:	Timur Tabi <timur@...escale.com>
To:	Lennart Sorensen <lsorense@...lub.uwaterloo.ca>
CC:	Anton Altaparmakov <aia21@....ac.uk>,
	Jan Engelhardt <jengelh@...putergmbh.de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: __LITTLE_ENDIAN vs. __LITTLE_ENDIAN_BITFIELD

Lennart Sorensen wrote:

>> You're talking about byte endian.  I'm talking about bit endian -- the 
>> order of bits within a byte.  Software cannot know what the bit endian is, 
>> but external devices that have memory-mapped registers can know.
> 
> The guy wiring up the hardware should connect the wires correctly.

I'm sure they're correct, my problem is that how can my driver know what they are?

> Doesn't the bus usually have some definition of bit order which the
> device would have to adhere to?  After all there must be address lines
> somewhere.

I was hoping that there would be some compile-time constant I could check that 
would give me this information.

> Does this perhaps offer anything useful?
> http://www.linuxjournal.com/article/6788

Yeah, I read that article some time ago when trying to diagnose the problem I 
was seeing.  It does explain the point I'm trying to make.  We have a device 
that's used on two product lines: one ARM-based, and one PowerPC.  The ARM is 
little-endian, and the PowerPC is big-endian.  The device can support 
little-endian or big-endian data, as long as the bit-order matches the byte-order.

For now, I'm going to have to assume that they do match.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ