Hello, everyone.
So.. now that the loader is ready (if bugs are found, they can always
be corrected), we can actually start writing the kernel. It can now
read files on its partition (but not write), and display some
messages. It also has a simple memory allocator.
Some considerations about implementing drivers. As we are writing a
microkernel, in order to load a driver we should create a new address
space for it. A driver should be an executable, but doesn't have to
have an entry point. If it does, we may call it, and it would return a
pointer to its description (i.e. how it's called, what methods it
allows etc.). Otherwise, it should have an exportable symbol (which
should be the same for all drivers) that should point to that
description. My suggestion is that kernel should only load one driver,
a kind of an initializer; it doesn't even have to be a driver in the
common meaning, rather a kernel module, which can be unloaded
afterwards in order not to waste memory. This way, it should be loaded
into the kernel address space. Kernel would then provide it with the
list of drivers or something like that. The initializer would then
load the drivers and exit.
Another option (it seems better and easier) is to have the
kernel divided into two parts: the one needed for initialization and
actually the kernel. We sould then have to put all the initialization
stuff into separate segments and free those when initialization is
done.
BTW, I think it would be rather easy to port the drivers from other
major opensource OS's if we have some basic drivers. I've looked at
FreeBSD NIC drivers, and it seemed that we could even use some drivers
without modifying the source, provided that we change some include
files.
And.. streams.. yeah.. ehh.. hmm.. I guess dozzer has something more
to say about them =) .
Waiting for your suggestions =) ..
--
Regards,
Kernel Panic mailto:rzh...@he...
|