#include "types.h" #include "param.h" #include "mmu.h" #include "proc.h" #include "defs.h" #include "x86.h" #include "traps.h" #include "syscall.h" #include "elf.h" #include "param.h" #include "spinlock.h" extern char edata[], end[]; // Bootstrap processor starts running C code here. // This is called main0 not main so that it can have // a void return type. Gcc can't handle functions named // main that don't return int. Really. void main0(void) { int i; static int bcpu; // cannot be on stack // clear BSS memset(edata, 0, end - edata); // Prevent release() from enabling interrupts. for(i=0; i