Unix Technical Forum

Re: Userland/Kernel Space Driver Advice

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 ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > mailing.openbsd.tech

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 09:33 AM
Alexandre Ratchov
 
Posts: n/a
Default Re: Userland/Kernel Space Driver Advice

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 I'm still in the
> 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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:02 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com