vmm: move paging setup to the library
authorRonald G. Minnich <rminnich@gmail.com>
Fri, 21 Apr 2017 15:45:00 +0000 (11:45 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 21 Apr 2017 19:03:50 +0000 (15:03 -0400)
commit8dff9e88bf2274f0121ddf4cfa0428fc78d637b0
treeea43a5af3f6e0095cb1e532543e80ee36f82ae53
parent0459746ec175277a5abee1a5db9324b5adec9041
vmm: move paging setup to the library

We create a new function, setup_paging(start, size, debug)
which returns a pointer to the base of page tables (needed
for starting the VM). Since it is just manipulating values
in arrays, and it's almost impossible for it to go wrong,
we print a nice message and bail if anything goes wrong.

Change-Id: I1d5ef0ce1c2a7fed4e21a18bd48ffdac0b3ab0e9
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
tests/vmm/vmrunkernel.c
user/vmm/include/vmm/vmm.h
user/vmm/memory.c
user/vmm/pagetables.c [new file with mode: 0644]