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)
By Anonymous Coward (74.130.128.79) on
By Marius (81.181.89.58) on
Thank you.
By Anonymous Coward (207.112.196.106) on
Comments
By Anonymous Coward (74.12.77.28) on
> for instance, i don't see enough difference between:
http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/dev/usb/ugensa.c?rev=1.8&content-type=text/plain
> and
http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/dev/usb/umsm.c?rev=1.3&content-type=text/plain
> to warrant a change in the copyright.
have you tried running diff on the two files to see the difference?
Comments
By Anonymous Coward (207.112.196.106) on
Comments
By tedu (69.12.168.114) on
> > > for instance, i don't see enough difference between:
> > http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/dev/usb/ugensa.c?rev=1.8&content-type=text/plain
> > > and
> > http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/dev/usb/umsm.c?rev=1.3&content-type=text/plain
> > > to warrant a change in the copyright.
> >
> > have you tried running diff on the two files to see the difference?
>
> have you? there's spacing changes, braces changes, etc. no significant changes at all.
because 90% of the code is mechanical. what differences could there be?
By Anonymous Coward (203.217.30.85) on
> > have you tried running diff on the two files to see the difference?
>
> have you? there's spacing changes, braces changes, etc.
> no significant changes at all.
Most of the code in the driver is boilerplate USB driver stuff, all of the USB drivers share this. The actual device-specific stuff is only 20 lines or so (mainly the for() loop in umsm.c) and guess what? It is the part the differs most between the two drivers...
By Anonymous Coward (87.238.80.64) on
http://www.gnu.org/philosophy/bsd.html
Link above explains problem with 4 clauses BSD license. That's one I see as a difference, but I know that I still don't have clear understanding of copyright. For example, what is the difference between:
andComments
By tedu (69.12.168.114) on
> Copyright (c) 2006 Jonathan Gray
> and
> Copyright (c) 2006 Jonathan Gray
> All rights reserved.
depends on where you live and what treaties your country has signed.
Comments
By Anonymous Coward (87.238.80.64) on
> > Copyright (c) 2006 Jonathan Gray
> > and
> > Copyright (c) 2006 Jonathan Gray
> > All rights reserved.
>
> depends on where you live and what treaties your country has signed.
OpenBSD's license.template doesn't use `All rights reserved.' like most licenses I saw on web. How it looks in Canada or Europe?
By Anonymous Coward (87.78.66.197) on