A KGIM driver is the driver of a graphic board written for KGI and respecting the KgimAPI.

KGIM drivers are broken down in several subsystems (or subdrivers) which are typically the components of a graphic display HW chain:

The result of linking the compilation objects of the above subsystems gives you a KgimBoard. Currently, the glue-code between the subsystems is partly KGI API dependent for implementing a KgiDisplay and partly dependent of the operating system supposed to load the KgimBoard as a module.

A KGIM board is not yet a Plugins because it is specific to the OS it was compiled for.

Code which is system specific is isolated from the rest of the subsystems' code. This enables the compilation of the drivers in the same tree for any target OS. Also, KGI proposes a library of OS dependent routines for basic operations like mutexe management, delays, VM operations... The KGIM drivers use them instead of calling directly the OS API. These routines are part of the KgiAPI.

In the FreeBSD implementation, the board entity is a full FreeBSD kld module device driver, respecting the newbus interface, connected to the PCI core and responsible for dispatching the FreeBSD resources to the KGIM underlying clock, ramdac and chipset drivers (as they exist in the Linux implementation). The board driver probe/attach routines detect the chipset, prepare the KgiDisplay information and call the KGIM functions to powerup the KgimDrivers.

When the board module is loaded into the FreeBSD kernel, the probe routine has already acknowledged the chipset existance. Consequently, during the attach call, when the KGI chipset driver is powered up, the pci_find() routine is a nop instruction. Later, resource reservation like irq_claim and check_region are converted into FreeBSD bus_resource() calls.

KgimDriver (last edited 2008-06-17 21:37:17 by localhost)