> 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 via email to