The code in hw/xfree86/os-support/bus/sparcPci.c:simbaCheckBus() is trying to mimmick VGA routing by disabling I/O space responses behind the Simba PCI-PCI controller. Unfortunately, doing this also happens to disable access to the IDE controller I/O space registers, thus crashing the system. The granularity of the I/O disabling in the Simba controller is not fine enough to disable VGA without also disabling the IDE controller registers. What usually happens is that the SIMBA code disables the I/O range, and the first module to get loaded afterwards which isn't already in system ram goes out to disk which hangs. We get no console messages because the console has been put into framebuffer mode by the X server already. This took a painfully long time to track down and debug. In my opinion this Simba code should be just removed outright. It cannot work properly without also disabling access to critical system devices, such as the IDE controller. The code tries to disable I/O space by clearing the lowest bit of the APB_IO_ADDRESS_MAP register. The effect of this is to disable the first 2MB of I/O space behind that bridge, and it's extremely likely that other critical devices will be sitting in that region, and thus be disabled too. Bit 0 of this register controls I/O space in the range 0 --> ((1 << 21) - 1), bit 1 controls I/O space in the range (1 << 21) --> ((2 << 21) - 1), etc.
I can confirm this bug. I have also experienced severe data loss from this bug as on two separate occasions the partition table on a IDE harddisk (first time hda, second time hdc) had disappeared! After the first time I reinstalled the system on hda and the disk showed no problems during or after the install. I have yet to resurrect hdc. It would be great if this issue could be given a bit more attention than it seems to have been given so far. I have checked and my system (a Sparc Ultra 10) does have the SIMBA Advanced PCI Bridge.
As David pointed out, the code in question is very problematic with practically no added benefit, and can occasionally lead to serious data loss. We have disabled this code in Debian's X.org packages by applying the patch which I will attach to the report; nobody has complained so far. I'm taking the liberty to bump the severity of this bug a notch, in the hope that somebody will care enough to apply it (or propose an alternative solution). -- Jurij Smakov Debian SPARC port maintainer
Created attachment 7701 [details] [review] Patch to disable Simba PCI bridge routing code
Sorry about the phenomenal bug spam, guys. Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Committed. git ebaa6c920c82401952a0ccc991b94574306449bd
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.