9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] Writing drivers in Plan 9
Date: Tue, 15 Apr 2008 09:43:10 -0400	[thread overview]
Message-ID: <e8c0f31395ada733a656d2cc0aa4748d@quanstro.net> (raw)
In-Reply-To: <b7e68f3b281b8cd5388116196c4959f9@9srv.net>

> Given that you're already into Inferno as well as Plan 9, I
> think a really nice way to get into driver development is
> with emu drivers for Inferno. The basic structure is the
> same as for native OS drivers in either system: implement
> a small set of entry points (fooattach, fooread, &c),
> making use of the dev* defaults where appropriate. It's
> then a much smaller step to move into native hardware
> drivers for Plan 9 or Inferno. And when you do get to that
> point, take a look at Inferno's os/port/devXXX.c; it's a
> template for what you need to implement. In any case,
> the devtab (look for '^Dev') towards the end of any driver
> will tell you what you really need. It's a much nicer,
> constrained set for Inferno and Plan 9 than any unix.
> Anthony

i think this confuses implementing a Dev interface with writing
a device driver.  for many devices, the Dev interface is already
taken care of.  for example, serial, ethernet, disk devices using
sd implement an interface to devsd, ethernet.

i don't buy the thesis that talking to hardware is always hard.
talking to some hardware can be hard.  for exampe, the aoe driver
doesn't talk to hardware, it talks to the ethernet drivers.  yet it's
the largest driver i've written, largely because it implements its own
dev interface.

i think it's a mistake to think hardware == hard, software interfaces
== easy.

- erik



  reply	other threads:[~2008-04-15 13:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-15  8:40 hugo rivera
2008-04-15 11:28 ` a
2008-04-15 13:43   ` erik quanstrom [this message]
2008-04-15 16:07     ` a
2008-04-15 18:27       ` hugo rivera
2008-04-15 18:31         ` erik quanstrom
2008-04-15 18:50           ` hugo rivera
2008-04-15 18:54             ` erik quanstrom
2008-04-15 19:06               ` hugo rivera
2008-04-15 13:23 ` erik quanstrom
2008-09-03 21:50 ` Tom Lieber
2008-09-04  6:36   ` hugo rivera

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e8c0f31395ada733a656d2cc0aa4748d@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).