This is a discussion on Re: Userland/Kernel Space Driver Advice within the mailing.openbsd.tech forums, part of the OpenBSD category; --> On Tue, Oct 16, 2007 at 11:16:01PM -0500, Joel Snyder wrote: > Hello, sent straight here from #OpenBSD, I ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On Tue, Oct 16, 2007 at 11:16:01PM -0500, Joel Snyder wrote: > Hello, sent straight here from #OpenBSD, I am on a mission to become > acclimated in an OpenBSD hacking environment > early stages of finding out the `right,' `wrong,' and the gray ways of > handling issues. I am a little perplexed as to one of those proper > ways to approach driver writing, whether it is best to `stay in > userland' or start gently pushing for inclusion of code into the > mainstream kernel...which I _feel_ that the former is the more correct > method. > If this is so, then could someone point me in the direction > of man pages to find examples and general documentation of writing > drivers in userspace. imo, if you dont have the full hardware doc, it's handy to have complete access to the hardware from userland, so you can easily play with it until you understand how it works exactly. An easy way to do this is to write a trivial character device with ioctls to tweak the device; an lkm should work. Once you understand how the device works, you can write the kernel driver. see what do other pci drivers; pick a simple one from /src/sys/dev/pci/ and pci_conf_read(9), bus_space(9), autoconf(9) > In any circumstance, words of wisdom from the > old gurus are always welcomed. One goal of mine is to write a driver > for my audio card, and envy24ht, utilizing some of the FreeBSD attempt > as well as the original documentation. Also, in making the chipset's > driver, creating an EEPROM reader program which I am more concerned > about being in kernel space. Anyways, thanks for reading. > I'm currently working on the driver for envy24; I'll cleanup my stuff and send it to you asap. AFAIK envy24 and envy24ht are similar. What card are you using? -- Alexandre |