Contributed by jj on from the driving-miss-daisy dept.
One of those is Jonathan Grays device driver presentation, which covers quite a few aspects of driver development.
The presentation is here. It starts out with the points on why BLOBs are evil and real documentation is important, goes on to point out where in the source tree various files go and how config(8) put them all together.
Then it goes into how the actual driver initializes itself and in what order things are done in a driver. The differences between interrupt based communication and polled are shown, as are the userland communication interfaces. It also touches the bus_space and bus_dma functions, but in order to understand them, you really need to read the manual pages and probably code using it, since it's non-trivial and can't really be explained in two slides.
After that, a few hints on mbufs, subsystems you may encounter and misc functions for sleeping/delays and locking.
Jonathan then shows some ways to aid in debugging kernel code, what options there are and how to add debugging code non-intrusively.
A quick pass on how reverse engineering works shows the complexity of it, and really gives you a hint on why real documentation is so valuable if you didn't get it in the first place.
Some guidelines for stuff to do, and not to do follows, with a special page on kernel subroutine stack usage, a topic that has gotten a bit of extra attention lately. Other guidelines are shorter dos and donts, all designed to make the writing experience better for all involved.
After that, a list of vendors that are only "open to business", from Sun to FreeBSD via Linux, where blobs and secrets seem accepted by the masses.
A "Future Work" ends this presentation, with topics and suggestions for improvements where OpenBSD could get better in order to help out people that write drivers.
All in all, a very nice presentation which touches lots of aspects of driver development.
Wish I was there to hear it.
(Comments are closed)