[ELDK] Xorg 7.0 on "Sequoia" Board

abasit at bnet6.net abasit at bnet6.net
Tue Jul 8 17:43:50 CEST 2008


Hi Anatolij,

Thanks for providing the patch, I have looked at the patch, the  
modified files lnx_video.c and lnx_pci.c are almost similar in Xorg  
7.2 and 7.0. I have following questions :-

1. The patch uses mmap64(..) which uses off64_t offset, my  
understanding is that mmap64(..) is not implemented for  
uClibc/powerpc, the implementation is there only in arm and i386  
platforms and one common implementation that chops off the 64 bit  
offset to 32, i tried your patch, it did not work, would your patch  
work glibc/ELDK only?

2. Secondly, if you look in lnx_video.c in function xf86EnableIO(),

#if defined(__powerpc__)
    int fd;
    unsigned int ioBase_phys;
#endif

    ioBase_phys = syscall(__NR_pciconfig_iobase,2,0,0);

    and then pass ioBase_phys as an offset to mmap(..).

I am wondering as i see your patch did not change this, the  
ioBase_phys should be 0x1E8000000 but because of sizeof(int)=4 and  
syscall(..) it truncates to 0xE8000000.

Similary, if you look in xorg-server/hw/xfree86/os-support/bus/linuxPci.c
X is doing similar thing in linuxPpcBusAddrToHostAddr(..) and  
linuxPpcHostAddrToBusAddr(..) for PCI mem and IO, the values are  
truncated there as well.

thanks,

best regards
basit


-----------
Hi,

yes, we did get Xorg running on 440EPx. Please, see the patch for Xorg  
code in attachment. Not sure if it will apply to Xorg 7.0 Xserver code  
cleanly (it is for Xorg 7.2 Xserver code), but you could test it and  
probably fix things accordingly.

...

Address map of 440EPx lists fixed PCI address ranges for PCI Memory  
and PCI IO, starting from 0x1E8000000 for PCI IO and from 0x180000000  
for PCI Memory. Addresses could probably be relocated within these  
ranges but not outside of the ranges, so the above ERPN setting for  
address translation won't work.

Best regards,
Anatolij




More information about the eldk mailing list