a micro micro kernel
Posted: Thu Aug 06, 2009 8:05 pm
Ok.. I have been thinking about this extremely small micro kernel.. I mean so small, that it's basically just a framework and the modules make the real kernel...
Goals:
* Able to be scaled down to systems in the 10-100kb RAM range
* Able to be ported(with ease, though not necessarily full featured) to about any arch and system
* Being able to change everything about the kernel except the message passing system(preferably even while running the kernel)
* Nearly everything is optional in the kernel
* Be SMP capable with the proper modules
Ok.. my basic plan: This is how it will go from bootup. (note: Manager refers to Message passing and module management)
1. Gets into kmain from basic execution environment(ie, pmode/long mode/whatever) from bootloader/boilerplate.
2. Kernel initialization module is loaded and executed. This should setup things up for normal operation, such as a GDT; this is not necessary for all archs. Sets a global variable for a function callback in order to initialize this later as a module
3. Loads the manager and sets memory allocated to basic placement malloc
4. Loads the memory management module (which is optional)
5. Loads the task management module
6. Loads the file manager
.... (more modules as specified at compile time)
The message passing will allow communication across modules. All modules will be loaded at ring 0, though there is nothing stopping one to load modules at ring 3 and providing a system call interface to get to the ring 0 manager.
Before disk and filesystem drivers are loaded. Modules will be loaded by a very simple ramdisk, where a fixed loaded address will refer to a module entry point, and the entry point will be passed a struct of function pointers for communicating with the Manager...
Does anyone have criticisms of this or flaws in design or ideas for this?
Goals:
* Able to be scaled down to systems in the 10-100kb RAM range
* Able to be ported(with ease, though not necessarily full featured) to about any arch and system
* Being able to change everything about the kernel except the message passing system(preferably even while running the kernel)
* Nearly everything is optional in the kernel
* Be SMP capable with the proper modules
Ok.. my basic plan: This is how it will go from bootup. (note: Manager refers to Message passing and module management)
1. Gets into kmain from basic execution environment(ie, pmode/long mode/whatever) from bootloader/boilerplate.
2. Kernel initialization module is loaded and executed. This should setup things up for normal operation, such as a GDT; this is not necessary for all archs. Sets a global variable for a function callback in order to initialize this later as a module
3. Loads the manager and sets memory allocated to basic placement malloc
4. Loads the memory management module (which is optional)
5. Loads the task management module
6. Loads the file manager
.... (more modules as specified at compile time)
The message passing will allow communication across modules. All modules will be loaded at ring 0, though there is nothing stopping one to load modules at ring 3 and providing a system call interface to get to the ring 0 manager.
Before disk and filesystem drivers are loaded. Modules will be loaded by a very simple ramdisk, where a fixed loaded address will refer to a module entry point, and the entry point will be passed a struct of function pointers for communicating with the Manager...
Does anyone have criticisms of this or flaws in design or ideas for this?