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
int getpid();
char* sbrk(int);
int sleep(int);
+int uptime();
// ulib.c
int stat(char*, struct stat*);
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);
}