Subject: IOKit emulation (was: Re: root device)
To: Simon Burge <email@example.com>
From: Emmanuel Dreyfus <firstname.lastname@example.org>
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
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.
"L'achitecture x86 est impossible =E0 aimer." (John Hennessy)