PowerMac + Radeon startup crash: PCI resource problem w/ Linux 2.6 (long)
Benjamin Herrenschmidt
benh at kernel.crashing.org
Sun Dec 19 12:05:04 PST 2004
> Hmmm, I must admit that I don't really understand this advice... lspci
> reports on 2.6.9 the io ranges
>
> Region 1: I/O ports at 802400 [size=256]
>
> for the Radeon and
>
> Region 1: I/O ports at 0400 [disabled] [size=32]
>
> for the isdn card. But where do the IO regions overlap? Are only the lower
> 12 bites taken into account? And where should I move the Radeon IO region?
Nah, it's a bit different. The kernel internally "tweaks" by adding an
offset to the IO space of PCI domains. For example, the IO space of the
bus where the radeon sits ended up beeing ioremap'ed in kernel virtual
space at an address which is 0x802000 after where the bus where the ISDN
card sits. This allows the kernel to use a single global IO base for all
busses. X doesn't see this though afaik, as it reads the card BARs
directly (and would have little use of that offset anyway since it's
based on kernel virtual addresses which have no meaning outside of the
kernel).
The PPC kernel (like a few other archs afaik) provides a special syscall
that allows to get access to the actual domain number of a given PCI
device, and obtain the proper IO base for it. Unfortunately, X currently
doesn't know how to use that properly. This is also only a "workaround"
at this point, ideally, X should stop playing those tricks on linux and
just use the stuff as-is, mmap'ing /proc/bus/pci to access the various
spaces, which should provide legacy IO space on a per-bus basis too.
Ben.
More information about the xorg
mailing list