summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2010-08-30 17:28:39 -0400
committerFrans Kaashoek <[email protected]>2010-08-30 17:28:39 -0400
commit791d81cadeb3b30ad6ec67c61086c6747f3d5ca2 (patch)
tree989981e6fce1479281968cf07dc932ec061097a9 /vm.c
parent156b307e28c52597fddea68baa5ca1f052520657 (diff)
parent3c9ff073e09abf15f241aa1812e04d8587c9925d (diff)
downloadxv6-labs-791d81cadeb3b30ad6ec67c61086c6747f3d5ca2.tar.gz
xv6-labs-791d81cadeb3b30ad6ec67c61086c6747f3d5ca2.tar.bz2
xv6-labs-791d81cadeb3b30ad6ec67c61086c6747f3d5ca2.zip
Merge branch 'page' of git+ssh://amsterdam.csail.mit.edu/home/am0/6.828/xv6 into page
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/vm.c b/vm.c
index 98ac108..262f079 100644
--- a/vm.c
+++ b/vm.c
@@ -369,14 +369,13 @@ kvmalloc(void)
// Turn on paging.
void
-vminit(void)
+vmenable(void)
{
uint cr0;
- lcr3(PADDR(kpgdir));
+ switchkvm(); // load kpgdir into cr3
cr0 = rcr0();
- cr0 |= CR0_PE|CR0_PG|CR0_AM|CR0_WP|CR0_NE|CR0_TS|CR0_EM|CR0_MP;
- cr0 &= ~(CR0_TS|CR0_EM);
+ cr0 |= CR0_PG;
lcr0(cr0);
}