joel4: added debugging info to build

Each file is now built with DWARF2 debugging information.  This allows
debugging tools (such as objdump) to interleave source and assembly level
dumps.
joel4: improvement in page mapping for root task

Not 100% yet, but kernel no longer triple faults.  We can now load
pages, and start execution.  There is a problem still with logical
mappings of physical pages, in part because this is for the root task
which is a special case.  We need to pick a logical execution address
and stick to it.
joel4: script to create symbol listing for bochs

Bochs debugger is still the easiest to use for problems with page
tables.  This script generates a symbol listing (mapping between
symbol name and addresses) in a format that bochs can load.  That
way, during debugging bochs can show which function we are executing.
joel4: can make syscall

The root task pages have been mapped, and we can now access code in
the first userspace task.  To start, we must test the syscall
mechanism, which allows userspace code to call a kernel function.
The call works (we can debug print a character) but the return path
(sysexit) doesn't work yet.
joel4: create 32-bit target executable on 64-bit host

Added flags to specifically create a 32-bit executable.  This is to fix
a problem encountered when building on a 64-bit host (Ubuntu 12.04 64-bit).
I have not retested on a 32-bit host, since I currently don't have one
running.
Merge pull request #18 from jnider/dev

Dev
Adding new files for intel-specific CPU features

Helps identify (CPUID) Intel CPUs and features
rudimentary top-level makefile

Added the beginnings of a top-level makefile.  This can be used to build
the kernel and the entire system image without having to change directories.

Signed-off-by: Joel Nider <joel@definiware.com>
joel4: automatic build versioning

Added a shell script and a separate header file to keep track of the kernel
version.  The build number is automatically incremented before each build,
and the header is updated with the new number.  When the file is compiled,
the define is made available to the kernel, and is printed on boot.

Signed-off-by: Joel Nider <joel@definiware.com>
joel4: make segment macro safer

By adding bitmasks for each field, the macro used to build a segment descriptor
is made safer by eliminating potential overflows between fields.

Signed-off-by: jnider <joel@nider.org>
joel4: improved implementation of L4_DebugPutChar

This is the proper implementation for the syscall.  It may still be
improved further in the future by passing capabilities and reducing
unneeded cycles.

Signed-off-by: jnider <joel@nider.org>
joel4: increment version number in Makefile

The Makefile will now call a script before each build to increment the
kernel's version number.

Signed-off-by: jnider <joel@nider.org>
joel4: separating some ia32-specific features

The whole idea of different platforms needs a lot of work.  This is a (small)
step in the right direction.  This change also includes some syscall fixes.

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

Added GRUB2 as an option for a bootloader (alongside SYSLINUX/ISOLINUX).  This
was done primarily to gain the option of adding a kernel module (init.cpio).
I couldn't figure out how to do this with ISOLINUX, even with their extensive
5-line wiki.  GRUB2 is also a major pain, but at least I already know it.
Seriously - who thought 'grub-mkrescue' was a good name for burning an ISO?
I could understand if this -also- made an ISO, but it seems that it is the
-only- way to make an ISO.

Signed-off-by: Joel Nider <joel@nider.org>
joel4: data section at wrong address

Fixed a bug in the loader script that was putting the data for the root task
at the wrong logical (virtual) address.

Signed-off-by: jnider <joel@nider.org>
joel4: modified file permissions on syscall.c

For consistency, the file permissions should be 664 on each file.

Signed-off-by: jnider <joel@nider.org>
joel4: added boot info and init.cpio support

Information needed for system initialization by the root task is now passed
by the kernel as a parameter to the root task.  This is a special case, and
the format should probably be changed again in the future once there is a
more standard main for a new task (like argc/argv).

Also, the init.cpio file is loaded by the boot loader into physical memory.
Now the kernel copies it to a new location mapped into the logical space of
the root task, so the root task can use the file.

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

Dev
Build 2043

Booted on VirtualBox 4.1.22

Signed-off-by: jnider <joel@nider.org>
Merge branch 'master' into test

Conflicts:
	kernel/joel4/tools.mk

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