While thinking about the idea of using a micro-kernel, the idea of introducing a special 'kernel mode' came about. However, unlike other processors, this kernel mode does not expose any special instructions. The idea is to switch the instruction execution from external code to internal code.
When the processor first boots up, it should start by running the boot-loader, which is located internal to the core. This boot-loader will then run a memory-test routine to ensure that memory is not faulty. It may also do a couple of other things, like wake up internal peripherals and clear internal registers and what nots.
Then, it leaves the kernel-mode and executes the user software, located in external memory, starting with the reset vector. At which point, the system continues to run normally. However, there is a lot of power in writing some very compact and useful kernel-mode stuff. Depending on how much space there is, it might even be possible to squeeze in a micro-kernel or something else.
Anyway, this is just another idea. It could be easily implemented by using a branch to an un-aligned address or a special 'return from kernel' instruction.
0 Comments