|Return to Domain.note CVS log||Up to [XFree86 CVS] / xc / programs / Xserver / hw / xfree86|
File: [XFree86 CVS] / xc / programs / Xserver / hw / xfree86 / Domain.note
Revision: 1.5, Fri Jun 3 02:18:30 2005 UTC (7 years, 11 months ago) by tsi
CVS Tags: xf-4_8_0-bindist, xf-4_8_0, xf-4_8-branch, xf-4_7_99_9, xf-4_7_99_8, xf-4_7_99_7, xf-4_7_99_6, xf-4_7_99_5, xf-4_7_99_4, xf-4_7_99_31, xf-4_7_99_30, xf-4_7_99_3, xf-4_7_99_29, xf-4_7_99_28, xf-4_7_99_27, xf-4_7_99_26, xf-4_7_99_25, xf-4_7_99_24, xf-4_7_99_23, xf-4_7_99_22, xf-4_7_99_21, xf-4_7_99_20, xf-4_7_99_2, xf-4_7_99_19, xf-4_7_99_18, xf-4_7_99_17, xf-4_7_99_16, xf-4_7_99_15, xf-4_7_99_14, xf-4_7_99_13, xf-4_7_99_12, xf-4_7_99_11, xf-4_7_99_10, xf-4_7_99_1, xf-4_7_0, xf-4_7-branch, xf-4_6_99_9, xf-4_6_99_8, xf-4_6_99_7, xf-4_6_99_6, xf-4_6_99_5, xf-4_6_99_4, xf-4_6_99_3, xf-4_6_99_29, xf-4_6_99_28, xf-4_6_99_27, xf-4_6_99_26, xf-4_6_99_25, xf-4_6_99_24, xf-4_6_99_23, xf-4_6_99_22, xf-4_6_99_21, xf-4_6_99_20, xf-4_6_99_2, xf-4_6_99_19, xf-4_6_99_18, xf-4_6_99_17, xf-4_6_99_16, xf-4_6_99_15, xf-4_6_99_14, xf-4_6_99_13, xf-4_6_99_12, xf-4_6_99_11, xf-4_6_99_10, xf-4_6_99_1, xf-4_6_0, xf-4_6-branch, xf-4_5_99_904, xf-4_5_99_903, xf-4_5_99_902, xf-4_5_99_901, xf-4_5_99_9, xf-4_5_99_8, xf-4_5_99_7, xf-4_5_99_6, xf-4_5_99_5, xf-4_5_99_22, xf-4_5_99_21, xf-4_5_99_20, xf-4_5_99_19, xf-4_5_99_18, xf-4_5_99_17, xf-4_5_99_16, xf-4_5_99_15, xf-4_5_99_14, xf-4_5_99_13, xf-4_5_99_12, xf-4_5_99_11, xf-4_5_99_10, HEAD
Changes since 1.4: +5 -11 lines
64. ATIProbe() and atimisc changes: - Port to common layer's domain scheme; - Replace AVOID_CPIO and AVOID_NON_PCI rchitecture-specific #define's with run-time checks and implement new common layer infrastructure to allow this to happen; - Replace endianness compile-time checks with run-time ones; - Deal with certain spurious I/O errors; - No longer consider IOBase when matching adapters to device sections This re-instates support for all ATI adapters on all architectures supported by the common layer (Marc La France). 63. Make sparse I/O masks more portable throughout the server (Marc La France).
The purpose of the changes described here is to implement a more general framework for multi-head on systems with more than one host-to-PCI bridge. The changes also implement a basic port of XFree86 to SPARC Solaris. These changes are derived from David S. Miller's submission #4653 to the patch list. David Andrew of Sun Microsystems was also kind enough to arrange for a hardware loan for development of these changes. These changes are known to work on several SPARC SunOS and UltraSPARC Linux configurations. Linux kernel work is in progress to port these changes to Linux/PowerPC. Several loose ends still need to be addressed before these changes can be considered stable. The bulk of this note is devoted to enumerating what remains to be done, along with other notes, broken down into various broad categories. SPARC SunOS (aka Solaris) ------------------------- - An overview of this XFree86 port is available in README.Solaris. - The keyboard map code in hw/xfree86/os-support/sunos/sun_kbdEv.c needs to be extended to handle more than only the sun5 keyboard I targeted it for. Even for the sun5, the map is incomplete as several keys are not mapped. What is there is just barely usable. - On exit, the server will zero out /dev/fb, but that might not be the right thing to do for all primary adapters. This does however appear to emulate the behaviour of Sun's commercial servers. It also eliminates the need for output drivers to save and restore video memory contents. (They still need to save/restore the mode timing however.) This also chimes into a long-standing XFree86 policy to not save/restore video memory contents if the mode on entry is found to be non-VGA, a policy several existing drivers comply with. - Many SBUS adapters do not work. The main problem is that, in general, different OS'es require different offsets to mmap() SBUS framebuffers and/or registers. This has a number of implications not only for the SBUS drivers (sunbw2, suncg14, suncg3, suncg6, sunffb, sunleo and suntcx), but for the fbdev driver as well. - It still needs to be verified whether or not this work adversely affected support for ix86 Solaris. UltraSPARC Linux ---------------- - Although this code can be compiled using any Linux/SPARC64 kernel, it can only run successfully using 2.4.12 or later. - I haven't had time to sufficiently dig into XKB to properly configure it for sun5 keyboards. Given XFree86 on Linux/SPARC has been around for a while, it's likely someone has already done this, and I'd appreciate receiving a copy of a working XF86Config input section. PowerPC Linux ------------- - As mentioned above, kernel work is in progress to port this PCI scheme to Linux/PowerPC. - Aside from kernel work, the inX() and outX() definitions in compiler.h will need to be changed to do something akin to their SPARC definitions, i.e. consider their port argument to be a virtual address. Other Linux ports to multi-domain architectures ----------------------------------------------- - Comments in os-support/bus/linuxPci.c document the kernel interface required to port these changes. In short, Linux ports, such as Alpha and mips, should follow SPARC and PowerPC's lead in providing support to mmap() PCI devices through their /proc/bus/pci pseudo-files and to treat such requests for host bridges as requests to mmap() space provided by these bridges. Other OS's ---------- - In the right hands, either linuxPci.c or sparcPci.c can be used as a guide for what would need to be done to port this scheme to other OS's. Perhaps the largest difference between the two (in terms of interface to the common layer) is that the SunOS port includes internally generated domain numbers in PCITAG's, whereas the Linux port doesn't need to. The remainder of the PCI code (which is OS-independent) can handle either scheme. - Required entry points are xf86GetPciDomain(), xf86MapDomainMemory(), xf86MapDomainIO(), xf86ReadDomainMemory() and xf86LocatePciMemoryArea(). Replacements for xf86BusAccWindowsFromOS(), xf86PciBusAccWindowsFromOS() and xf86AccResFromOS() might also be required. - Development of these changes has detected the fact that the XFree86 port to the PowerMax OS is broken, and has been for some time, i.e. since shortly after its introduction, back in the 3.9* days. Multiple PCI domains (architecture- and OS-independent) ------------------------------------------------------- - This implementation assumes every host-to-PCI bridge provides access to a separate PCI domain. Each such domain provides three different "address" spaces: PCI configuration, I/O and memory. The implementation can also deal with situations where more than one PCI domain share (different subsets of) the same PCI configuration space. I have unconfirmed information that suggests it might be necessary to also allow the sharing of PCI memory spaces. - This implementation also assumes the CPU's physical address space includes the entirety of each domain's I/O and memory spaces. I know this'll need to be changed to deal with the so-called UniNorth bridge, found on PowerPC's, which allows access to only a subset of the memory space behind it. - Ideally, the common layer should mark as primary up to one PCI adapter per domain. This has yet to be done. - Something needs to be done about PCI master aborts on primary buses. For details on this, see my long-winded diatribe in sparcPci.c, and related comments in linuxPci.c. Suffice it to say here that I see the eventual implementation of host bridge drivers within XFree86 as unavoidable at this point. Output drivers -------------- Most drivers currently used on ix86 need(ed) source code changes. - Calls to xf86ReadBIOS() and xf86MapVidMem() were replaced with calls to xf86ReadDomainMemory() and xf86MapDomainMemory() respectively. This has already been done. - All ix86-style I/O port numbers need to be declared as an IOADDRESS, a type defined in xf86Pci.h as "unsigned long". Such port numbers also need to be offset by a displacement which is also defined as an IOADDRESS. Before a driver's PreInit() is called, the common layer makes this displacement available in ScrnInfoRec.domainIOBase. For single-domain architectures, such as ix86, domainIOBase will always be zero. Current use of vgaHWRec.PIOOffset has also been adjusted accordingly. Some drivers have been changed to keep a copy of this displacement in their private structure. Internally, an IOADDRESS is actually a pointer that has been recasted to an unsigned long, but the common layer "hides" this fact from the driver ABI, which means that I/O port numbers, as seen by drivers, remain as integers rather than addresses. s3 and tseng are the only modules left whose I/O still needs to be converted (I've temporarily run out of steam). - Note that these conversions are not necessarily sufficient to produce drivers that will work on any given multi-domain architecture. A driver that, for example, had endianness problems, still does. But, at least, these conversions, along with the supporting common layer changes, make PCI drivers more widely amenable to porting. - rdinx(), wrinx(), modinx(), testrg(), testinx() and testinx2() are not given enough information to allow for the relocation of their I/O. They are consequently being deleted. The apm and ark drivers, the only remaining callers of the first three, have been changed to use local definitions instead. The last three (test*()) were already unused. - As a temporary measure, these changes completely disable ISA-style probing on SPARC's and PowerPC's. This means that driver calls to xf86MatchIsaInstances(), while still valid, will always return detection failure on SPARC's and PowerPC's. This will be dealt with when a more general master abort handling scheme is implemented. $XFree86: xc/programs/Xserver/hw/xfree86/Domain.note,v 1.4tsi Exp $