Hi Andrew, > I then attempted to modify one of the sample applications (grabmem), > and I discovered that I could write directly to the screen buffer (0xb8000), > which shows the application does load (but it is strange since as far as I > know, printf also writes directly to the screen buffer, but printf does not > appear to be doing anything).
If I'm not mistaken, both the kernel and the user implementation of printf write to the serial port and not to the screen buffer by default. For the kernel, you can change that behavior in the Debugger section of the configuration menu by changing 'Kernel Debugger console' from 'Serial Port' to 'Keyboard'. > Also at the same time I discovered the system > hangs during any attempt to communicate with sigma0 (through the functions > provided in l4/sigma0.h). Once you have proper debugger output, you could enable some tracepoints to find out what's going on here. A hanging system at that early stage might for example be caused by incorrectly handled pagefaults. > I also noticed, in the kernel's build directory there is an include > directory. However I don't see these files being referenced anywhere by the > user code. Not sure if I understand your problem here. The generated header files are just used for building the kernel, not for building userlevel stuff. > Also, I could write directly to 0xb8000 from the roottask. From my > understanding, only sigma0 was suppose to have all physical memory allocated > to it at boot, therefore for my roottask (or any other thread) to access the > physical memory at this location I would need it mapped into the thread's > local address space. So could some one please explain the memory protection > and clear this up? Also, I'm unsure of at what location in virtual memory the > kernel has been mapped. When a pagefault occurs in the roottask, a pagefault IPC is sent to Sigma0. If the pagefault occurred on a page of conventional memory (*), Sigma0 will simply hand out the appropriate page (so the kernel will map it into the faulting thread's address space), but only once. Thus, the roottask or some kind of memory manager could/should simply grab all required memory at startup and then implement more sophisticated pagefault handling policies. (*) Note that the framebuffer is not part of the conventional memory pool, but it seems that Sigma0 hands it out anyway when it's just touched. HTH, Philipp