[Prev][Next][Index][Thread]

Re: question of oskit device driver initiation



> From: yaoyyuan@263.net
> Subject: question of oskit device driver initiation 
> 
> I want to use some devices listed in /oskit/dev/freebsd_isa.h, which
> need call oskit_freebsd_init_osenv(osenv) function for initiation . And
> I also want to use network device, which seemed need to use
> oskit_linux_init_osenv(osenv) function for initiation (such as
> start_network() function).
> 
> Whether should I call osenv_isabus_addchild() to add a isabus network
> device and how to init it ?  Or any another way ?

osenv_isabus_addchild is one of the (many) osenv functions that are
typically called from within the driver components. Rather, you need to
use the functions listed above (first paragraph). For a better example of
how to use them, try looking at oskit/examples/x86/extended/console_tty.c,
which uses the freebsd tty drivers. You can simply add a call to
start_network() after the call to start_clock().

The thing to note is that the start_xxx functions take care off dealing
with the linux code, while the FreeBSD tty drivers are not as neatly
integrated into the startup library framework. So, start_network() will
the interact with the linux code for you.

Lbs

---------------------------------------------------------------------------
Leigh B. Stoller                     Computer Science - Flux Research Group
stoller@cs.utah.edu                  University of Utah
http://www.cs.utah.edu/~stoller      Salt Lake City, Utah 84112
---------------------------------------------------------------------------