How to change endian attribute for a memory region

Allen Curtis acurtis at onz.com
Wed Oct 16 00:35:40 EST 2002


> > By the way, I really studied the chip and if I want to be able to manage
> > both 8 bpp and 16 bpp mode, I need to be able to change the endianness
> > attribute of the memory region.
>
> Why wouldn't you access video memory via a sthbrx instruction (writew)?

Right!
writew() - assumes that you are talking to a peripheral and all peripherals
must be little endian , thank you PCI.

__raw_writew() - accesses the memory in the native format which is
big-endian in your case.


To answer your other question:
You can not set an attribute on a memory region within the memory controller
to force the hardware to handle this for you on a region by region basis.
The chip's endianness may be configurable. This is an exercise let to the
programmer.  :(


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list