The Probe() function is perhaps the most important, and perhaps the
least intuitive function in the driver. The Probe function is required
to identify the chipset independent of all other chipsets. If the user
has specified a `Chipset
' line in the XF86Config file, this is a simple
string comparison check. Otherwise, you must use some other technique
to figure out what chipset is installed. If you are lucky, the chipset
will have an identification mechanism (ident/version registers, etc), and
this will be documented in the databook. Otherwise, you will have to
determine some scheme, using the reference materials listed below.
The identification is often done by looking for particular patterns in register, or for the existence of certain extended registers. Or with some boards/chipsets, the requisite information can be obtained by reading the BIOS for certain signature strings. The best advise is to study the existing probe functions, and use the reference documentation. You must be certain that your probe is non-destructive - if you modify a register, it must be saved before, and restored after.
Once the chipset is successfully identified, the Probe() function must do some other initializations:
VideoRam
' parameter in the
XF86Config file, the amount of installed memory must be determined.Clocks
' parameter in the
XF86Config file, the values for the available dot-clocks must
be determined. This is done by calling the vgaGetClocks()
function, and passing it the number of clocks available and
a pointer to the ClockSelect() function.