Add initial skeleton.

The _very_ minimal code to get x86 and arm to boot to kernel_main.

Build with:
  make ARCH=[x86|arm] CROSS_COMPILE=<compiler_prefix>

Defaults to ARCH := x86, CROSS_COMPILE = '' (nothing).

Signed-off-by: Tim Detwiler <timdetwiler@gmail.com>
Change-Id: Ifb8070b80eea458b60ac2efd458c1c5b40cb64d2
Add boot targets to arch makefiles.

Add the target 'boot' and 'gdb-boot' to the x86 and arm makefiles. These
target will build a kernel, and boot using qemu.

On x86 this requires a simple grub wrapper/floppy disk image, while arm
can just pass the elf to qemu via '-kernel'.

gdb-boot will tell qemu to wait for a debugger to attach before
executing any code.

Change-Id: I2454a54696f2e8532911c13a40af5c960390514d
Signed-off-by: Tim Detwiler <timdetwiler@gmail.com>
Add IO interface and stdint types.

Expect architectures to provide an "arch/types.h" header file that
provides stdint types, as well as an ioaddr_t type that defines the size
of an io address.

timix/io.h defines the functions that kernel code will use to interface
with a peripheral. This header also provides a read/write memory barrier
interface (rmb/wmb). This is not used on x86 since peripherals are
accessed over in/out instructions, however ARM memory-mapped peripherals
will require these barriers for correct behavior.

Signed-off-by: Tim Detwiler <timdetwiler@gmail.com>
Change-Id: I3624d0586ab4d73740fee1e24479cf85f24e3fa4
Pull in more modules.

Add new headers:
  * atomic.h   - Atomic/xchg ops.
  * stddef.h   - NULL
  * compiler.h - MUST_CHECK
  * variable_queue.h
  * assert.h   - assert macro
  * panic.h    - panic()

Pull in mutex from timix, slightly modified (since timix mutexes used
TCP pointers as the "lock" value.

Signed-off-by: Tim Detwiler <timdetwiler@gmail.com>
Change-Id: I2fc1e630c4c4775803ff6af0a332070e69c9ca41
x86: add multiboot code.

The bootloader passes a pointer to a "Multiboot Info Structure" in
register ebx. Pass this structure to the c_entry function in x86 and add
structure definitions in x86/include/multiboot.h

Signed-off-by: Tim Detwiler <timdetwiler@gmail.com>
Change-Id: I29dce45410923f2cef541d443e5b5492e08c5b06
arm: Add atag code.

The bootloader will pass system information to the kernel using ATAG
structures, add header and support code to pass the atag pointer to the
kernel.

Change-Id: I80475d2c8c656f519fde08a201d2dbe142233684
Signed-off-by: Tim Detwiler <timdetwiler@gmail.com>