Bug 5277

Summary: 32-bit server cannot handle PCI devices above 0x00000000ffffffff
Product: xorg Reporter: Ian Romanick <idr>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: CLOSED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: high    
Version: unspecified   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 433    

Description Ian Romanick 2005-12-08 08:13:08 UTC
On 64-bit PowerPC, and possibly other architectures, PCI devices are mapped
above the 32-bit barrier.  When X is built as a 32-bit binary, which is typical
on PowerPC, it cannot access these devices.  X tries to map the BAR as an offset
to /dev/mem.  Since the offset is larger than the offset parameter to mmap, the
wrong address is mapped.  The result is that either random locations in system
memory are used or a bus error is generated (I've seen both).

At least on Linux, the correct solution is to use
/sys/bus/pci/devices/*/resource* instead of /dev/mem.  By doing this, the offset
to mmap would always be zero.
Comment 1 Daniel Stone 2007-02-27 01:29:17 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 2 Ian Romanick 2008-06-02 07:50:44 UTC
PCI-rework has landed, and this bug is no longer relevant.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.