JOEL4: added invalid sysenter handler

It's called syscall_handler but its actually for the SYSENTER mechanism. I added
rudimentary bounds checking on the array to make sure we are not trying to jump
to a function that doesn't exist in the table. I call this rudimentary because
the index is hard-coded, and will not update automatically when more handlers are
added to the table. I don't expect many handlers to be added to the table over
time (should be fairly static based on the L4 API and possible additions) however
it's always nicer when numbers are defined in a single place wherever possible
and not spread out across several files, including an assembly file in this case.

I also found the bug that was causing the jump to an invalid location (which is
why I added the bounds checking in the first place). The bug was caused by my
trying to update the eax register with an input constraint that should read from
a constant. I tried setting the constraint to "aI" but apparently that is not
correct. I still don't know if this is possible, but I ended up doing it the
old fashioned way (mov $constant, %eax) which seems to work fine. I will have to
learn more about these inline assembler constraints, and possibly update the
code if there is a better way to do this.

Signed-off-by: Joel Nider <joel@nider.org>
JOEL4: removed the old definition of BootInfo

The new definition is now in the l4.h header, as it is part of the L4 spec.

Signed-off-by: Joel Nider <joel@nider.org>
JOEL4: removed BootInfo as parameter to root task

Originally I tried to stuff the BootInfo into the stack of the root task
forcefully from the kernel. It was a horrible hack that finally fell apart
once I built with -O2, since the stack frame looks different. This caused
me to look for an alternative, which led me to discover that there is room
in the KIP for exactly this purpose.  How nice - I now use the KIP the way
it was designed, and saved myself a lot of trouble.

Signed-off-by: Joel Nider <joel@nider.org>
JOEL4: removed unused comments

A long time ago I had some problems with k_printf() and had added some
comments showing the disassembly to ease debugging. These comments are no
longer required, and they just look ugly, so I removed them. At the same
time I improved the checking of input parameters to k_printf.

Signed-off-by: Joel Nider <joel@nider.org>
JOEL4: build with O2 as a default configuration

Time to build some decent code, with proper optimizations. The code
compiles and runs with O2, although I'm not completely convinced we have
seen the last of the bugs exposed by optimization.

Signed-off-by: Joel Nider <joel@nider.org>