Linux on an Ultra 45 with an XVR-300, libpciaccess fix needed?

Jason Detring detringj at gmail.com
Sat Feb 9 16:13:30 PST 2008


Hi xorg list!

I'm attempting to run a fresh build of X under Linux on my Sun Ultra
45, an UltraSPARC IIIi machine.

I'm running a vanilla 2.6.24.  The userland is a hand-spun refresh of
the old Splack 10.1 setup.  With a few exceptions, noted below, I am
running the latest versioned releases of all fd.o components.  I
understand a big roadblock for using X on this machine has been
multiple PCI domain support, so I am attempting to run all
libpciaccess-enabled componentry.  Those "newer" pieces are all git
pulls as of 2008-02-08.
- libpciaccess: master
- xf86-video-ati: master
- xorg-server: master
- mesa: master
D-Bus and HAL are not running, but up-to-date headers are present.
Note that the kernel DRM modules are vanilla and libdrm is 2.3.0.  I
am not concerned with the DRI at the moment--that comes a little
later.

My display controller is a Sun XVR-300.  From what I understand, this
is an ATI chip based on the Radeon series.  Probing for PCI devices
returns:

# lspci -v
... [snip]
0001:00:00.0 Host bridge: ATI Technologies Inc RV370 5B64 [FireGL
V3100 (PCIE)] (rev 80)
       Subsystem: Unknown device 530c:0e55
       Flags: fast devsel, IRQ 7fffffff
       Memory at fffff80900000000 (32-bit, prefetchable) [size=1]
       I/O ports at fffff80900000000 [size=1]
       Memory at fffff80900000000 (32-bit, non-prefetchable) [size=1]
       [virtual] Memory at fffff80900000000 (32-bit, non-prefetchable) [size=1]
       [virtual] Memory at fffff80900000000 (32-bit, non-prefetchable) [size=1]
       [virtual] Memory at fffff80900000000 (32-bit, non-prefetchable) [size=1]
       [virtual] Expansion ROM at fffff80900000000 [disabled] [size=1]
       Capabilities: [50] Power Management version 2
       Capabilities: [58] Express Endpoint, MSI 00

0001:02:00.0 Display controller: ATI Technologies Inc RV370 5B64
[FireGL V3100 (PCIE)] (rev 80)
       Subsystem: Unknown device 530c:0e55
       Flags: fast devsel, IRQ 0000000e
       Memory at 10000000 (32-bit, prefetchable) [size=256M]
       I/O ports at <unassigned>
       Memory at 00100000 (32-bit, non-prefetchable) [size=64K]
       [virtual] Memory at fffff80900000000 (32-bit, non-prefetchable) [size=1]
       [virtual] Memory at fffff80900000000 (32-bit, non-prefetchable) [size=1]
       [virtual] Memory at fffff80900000000 (32-bit, non-prefetchable) [size=1]
       Expansion ROM at <unassigned>
       Capabilities: [50] Power Management version 2
       Capabilities: [58] Express Endpoint, MSI 00
       Capabilities: [100] Advanced Error Reporting <?>

# lspci -n
... [snip]
0001:00:00.0 0600: 1002:5b64 (rev 80)
0001:02:00.0 0380: 1002:5b64 (rev 80)

# X -scanpci
... [snip]
(256:0:0) unknown vendor unknown card (0x530c / 0x0e55) using RV370
5B64 [FireGL V3100 (PCIE)] unknown chip (0x1002 / 0x5b64)
(258:0:0) unknown vendor unknown card (0x530c / 0x0e55) using RV370
5B64 [FireGL V3100 (PCIE)] unknown chip (0x1002 / 0x5b64)



My xorg.conf is quite plain.  It is a Slackware default
xorg.conf-vesa, modified so the Device section for the card specifies
the ati driver instead of vesa, deleted a reference to an RgbPath, and
disable loading of the Type1 module.   No special flags in any
section.

Attempting to run X with the ati driver results in:

# X -verbose 9 -logverbose 9
...   [snip normal startup]
(--) PCI: (1 at 0:0:0) unknown vendor (0x1002) unknown chipset (0x5b64)
rev 128, Mem @ 0xfffff809/0, 0xfffff809/0, 0xfffff809/0, 0xfffff809/0,
0xfffff809/0, 0xfffff809/0, BIOS @ 0x????????/0
(--) PCI: (1 at 2:0:0) unknown vendor (0x1002) unknown chipset (0x5b64)
rev 128, Mem @ 0x00000000/268435456, 0x00000000/1048576, 0xfffff809/0,
0xfffff809/0, 0xfffff809/0
...   [snip further normal startup]
(II) ATI: ATI driver wrapper (version 6.7.197) for chipsets: mach64,
rage128, radeon
(WW) Falling back to old probe method for ati
(II) Loading sub module "radeon"
(II) LoadModule: "radeon"

(II) Loading /usr/lib/xorg/modules/drivers//radeon_drv.so
(II) Module radeon: vendor="X.Org Foundation"
       compiled for 1.4.99.2, module version = 4.3.0
       Module class: X.Org Video Driver
       ABI class: X.Org Video Driver, version 4.0
(II) RADEON: Driver for ATI Radeon chipsets:
...   [snip card list]
(WW) RADEON: No matching Device section for instance (BusID PCI:1 at 0:0:0) found
(WW) RADEON: No matching Device section for instance (BusID PCI:1 at 2:0:0) found
(EE) No devices detected.

Fatal server error:
no screens found



Specifying those BusIDs in my Device section (Option "BusID"
"PCI:1 at 0:0:0" or Option "BusID" "PCI:1 at 2:0:0") had no effect.

(Also note running X without a configuration file causes the server to
segfault immediately after the two "(--) PCI:" lines with the
following messages:
 Primary device is not PCI
 Segmentation fault
leaving the VT on 7.)

What caught my attention was the line:
 "(WW) Falling back to old probe method for ati"
This means libpciaccess failed for some reason, right?

Running strace on X yielded:

# strace X
... [snip]
write(0, "(II) ATI: ATI driver wrapper (ve"..., 85) = 85
open("/sys/bus/pci/devices/0000:00:00.0/config", O_RDONLY) = 7
pread(7, "\265\0202\205\7\0\20\0\252\0\4\6\0\0\1\0\0\0\20\0\0\0\0"...,
256, 0) = 256
close(7)                                = 0
open("/sys/bus/pci/devices/0000:00:00.0/resource", O_RDONLY) = 7
read(7, "0xfffff80700000000 0xfffff807000"..., 512) = 399
close(7)                                = 0
open("/sys/bus/pci/devices/0000:00:00.0/config", O_RDONLY) = 7
pread(7, "\2\3\f\0\1!\0\0 \0\260\0\361\377\1\0\377\377\377\377\0"..., 40,
24) = 40
close(7)                                = 0
open("/sys/bus/pci/devices/0000:02:00.0/config", O_RDONLY) = 7
pread(7, "\265\0202\205\7\0\20\0\252\0\4\6\0\0\1\0\0\0\20\0\0\0\0"...,
256, 0) = 256
close(7)                                = 0
open("/sys/bus/pci/devices/0000:02:00.0/resource", O_RDONLY) = 7
read(7, "0x0000000000100000 0x00000000001"..., 512) = 512
close(7)                                = 0
open("/sys/bus/pci/devices/0000:02:00.0/config", O_RDONLY) = 7
pread(7, "\2\3\f\0\1!\0\0 \0\260\0\361\377\1\0\377\377\377\377\0"..., 40,
24) = 40
close(7)                                = 0
open("/sys/bus/pci/devices/0000:03:01.0/config", O_RDONLY) = 7
pread(7, "\265\0202\205\7\0\20\0\252\0\4\6\0\0\1\0\0\0\0\0\0\0\0"..., 256,
0) = 256
close(7)                                = 0
open("/sys/bus/pci/devices/0000:03:01.0/resource", O_RDONLY) = 7
read(7, "0xfffff80700000000 0xfffff807000"..., 512) = 512
close(7)                                = 0
open("/sys/bus/pci/devices/0000:03:01.0/config", O_RDONLY) = 7
pread(7, "\3\4\5\0\1\21\0\0 \0 \0\361\377\1\0\377\377\377\377\0\0"..., 40,
24) = 40
close(7)                                = 0
open("/sys/bus/pci/devices/0000:03:02.0/config", O_RDONLY) = 7
pread(7, "\265\0202\205\7\0\20\0\252\0\4\6\0\0\1\0\0\0\0\0\0\0\0"..., 256,
0) = 256
close(7)                                = 0
open("/sys/bus/pci/devices/0000:03:02.0/resource", O_RDONLY) = 7
read(7, "0xfffff80700000000 0xfffff807000"..., 512) = 512
close(7)                                = 0
open("/sys/bus/pci/devices/0000:03:02.0/config", O_RDONLY) = 7
pread(7, "\3\6\7\0!\21\0\0000\0p\0\361\377\1\0\377\377\377\377\0"..., 40,
24) = 40
close(7)                                = 0
open("/sys/bus/pci/devices/0000:03:03.0/config", O_RDONLY) = 7
pread(7, "\265\0202\205\7\0\20\0\252\0\4\6\0\0\1\0\0\0\0\0\0\0\0"..., 256,
0) = 256
close(7)                                = 0
open("/sys/bus/pci/devices/0000:03:03.0/resource", O_RDONLY) = 7
read(7, "0xfffff80700000000 0xfffff807000"..., 512) = 512
close(7)                                = 0
open("/sys/bus/pci/devices/0000:03:03.0/config", O_RDONLY) = 7
pread(7, "\3\10\10\0!\21\0\0\200\0p\0\361\377\1\0\377\377\377\377"..., 40,
24) = 40
close(7)                                = 0
open("/sys/bus/pci/devices/0000:03:08.0/config", O_RDONLY) = 7
pread(7, "\265\0202\205\7\0\20\0\252\0\4\6\0\0\1\0\0\0\0\0\0\0\0"..., 256,
0) = 256
close(7)                                = 0
open("/sys/bus/pci/devices/0000:03:08.0/resource", O_RDONLY) = 7
read(7, "0xfffff80700000000 0xfffff807000"..., 512) = 512
close(7)                                = 0
open("/sys/bus/pci/devices/0000:03:08.0/config", O_RDONLY) = 7
pread(7, "\3\t\t\0!\21\0\0\200\0p\0\361\377\1\0\377\377\377\377\0"..., 40,
24) = 40
close(7)                                = 0
open("/sys/bus/pci/devices/0000:03:09.0/config", O_RDONLY) = 7
pread(7, "\265\0202\205\7\0\20\0\252\0\4\6\0\0\1\0\0\0\0\0\0\0\0"..., 256,
0) = 256
close(7)                                = 0
open("/sys/bus/pci/devices/0000:03:09.0/resource", O_RDONLY) = 7
read(7, "0xfffff80700000000 0xfffff807000"..., 512) = 512
close(7)                                = 0
open("/sys/bus/pci/devices/0000:03:09.0/config", O_RDONLY) = 7
pread(7, "\3\n\f\0!!\0\0\200\0\260\0\361\377\1\0\377\377\377\377"..., 40,
24) = 40
close(7)                                = 0
open("/sys/bus/pci/devices/0000:04:00.0/config", O_RDONLY) = 7
pread(7, "\271\20IR\7\0\20 \0\0\4\6\0\0\1\0\0\0\0\0\0\0\0\0\4\5\5"...,
256, 0) = 256
close(7)                                = 0
open("/sys/bus/pci/devices/0000:04:00.0/resource", O_RDONLY) = 7
read(7, "0xfffff80700000000 0xfffff807000"..., 512) = 512
close(7)                                = 0
open("/sys/bus/pci/devices/0000:04:00.0/config", O_RDONLY) = 7
pread(7, "\4\5\5\0\20\20\0\2 \0 \0\360\377\0\0\0\0\0\0\0\0\0\0\0"..., 40,
24) = 40
close(7)                                = 0
open("/sys/bus/pci/devices/0000:05:1e.1/config", O_RDONLY) = 7
pread(7, "\271\20\1q\0\0\0\2\0\0\200\6\0\0\200\0\0\0\0\0\0\0\0\0"..., 256,
0) = 256
close(7)                                = 0
open("/sys/bus/pci/devices/0000:05:1e.1/resource", O_RDONLY) = 7
read(7, "0x0000000000000000 0x00000000000"..., 512) = 399
close(7)                                = 0
open("/sys/bus/pci/devices/0000:06:00.0/config", O_RDONLY) = 7
pread(7, "f\21\3\1\7\0\20\0\263\0\4\6\0\0\1\0\0\0\0\0\0\0\0\0\6\7"...,
256, 0) = 256
close(7)                                = 0
open("/sys/bus/pci/devices/0000:06:00.0/resource", O_RDONLY) = 7
read(7, "0xfffff80700000000 0xfffff807000"..., 512) = 512
close(7)                                = 0
open("/sys/bus/pci/devices/0000:06:00.0/config", O_RDONLY) = 7
pread(7, "\6\7\7@!\21\0\0020\0p\0\361\377\1\0\377\377\377\377\0\0"..., 40,
24) = 40
close(7)                                = 0
open("/sys/bus/pci/devices/0000:0a:00.0/config", O_RDONLY) = 7
pread(7, "\206\200@\3\7\0\20\0\t\0\4\6\0\0\201\0\0\0\0\0\0\0\0\0"..., 256,
0) = 256
close(7)                                = 0
open("/sys/bus/pci/devices/0000:0a:00.0/resource", O_RDONLY) = 7
read(7, "0xfffff80700000000 0xfffff807000"..., 512) = 512
close(7)                                = 0
open("/sys/bus/pci/devices/0000:0a:00.0/config", O_RDONLY) = 7
pread(7, "\n\v\v@  \240\2\200\0\260\0\361\377\1\0\377\377\377\377"..., 40,
24) = 40
close(7)                                = 0
open("/sys/bus/pci/devices/0000:0a:00.2/config", O_RDONLY) = 7
pread(7, "\206\200A\3\7\0\20\0\t\0\4\6\0\0\201\0\0\0\0\0\0\0\0\0"..., 256,
0) = 256
close(7)                                = 0
open("/sys/bus/pci/devices/0000:0a:00.2/resource", O_RDONLY) = 7
read(7, "0xfffff80700000000 0xfffff807000"..., 512) = 512
close(7)                                = 0
open("/sys/bus/pci/devices/0000:0a:00.2/config", O_RDONLY) = 7
pread(7, "\n\f\f at 0 \240\2\300\0\260\0\361\377\1\0\377\377\377\377"..., 40,
24) = 40
close(7)                                = 0
write(0, "(WW) Falling back to old probe m"..., 46) = 46
write(0, "(II) Loading sub module \"radeon\""..., 33) = 33
write(0, "(II) LoadModule: \"radeon\"\n", 26) = 26
write(0, "\n", 1)                       = 1
... [snip]


As you can see, it seems the 0001:0?:00.0 devices are never scanned.
Peeking inside /sys/bus/pci/devices/ shows they are present:

/sys/bus/pci/devices# ls -l
... [snip]
lrwxrwxrwx  1 root root 0 2008-02-09 12:07 0001:00:00.0 ->
../../../devices/pci0001:02/0001:00:00.0/
lrwxrwxrwx  1 root root 0 2008-02-09 12:07 0001:02:00.0 ->
../../../devices/pci0001:02/0001:02:00.0/



I recalled a recent posting on the OpenSolaris xwin-discuss mailing
list dealing with pciaccess related to Xorg on SPARC.  It seems
continuing a scan on bus 'A' beyond the device address of a certain
bridge chip causes all devices on bus 'B' beyond that bridge to
"disappear."  See:
http://mail.opensolaris.org/pipermail/xwin-discuss/2008-January/002772.html

My Ultra 45 has one of the mentioned vendorID 0x10b9 deviceID 0x5249 bridges.

# lspci -n
... [snip]
0000:04:00.0 0604: 10b9:5249
... [snip]
# lspci -v
... [snip]
0000:04:00.0 PCI bridge: ALi Corporation M5249 HTT to PCI Bridge
(prog-if 00 [Normal decode])
       Flags: bus master, fast devsel, latency 0
       [virtual] Memory at fffff80700000000 (32-bit, non-prefetchable)
[size=1]
       [virtual] Memory at fffff80700000000 (32-bit, non-prefetchable)
[size=1]
       Bus: primary=04, secondary=05, subordinate=05, sec-latency=0
       I/O behind bridge: 00001000-00001fff
       Memory behind bridge: 00200000-002fffff
       [virtual] Expansion ROM at fffff80700000000 [disabled] [size=1]
       Capabilities: [90] Power Management version 2
       Capabilities: [98] Express PCI/PCI-X Bridge, MSI 00
... [snip]



Does the Linux (and I guess FreeBSD, too) PCI probing routine need
this workaround?  I would assume yes, but I'm not sure.

If so, would there be a way to return to bus 'A' and complete
scanning, post bus 'B'? Most of my plain PCI graphics cards show up as
device 12.  It would be nice to run multi-card setups. :-)

Unfortunately, I don't understand libpciaccess well enough to make
changes that won't stomp on something else.  Can somebody help me?
I'll be more than eagar to test patches.

For those interested, I have complete logs and config files of the
above at http://splack.homelinux.com/xorgdebug/


Thanks!

Jason



More information about the xorg mailing list