Matches linuxPci.c changes made in 8279444a54
Fixes compiler errors:
"ix86Pci.c", line 194: too many struct/union initializers
"ix86Pci.c", line 204: too many struct/union initializers
"ix86Pci.c", line 214: too many struct/union initializers
Note that pciaccess doesn't yet have Net/OpenBSD support, but the relevant
code should go there instead of disconnected code in the X Server.
While here, remove the now-disabled INCLUDE_XF86_NO_DOMAIN from the headers,
and un-disable xf8StdAccResFromOS for those OSes without domain support which
will need it.
This was a bunch of poorly defined resource ranges per OS/platform combination
which were supposed to represent what regions could potentially have resources
allocated into them.
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.
Formerly we sized an array with a compile time constant, then initialized
its size to the same constant, but the Linux PCI init code would increase
that "constant". So if you happened to have more than 128 PCI devices,
you'd happily scribble into whatever variables happened to be in .bss
after that array.
Only really fixed for Linux atm. Other OSes will simply (still) fail to
work on video devices above the 128th PCI device.
/sys/devices reflects the bus topology, and we don't care that much.
Easier (and more reliable) to just look in /sys/bus/pci/devices, which
is a flat view.
Currently, the call to linuxPciOpenFile() is always made for read
only access which causes the subsequent mmap call to fail when the
memory is mapped read/write.
Xorg #9692
xf86ReadLegacyBIOS is only used by one function in int10/generic.c.
Move a generic implementation of that function there, rename it to
read_legcay_BIOS, and delete all remnants of it from all other places.
Convert xf86GetPciHostConfigFromTag to a new function called
get_parent_bridge. This name better represents what
xf86GetPciHostConfigFromTag is used for: walking up the lists of PCI
bridges from a device.
Eliminate xf86GetPciDomain. The domain from libpciaccess is the
domain. Period. This means that 0 is a valid domain. Make sure that
INCLUDE_XF86_NO_DOMAIN is *not* set. Always run in "domain mode,"
even if the only domain possible is 0.
Convert all uses of PCITAG in int10 and vgaHW to 'struct pci_device'.
This allows the conversion of xf86ReadLegacyVideoBIOS and
xf86MapDomainMemory to 'struct pci_device' from PCITAG.
If we're mapping something in the "legacy range" (0-1Mb), we shouldn't
expand the requested range to the entire 0-1Mb range. Typically this
is for mapping the VGA frame buffer, and some platforms support mmap of
the frame buffer but not the entire 0-1Mb range.
For example, HP sx1000 and sx2000 ia64 platforms can have memory from
0-0x9ffff, VGA frame buffer from 0xa0000-0xbffff, and memory from
0xc0000-0xfffff. On these platforms, we can't map the entire 0-1Mb
range with the same attribute because the memory only supports WB,
while the frame buffer supports only UC. But an mmap of just the
frame buffer should work fine.
Mach64 driver bails out on ia64 because it cannot map device
memory. It turns out that some bogus and unneeded code attempts
to find the root bridge of the device and fails to do so proberly
as there this host-to-pci bridge is not existant. This code has
been around for years although it completely unclear what it had
been intended for. Fixing this by eliminating the bogus code.
broken for any 32 bit X server running on a 64 bit kernel) so #ifdef
them out for now. the PCI rework tree will make all this crap go away,
so I think we can tolerate the extra #ifdef for the next release.