From mboxrd@z Thu Jan 1 00:00:00 1970 Reply-To: From: "Allen Curtis" To: "Matt Porter" , "Laurent Mohin" Cc: "Stefan Roese" , "Michael Meriin" , Subject: RE: How to change endian attribute for a memory region Date: Tue, 15 Oct 2002 07:35:40 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" In-Reply-To: <20021015071546.A14041@home.com> Sender: owner-linuxppc-embedded@lists.linuxppc.org List-Id: > > 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/