Friday, December 01, 2006

Loading loading loading..

I've figured out a way to build all images (the microkernel + multiple svc tasks, like inittask, roottask etc.) independently, and yet have the microkernel discover about where the other images are loaded at.

Each image during it's build extracts the final LMA of the previous image to be loaded before it. It's linker script then includes this information from an autogenerated lds file.

Finally after each image is built, a bootdesc structure is loaded at the end of all images. The microkernel discovers its address at run-time, reads it and learns about all other images.

The nice thing about all this is that it does not require any special modification of elf images during build time, or any custom loader. A generic elf loader (like the one I use from original l4 project, which is great) should suffice to load all this.

The actual problem in general is to find the time and energy to continue this work alongside work-related work, which is also very brain consuming. I can find the time on evenings, but sometimes not the energy to think and solve puzzles. But it's still fun to do this. At last I am doing something that I really wanted to do rather than others wanted me to do.

To get dynamic stack and heap allocation, correct page fault handling, linking with the incomplete user C library, making the system calls, conforming to L4 specs in register layout of system calls etc. etc. are all achievable but each will take time to think about before implementation, and debugging etc. Hopefully I will find lots of time during my 2 weeks christmas holiday. I had a 1 week holiday in september and that's how actually I got the memory allocators debugged/tested/finished in reasonable time.

0 Comments:

Post a Comment

<< Home