Jump to content

Kernel Extensions

From NikiWiki
Revision as of 15:20, 28 December 2006 by Ktk (talk | contribs)

In this page we try to gather some ideas for the current kernel in the hope that those ideas might make life a bit easier in mid-term.

RESOURCE.SYS

Some ideas about changes, which can and (from my point of view), must be implemented.

Background

Resource.sys basedev present for long time. It is responsible for HW resources (IRQ, I/O ports, memory ranges) managing. But not only. Resource.sys is a main point, where config.sys processing take a place. Kernel was modified (somewhere around Warp 3 GA) to ask resource.sys for the list of drivers to load. Now, this functionality is used to process so-called snoopers, i.e. files with .SNP extension, which used to detect the presence of some specific hardware and used resources. The idea is to replace resource.sys with another one, which will detect present PCI (and ACPI) devices and load apropriate drivers, based on the some PCI_ID : driver_name database (just like Windows XP does). Why it needed?

At present, the only way to implement PnP-like solution was to place multiple drivers into single binary (like Uniaud and Danis506). The idea seems to be a nice, but in the real world it have some drawbacks. The most common scenario is: we have two versions of (for example) Uniaud. One version works well with chipset X and has a bug in the support of chipset Y. The another version was fixed a bug for Y, but has some bad things for chip Z. Grand total is: we has no driver, which support all 3 chipsets really well and must select the version, based on the HW installed now (and change the version, with change of HW). With implementation of PnP driver selection, we can just have 3 separate drivers, one for each chipset.

Another good thing about re-implementation of resource.sys. Resource.sys is a first BASEDEV to load. So, it can provide some services, available for other drivers. Like additional KEE functions and so on. Really, it's not very hard to add a function from BASEDEV into KEE library, but this addition will only available for drivers, which loaded later. Because resource.sys loaded first (this is hard coded in the OS/2 kernel), it can provide services for anyone driver.