AW: Microwindows on Icecube/CoralP

Martin Krause Martin.Krause at tqs.de
Tue Feb 8 22:09:01 EST 2005


On Tue, 8 Feb 2005, Geert Uytterhoeven wrote:
> > > I have similar problems with an MPC5200 board and a Silicon Motion
> > > SM501 (Voyager) grafic controller. The controller has a PCI and a
> > > local bus interface. We use the local bus interface to connect it
> > > with the 5200. In 32 bit truecolor mode everything works fine, but
> > > in 16 bit mode bytes are swapped: 0x12345678 => 0x34127856.
> > > I'm not sure, if this problem has something to do with the CoralP
> > > problem, but it is likely too similar to be completely
> > > independent. Does anyone use an SM501 in 16 bit mode?
> > 
> > This is the problem with big-endian systems with PCI bus. I've seen
> > this on sparc and on MPC5200 too. There is no other solution, but
> > to swap the bytes in SW.
> 
> Yep, the Cybervision graphics cards on Amiga (S3 Trio or ViRGE)
> suffer from the same problem.
> 
> > The problem is that the PCI bus and CPU must agree when thinking of
> > arithmetic context. For example when talking about adresses, both
> > parties have to see address numbers in the same way. Problem is
> > that with graphics formats we are talking about bit masks, not
> > actual numbers. So inner byte order _does_ have meaning while with
> > plain numbers it does _not_, right? 
> 
> If your graphics chip has separate apertures for big and little
> endian (and a control register to `fix' swapping depending on the
> color depth), you may be able to find a configuration that doesn't
> need any swapping on the CPU. 

Hm, the SM501 has 8 MB internal RAM. The framebuffer lies within this
memory. The SM501 is connected with the MPC5200 over the local bus 
interface (not over PCI) and mapped with CS1 to address range
0xE0000000-0xE3FFFFFF. The SM501 configuration registers are within 
the mapped memory area at 0xE3E00000. I can't imagine, why the byte 
swapping should only affect accesses to the famebuffer memory and not
to the configuration registers (where also single bits at the right 
position must be set correctly). I could configure CS1 to do byte 
swapping, but then access to the SM501 configuration registers does 
not work any longer, because this bytes are swapped, too.

Geert, I've seen, you have done much of the fb stuff in the linux 
kernel (thank you for that!). Could you please point me to the best 
place, where byte swapping should be done if I want to use the linux 
text console in 16 bit mode with the MPC5200?

regards,
Martin Krause



More information about the Linuxppc-embedded mailing list