Skip to content
Snippets Groups Projects
Commit 5ab868fd authored by Robert Morris's avatar Robert Morris
Browse files

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

parent 789b508d
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ void ...@@ -41,7 +41,7 @@ void
mainc(void) mainc(void)
{ {
cprintf("\ncpu%d: starting xv6\n\n", cpu->id); cprintf("\ncpu%d: starting xv6\n\n", cpu->id);
kvmalloc(); // initialze the kernel page table kvmalloc(); // initialize the kernel page table
pinit(); // process table pinit(); // process table
tvinit(); // trap vectors tvinit(); // trap vectors
binit(); // buffer cache binit(); // buffer cache
......
...@@ -21,6 +21,7 @@ int dup(int); ...@@ -21,6 +21,7 @@ int dup(int);
int getpid(); int getpid();
char* sbrk(int); char* sbrk(int);
int sleep(int); int sleep(int);
int uptime();
// ulib.c // ulib.c
int stat(char*, struct stat*); int stat(char*, struct stat*);
......
...@@ -375,8 +375,9 @@ vminit(void) ...@@ -375,8 +375,9 @@ vminit(void)
lcr3(PADDR(kpgdir)); lcr3(PADDR(kpgdir));
cr0 = rcr0(); cr0 = rcr0();
cr0 |= CR0_PE|CR0_PG|CR0_AM|CR0_WP|CR0_NE|CR0_TS|CR0_EM|CR0_MP; // cr0 |= CR0_PE|CR0_PG|CR0_AM|CR0_WP|CR0_NE|CR0_TS|CR0_EM|CR0_MP;
cr0 &= ~(CR0_TS|CR0_EM); // cr0 &= ~(CR0_TS|CR0_EM);
cr0 |= CR0_PG | CR0_WP;
lcr0(cr0); lcr0(cr0);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment