My overall design is in the attached picture, i'm not too sure what it would be classed as, but it could be a modular kernel.
Basic principles are:
- The kernel has basic drivers, caches debug information, and will load drivers for all detected hardware.
- The drivers will run in ring 1, to provide protection to the kernel.
- User space apps use syscalls AND software interrupts to interact with the kernel and drivers, and all drivers use syscalls to register an interaction with the debug system in the kernel.
- The kernel has total power over everything, and is able to terminate anything that may have gone wrong for any reason. Any hanging apps will be forced to quit after ~15 secs of unresponsive activity.
- Drivers will be trusted apps, but activity checks will be made just as with userspace apps.
I'm considering restarting from scratch, due to messy code, in-comprehensible source tree and it makes things simpler.
my idea: