Subject: IOKit emulation (was: Re: root device)
To: Simon Burge <simonb@wasabisystems.com>
From: Emmanuel Dreyfus <manu@netbsd.org>
List: tech-kern
Date: 02/12/2003 22:01:56
> What is the goal of having the complete device tree available? Are we
> trying to emulate enough functionality for the kmem-style grovellers
> (yah, not 100% correct terminology but YKWIM) to work, or is there a
> more practical application for having the device tree available?
The goal is to enable access to our devices from Darwin binaries. Appart
from disk and tty, Darwin does not use device files, everything is
handled through the IOKit.
And when you use the IOKit API, you walk the tree, looking for the
devices you want, then you open it and you talk with it, using Mach
messages. No BSD system calls here.
Presenting the whole tree is usefull if you have some Darwin userland
drivers that need to talk to hot plug-and-play devices (think about USB
and FireWire). NetBSD will add them to the tree, and if the emulation
layer is good enough, the Darwin binaries will be able to use them
immediatly.
I have to say that I'm not yet an IOKit expert, I might misunderstand
some IOKit issues. If anyone knows about it better, please speak.
--=20
Emmanuel Dreyfus.
"L'achitecture x86 est impossible =E0 aimer." (John Hennessy)
manu@netbsd.org