mm: paging: pte: Added page table, and entry

There now are 2 new structures called pte and pte_shadow.  The pte will
be the page table used by the CPU. pte_shadow will be the table used by
the kernel to figure out where to reference the actal page tables.

The structure of pte now replaces the old plain array,  that was in use
untill  now.  This  will  eventually  become a complete  rewrite of the
existing paging administration.

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>
mm: paging: pte: Add stubs

In this commit new function stubs are added, in order to administer the
pte's. Comments included.

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>
mm: paging: pte: Add sourcefile

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>
mm: pte: Add init function

Some numbers  were cleaned  and  an intialisation  function for X86 are
added in this commit.

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>
mm: pte: Add call

The call to pte_init was added.

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>
mm: pte: Add mapping code

Added the map function, or at least, a part of it.

Also added an entry setting function. Finished, but not tested.

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>
mm: pte: Add pte_map

An architecture independent  implementation  was made for pte_map. This
means that  now, pages can  be mapped,  regardless  of the architecture
it is on.

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>
mm: pte: Improve error checking

Improved on error checking at the beginning of the function.

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>
mm: pte: Rewrite pte_init

pte_init: This was written to support x86 only, using the new code it is
multi platform compatible.

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>
make: Fix building issue on fedora 16 and 17

Put the missing arguments in CFLAGS in order to keep fedora happy!

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>
Make: Add flexibility to the test command

There now is  a variable  called QEMU  which can be changed to suit the
needs of that partilar system, by the user.

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>
Merge remote-tracking branch 'github/master'
Little hack to make $ make test work on Fedora without setting an alias

If we're building on Fedora use qemu-system-i386 instead of qemu.
mm: pte: Add pte_map and pte_unmap function

The pte_map function is  implemented using a loop,  which cycles untill
the page  is set.  The pte_unmap is  a  little complexer,  and requires
a recursive function, by the name of pte_runmap.

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>
Merge branch 'master' into pte

The master branch  has a couple  of fixes that  are required  to repair
compilation on some systems.
Merge branch 'testing' into pte

Conflicts:
	src/Makefile
	src/arch/x86/boot/init.c
	src/mm/paging/Makefile
mm: pte: Add comments and fix bug

Added brief discriptions of each function in the pte system.

Fixed bug  in the recursive unmap  function in the  pte system.  It was
faulty because it split up the  virtual address in the wrong direction.
This is solved by subtracting the depth from the maximum depth.

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>
mm: pte: Add get_phys code

pte_get_phys now implemented to use  the pte system for determining the
physical address of the virtual pointee.

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>
mm: pte: Add testing code

Added a tree dumping function for scanning the pte structures.

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>
mm: pte: Add basic test and call it from init.c

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>