From 21a88fd487177841c882d9017bd9f4476801c6f6 Mon Sep 17 00:00:00 2001 From: kaashoek Date: Thu, 22 Jun 2006 01:28:57 +0000 Subject: checkpoint. booting second processor. stack is messed up, but thanks to cliff and plan 9 code, at least boots and gets into C code. --- main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 07b3862..0a43b85 100644 --- a/main.c +++ b/main.c @@ -8,6 +8,7 @@ #include "syscall.h" extern char edata[], end[]; +extern int acpu; char buf[512]; @@ -16,13 +17,19 @@ main() { struct proc *p; int i; - + + if (acpu) { + cprintf("an application processor\n"); + release_spinlock(&kernel_lock); + while (1) ; + } + acpu = 1; // clear BSS memset(edata, 0, end - edata); cprintf("\nxV6\n\n"); - mpinit(); // multiprocessor + mp_init(); // multiprocessor kinit(); // physical memory allocator tinit(); // traps and interrupts pic_init(); -- cgit v1.2.3