JOEL4: added l4.c

Added another source file to hold the implementation of helper functions as
part of L4. These are generic, and not system calls.

Signed-off-by: Joel Nider <joel@nider.org>
JOEL4: handle invalid syscall better

When an invalid syscall index is used, pass it as a parameter to the
handling function for easier debugging.

Signed-off-by: Joel Nider <joel@nider.org>
JOEL4: updated KIP information

Added definitions related to KIP information such as kernel version, and L4
API version. Added a helper function to check the KIP magic number.

Signed-off-by: Joel Nider <joel@nider.org>
JOEL4: added clobber lists in GDT_Load

Two registers were being used in inline assembly functions but the compiler
wasn't being notified. That lead to a problem with a local variable becoming
inaccessible when the code was built with optimizations on.

Signed-off-by: Joel Nider <joel@nider.org>
JOEL4: boot module info in KIP was incorrect

Fixed up some bugs related to the location of the boot module info. There was
some confusion regarding which pointers should be relative to the KIP, and
which should be absolute. I also added some alignment, but there is more work
to be done here yet.

Signed-off-by: Joel Nider <joel@nider.org>
JOEL4: split up user and kernel space L4 interface

Userspace drivers must be able to access the L4 kernel functions for IPC
 etc. To do so, they must be able to link with a library containing the
stub functions. Currently these stub functions are contained in the same
file as their kernelspace counterparts. That doesn't work well when trying
to isolate kernel functionality from userspace functionality since it is
not possible to compile the file with only userspace definitions. Thus,
all of the of the userspace functions have been moved to a separate file
which can be used as a library for linking against userspace drivers and
other applications wishing to access the kernel directly.

Signed-off-by: Joel Nider <joel@nider.org>
JOEL4: moved L4_ThreadControl to a c file

All kernel interface functions are now in C files, as opposed to the original
idea of inline functions in a header. I may revisit this later.

Signed-off-by: Joel Nider <joel@nider.org>
JOEL4: minor corrections while debugging loading

The root task is now able to load a file from a cpio archive, but
only in debug mode.

Signed-off-by: Joel Nider <joel@nider.org>
drivers: added support for joel4.lib

In order for drivers to access the kernel, they must link with a library
providing functions for that access. Only the JOEL4 kernel is supported at
this time.

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

Its not pretty but it probably works. Will be replaced with libc one
day in the (hopefully near) future.

Signed-off-by: Joel Nider <joel@nider.org>
Merge pull request #35 from jnider/dev

Dev