~ubuntu-branches/ubuntu/gutsy/vnc4/gutsy

« back to all changes in this revision

Viewing changes to unix/xc/programs/Xserver/hw/xfree86/Domain.note

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2006-05-15 20:35:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515203517-l4lre1ku942mn26k
Tags: 4.1.1+X4.3.0-10
* Correction of critical security issue. Thanks to Martin Kogler
  <e9925248@student.tuwien.ac.at> that informed me about the issue,
  and provided the patch.
  This flaw was originally found by Steve Wiseman of intelliadmin.com.
* Applied patch from Javier Kohen <jkohen@users.sourceforge.net> that
  inform the user that only 8 first characters of the password will
  actually be used when typing more than 8 characters, closes:
  #355619.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
The purpose of the changes described here is to implement a more general
 
2
framework for multi-head on systems with more than one host-to-PCI bridge.
 
3
The changes also implement a basic port of XFree86 to SPARC Solaris.
 
4
 
 
5
These changes are derived from David S. Miller's submission #4653 to the
 
6
patch list.  David Andrew of Sun Microsystems was also kind enough to
 
7
arrange for a hardware loan for development of these changes.
 
8
 
 
9
These changes are known to work on several SPARC SunOS and UltraSPARC
 
10
Linux configurations.  Linux kernel work is in progress to port these
 
11
changes to Linux/PowerPC.
 
12
 
 
13
Several loose ends still need to be addressed before these changes can be
 
14
considered stable.  The bulk of this note is devoted to enumerating what
 
15
remains to be done, along with other notes, broken down into various broad
 
16
categories.
 
17
 
 
18
SPARC SunOS (aka Solaris)
 
19
-------------------------
 
20
- An overview of this XFree86 port is available in README.Solaris.
 
21
- The keyboard map code in hw/xfree86/os-support/sunos/sun_kbdEv.c needs
 
22
  to be extended to handle more than only the sun5 keyboard I targeted it
 
23
  for.  Even for the sun5, the map is incomplete as several keys are not
 
24
  mapped.  What is there is just barely usable.
 
25
- On exit, the server will zero out /dev/fb, but that might not be the
 
26
  right thing to do for all primary adapters.  This does however
 
27
  appear to emulate the behaviour of Sun's commercial servers.  It also
 
28
  eliminates the need for output drivers to save and restore video memory
 
29
  contents.  (They still need to save/restore the mode timing however.)
 
30
  This also chimes into a long-standing XFree86 policy to not save/restore
 
31
  video memory contents if the mode on entry is found to be non-VGA, a
 
32
  policy several existing drivers comply with.
 
33
- The SBUS drivers (sunbw2, suncg14, suncg3, suncg6, sunffb, sunleo and
 
34
  suntcx), the common layer's SBUS code and the fbdev driver have all
 
35
  only been compile tested.  There are likely to be Linux'isms within
 
36
  them that remain to be dealt with.
 
37
- It still needs to be verified whether or not this work adversely
 
38
  affected support for ix86 Solaris.
 
39
 
 
40
UltraSPARC Linux
 
41
----------------
 
42
- Although this code can be compiled using any Linux/SPARC64 kernel, it
 
43
  can only run successfully using 2.4.12 or later.
 
44
- I haven't had time to sufficiently dig into XKB to properly configure it
 
45
  for sun5 keyboards.  Given XFree86 on Linux/SPARC has been around for a
 
46
  while, it's likely someone has already done this, and I'd appreciate
 
47
  receiving a copy of a working XF86Config input section.
 
48
 
 
49
PowerPC Linux
 
50
-------------
 
51
- As mentioned above, kernel work is in progress to port this PCI scheme
 
52
  to Linux/PowerPC.
 
53
- Aside from kernel work, the inX() and outX() definitions in compiler.h
 
54
  will need to be changed to do something akin to their SPARC definitions,
 
55
  i.e. consider their port argument to be a virtual address.
 
56
 
 
57
Other Linux ports to multi-domain architectures
 
58
-----------------------------------------------
 
59
- Comments in os-support/bus/linuxPci.c document the kernel interface
 
60
  required to port these changes.  In short, Linux ports, such as Alpha
 
61
  and mips, should follow SPARC and PowerPC's lead in providing support to
 
62
  mmap() PCI devices through their /proc/bus/pci pseudo-files and to treat
 
63
  such requests for host bridges as requests to mmap() space provided by
 
64
  these bridges.
 
65
 
 
66
Other OS's
 
67
----------
 
68
- In the right hands, either linuxPci.c or sparcPci.c can be used as a
 
69
  guide for what would need to be done to port this scheme to other OS's.
 
70
  Perhaps the largest difference between the two (in terms of interface to
 
71
  the common layer) is that the SunOS port includes internally generated
 
72
  domain numbers in PCITAG's, whereas the Linux port doesn't need to.  The
 
73
  remainder of the PCI code (which is OS-independent) can handle either
 
74
  scheme.
 
75
- Required entry points are xf86GetPciDomain(), xf86MapDomainMemory(),
 
76
  xf86MapDomainIO() and xf86ReadDomainMemory().  Replacements for
 
77
  xf86BusAccWindowsFromOS(), xf86PciBusAccWindowsFromOS() and
 
78
  xf86AccResFromOS() might also be required.
 
79
- Development of these changes has detected the fact that the XFree86 port
 
80
  to the PowerMax OS is broken, and has been for some time, i.e. since
 
81
  shortly after its introduction, back in the 3.9* days.
 
82
 
 
83
SPARC PCI (OS-independent)
 
84
--------------------------
 
85
- The "Simba" PCI-to-PCI bridge used in SPARC's does not implement VGA
 
86
  routing, as defined in the PCI specs.  Fortunately, OpenPROM seems to
 
87
  always route VGA resources to the bus with PCI connectors, but this also
 
88
  causes the common layer to not mark any PCI adapter as primary.
 
89
 
 
90
Multiple PCI domains (architecture- and OS-independent)
 
91
-------------------------------------------------------
 
92
- This implementation assumes every host-to-PCI bridge provides access to
 
93
  a separate PCI domain.  Each such domain provides three different
 
94
  "address" spaces:  PCI configuration, I/O and memory.  The
 
95
  implementation can also deal with situations where more than one PCI
 
96
  domain share (different subsets of) the same PCI configuration space.  I
 
97
  have unconfirmed information that suggests it might be necessary to also
 
98
  allow the sharing of PCI memory spaces.
 
99
- This implementation also assumes the CPU's physical address space
 
100
  includes the entirety of each domain's I/O and memory spaces.  I know
 
101
  this'll need to be changed to deal with the so-called UniNorth bridge,
 
102
  found on PowerPC's, which allows access to only a subset of the memory
 
103
  space behind it.
 
104
- Ideally, the common layer should mark as primary up to one PCI adapter
 
105
  per domain.  This has yet to be done.
 
106
- Something needs to be done about PCI master aborts on primary buses.
 
107
  For details on this, see my long-winded diatribe in sparcPci.c, and
 
108
  related comments in linuxPci.c.  Suffice it to say here that I see the
 
109
  eventual implementation of host bridge drivers within XFree86 as
 
110
  unavoidable at this point.
 
111
- DGA is broken on multi-domain platforms.  The information passed to the
 
112
  client to locate the framebuffer still needs to be revised.  The best way
 
113
  to deal with this is to change all drivers' OpenFramebuffer() function to
 
114
  call a common layer routine to set the device name and displacements to be
 
115
  returned to the DGA client.
 
116
 
 
117
Output drivers
 
118
--------------
 
119
Most drivers currently used on ix86 need(ed) source code changes.
 
120
- Calls to xf86ReadBIOS() and xf86MapVidMem() were replaced with calls to
 
121
  xf86ReadDomainMemory() and xf86MapDomainMemory() respectively.  Except
 
122
  for the "ati" and "atimisc" modules, this has already been done.
 
123
- All ix86-style I/O port numbers need to be declared as an IOADDRESS, a
 
124
  type defined in xf86Pci.h as "unsigned long".  Such port numbers also
 
125
  need to be offset by a displacement which is also defined as an
 
126
  IOADDRESS.  Before a driver's PreInit() is called, the common layer
 
127
  makes this displacement available in ScrnInfoRec.domainIOBase.  For
 
128
  single-domain architectures, such as ix86, domainIOBase will always be
 
129
  zero.  Current use of vgaHWRec.PIOOffset has also been adjusted
 
130
  accordingly.  Some drivers have been changed to keep a copy of this
 
131
  displacement in their private structure.  Internally, an IOADDRESS is
 
132
  actually a pointer that has been recasted to an unsigned long, but the
 
133
  common layer "hides" this fact from the driver ABI, which means that I/O
 
134
  port numbers, as seen by drivers, remain as integers rather than
 
135
  addresses.  Aside from the ati and atimisc modules, s3, sis and tseng
 
136
  are the only modules left whose I/O still needs to be converted (I've
 
137
  temporarily run out of steam).
 
138
- Note that these conversions are not necessarily sufficient to produce
 
139
  drivers that will work on any given multi-domain architecture.  A driver
 
140
  that, for example, had endianness problems, still does.  But, at least,
 
141
  these conversions, along with the supporting common layer changes, make
 
142
  PCI drivers more widely amenable to porting.
 
143
- rdinx(), wrinx(), modinx(), testrg(), testinx() and testinx2() are not
 
144
  given enough information to allow for the relocation of their I/O.  They
 
145
  are consequently being deleted.  The apm and ark drivers, the only
 
146
  remaining callers of the first three, have been changed to use local
 
147
  definitions instead.  The last three (test*()) were already unused.
 
148
- As a temporary measure, these changes completely disable ISA-style
 
149
  probing on SPARC's and PowerPC's.  This means that driver calls to
 
150
  xf86MatchIsaInstances(), while still valid, will always return detection
 
151
  failure on SPARC's and PowerPC's.  This will be dealt with when a more
 
152
  general master abort handling scheme is implemented.
 
153
- I need to make a decision about the master abort issues mentionned above
 
154
  before I can convert the "ati" and "atimisc" modules.  Consequently,
 
155
  these modules still need to be compiled with -DAVOID_CPIO on
 
156
  multi-domain architectures, and support for Mach64 variants as
 
157
  non-primary heads is not yet available.
 
158
 
 
159
$XFree86: xc/programs/Xserver/hw/xfree86/Domain.note,v 1.2 2002/01/25 21:55:49 tsi Exp $