xv6

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 5ab868fd905c68a6fc934d2c2df514c9efae6598
parent 789b508d538e6faf635e49f268a4f1f9e9b65f05
Author: Robert Morris <rtm@nephron.lcs.mit.edu>
Date:   Mon, 30 Aug 2010 06:38:58 -0400

set only PG and WP in vminit; the rest don't seem to be needed and are confusing

Diffstat:
Mmain.c | 2+-
Muser.h | 1+
Mvm.c | 5+++--
3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/main.c b/main.c @@ -41,7 +41,7 @@ void mainc(void) { cprintf("\ncpu%d: starting xv6\n\n", cpu->id); - kvmalloc(); // initialze the kernel page table + kvmalloc(); // initialize the kernel page table pinit(); // process table tvinit(); // trap vectors binit(); // buffer cache diff --git a/user.h b/user.h @@ -21,6 +21,7 @@ int dup(int); int getpid(); char* sbrk(int); int sleep(int); +int uptime(); // ulib.c int stat(char*, struct stat*); diff --git a/vm.c b/vm.c @@ -375,8 +375,9 @@ vminit(void) lcr3(PADDR(kpgdir)); 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_PE|CR0_PG|CR0_AM|CR0_WP|CR0_NE|CR0_TS|CR0_EM|CR0_MP; + // cr0 &= ~(CR0_TS|CR0_EM); + cr0 |= CR0_PG | CR0_WP; lcr0(cr0); }