Index: [thread] [date] [subject] [author]
  From: Steffen Seeger <seeger@physik.tu-chemnitz.de>
  To  : ggi-develop@eskimo.com
  Date: Mon, 13 Jul 1998 17:30:23 +0200 (MEST)

Re: Card identification.

>  wlfshmn@ramses.ml.org wrote:
> 
> > What is the prefered method of detecting a pci card?
> > 
> > Currently I'm using the pcibios_find_device() function, but I gather this
> > is rather Linux specific and thus should not be used, since I'm waiting
> > for info from Matrox anyway, I might aswell clear up a few of these issues
> > in my code ;)

The recommended procedure is:

1)	the OS layer will pass the chipset driver (as an option)
	a pcicfg address, which gives an uniqe ID of a PCI device.
	The driver is supposed to read this device's config space
	(the vendor/model registers) and check if it can serve it.

This is a simple verification procedure and the driver only has
to know about the devices it has to serve.
The new KGI driver interface includes a function to scan for a 
know device, passing an array of Vendor/Model ID's it can drive.

So, once you have the verification part, scanning can be added easily
lateron.
 
> IMHO the GGI drivers specification must provide some kind of hook to 
> call these OS dependent stuff. VBE/AF 2.0 have hooks to do some OS 
> specific stuff, lamentably the hooks are the wrong functions, for 
> example: No hook for PCI stuff. So I do it "by hand" in my FreeBE/AF 
> driver (it means I have code for the PCI detection inside the 
> driver). The next generation of VBE/AF drivers will fix it or at 
> least I heard it.
> 
> What's a hook? just a function pointer in the main structure of the 
> driver. The OS fills it with a wrapper for the OS dependent routine 
> so the driver makes a call to it through the pointer. In this way the 
> driver uses a defined interface (OS independent).

Basically that's what the OS layer does. I have isolated the OS dependent
stuff better in the new driver design, but I don't want to publish
it before it is known to work. For now, please start developing
with 0.0.9, conversion instructions will assume you have a somewhat 
working dali driver.

			Steffen

----------------- e-mail: seeger@physik.tu-chemnitz.de -----------------

Index: [thread] [date] [subject] [author]