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
Remove root task from kernel build

The root task is now built as a separate object, and is loaded from the
initrd rather than as part of the kernel image. This is in an attempt to
make the linking file cleaner, and design more straightforward as bugs
are encountered while adding new features.

Signed-off-by: Joel Nider <joel@nider.org>
Remove root task from kernel build

The root task is now built as a separate object, and is loaded from the
initrd rather than as part of the kernel image. This is in an attempt to
make the linking file cleaner, and design more straightforward as bugs
are encountered while adding new features.

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

Acts as a physical page allocator for all userspace threads.

Signed-off-by: Joel Nider <joel@nider.org>
mem_manager: add main.c

The main file for the memory manager.  Currently a stub.

Signed-off-by: Joel Nider <joel@nider.org>
user Makefiles: force remove files on clean

'make clean' twice in a row would cause an error trying to remove files
that don't exist.

Signed-off-by: Joel Nider <joel@nider.org>
root task: update include file name

The cpio code is now in cpio.h in the kernel.

Signed-off-by: Joel Nider <joel@nider.org>
gitignore: added *.service and *.driver

All userspace resulting files (drivers and services) should not be added to
git, and should not be seen by git.

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

Dev
Merge pull request #38 from jnider/test

Test