Red Hat Bugzilla – Bug 438947
Map MMIO aperture failed when region's size(4K) < PageSize(16K)
Last modified: 2008-03-26 19:28:39 EDT
Description of problem:
I ran into this issue on IA64. When I tried to start X server, ati driver failed
(EE) MACH64(0): Unable to map mmio aperture. Argument list too long (7) .
By looking into this closer I found that the issue is caused by a call to
pci_device_map_range() when trying to map MMIO aperture.
int err = pci_device_map_range(pVideo,
Here the PageSize, which is 16K on ia64, is passed as the size argument but the
size of the corresponding region in my ati card is only 4K.
Region 0: Memory at fa000000 (32-bit, non-prefetchable) [size=16M]
Region 1: I/O ports at 5800 [size=256]
Region 2: Memory at fbfd0000 (32-bit, non-prefetchable) [size=4K]
Expansion ROM at fbfa0000 [disabled] [size=128K]
Then an E2BIG is returned when the pci_device_map_range() checks arguments and
the X server failed to start. I also do some investigation about why I didn't
run into this on F8. It turns out recently X server changed to use libpciaccess
instead of previous xf86* method. Previously xf86MapPciMem() is used to do the
map and somehow allow the map succeed.
I saw this on IA64, but I image that other platform which has a 4k region2 ati
card and 16K page size would run into the same issue. I think the real region
size instead of PageSize would be passed to the MMIO map and unmap functions in
this case. I will attach a patch to do this.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Created attachment 299093 [details]
patch to fix ia64 map MMIO aperture issue
its probably easier to just fix this to do the same path for all systems
regardless of pagesize.
I've put a modified patch into fedoras driver now it should be in
xf86-video-ati-6.8.0-5 when it hits rawhide.
Thanks, I have checked out the source from fedora cvs and it works fine :) Any
other info is needed?
nope I've put the fix upstream as well, thanks for testing.