Re: How to change endian attribute for a memory region

2 messages, 2 authors, 2002-10-15 · open the first message on its own page

Re: How to change endian attribute for a memory region

From: Matt Porter <hidden>
Date: 2002-10-15 14:15:46

On Tue, Oct 15, 2002 at 01:07:19PM +0200, Laurent Mohin wrote:
Stefan,

I'm the initiator of the question.
I use the Epson chip in big endian mode. The problem is that in 16 bpp
mode, the RGB mapping into video memory is fixed by the chip and described
in little endian format.

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)?

Regards,
--
Matt Porter
porter@cox.net
This is Linux Country. On a quiet night, you can hear Windows reboot.

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

RE: How to change endian attribute for a memory region

From: Allen Curtis <hidden>
Date: 2002-10-15 14:35:40

quoted
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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help