Subject: CVS commit: src/sys/lkm/dev/pcilkm
To: None <source-changes@NetBSD.org>
From: Quentin Garnier <cube@netbsd.org>
List: source-changes
Date: 07/02/2004 13:26:41
Module Name:	src
Committed By:	cube
Date:		Fri Jul  2 13:26:41 UTC 2004

Added Files:
	src/sys/lkm/dev/pcilkm: Makefile pcilkm.4 pcilkm.h pcilkm_lkm.c
	src/sys/lkm/dev/pcilkm/examples/auich: Makefile README auich_lkm.c
	src/sys/lkm/dev/pcilkm/examples/pcienum: Makefile pcienum_lkm.c

Log Message:
Add 'pcilkm' module.

It is a layer to make it possible to have loadable PCI device drivers.

First you load (with symbols) the pcilkm module, then you can load PCI
drivers that have been compiled to work with pcilkm.

Two examples are provided.  'pcienum', the first one, is a simple
demonstration of how to use pcilkm:  it is the basic skeleton of a PCI
driver, and will attach at load time to all PCI devices known to the
system.

The second example 'auich' demonstrates how simple it is to use an
existing driver as a LKM.  It simply includes the code for auich(4) and
then adds the necessary pcilkm logic.  However there are some drawbacks
that are described in the README file.


To generate a diff of this commit:
cvs rdiff -r0 -r1.1 src/sys/lkm/dev/pcilkm/Makefile \
    src/sys/lkm/dev/pcilkm/pcilkm.4 src/sys/lkm/dev/pcilkm/pcilkm.h \
    src/sys/lkm/dev/pcilkm/pcilkm_lkm.c
cvs rdiff -r0 -r1.1 src/sys/lkm/dev/pcilkm/examples/auich/Makefile \
    src/sys/lkm/dev/pcilkm/examples/auich/README \
    src/sys/lkm/dev/pcilkm/examples/auich/auich_lkm.c
cvs rdiff -r0 -r1.1 src/sys/lkm/dev/pcilkm/examples/pcienum/Makefile \
    src/sys/lkm/dev/pcilkm/examples/pcienum/pcienum_lkm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.