From 3341e30f6e080c93e61e60410052bc7290dd7e16 Mon Sep 17 00:00:00 2001 From: rsc Date: Tue, 28 Aug 2007 04:13:24 +0000 Subject: nit --- main.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 3508ecc..308541b 100644 --- a/main.c +++ b/main.c @@ -5,9 +5,7 @@ #include "proc.h" #include "x86.h" -extern char edata[], end[]; - -void bootothers(void); +static void bootothers(void); // Bootstrap processor starts running C code here. int @@ -15,6 +13,7 @@ main(void) { int i; static volatile int bcpu; // cannot be on stack + extern char edata[], end[]; // clear BSS memset(edata, 0, end - edata); @@ -65,7 +64,6 @@ mpmain(void) idtinit(); lapic_init(cpu()); setupsegs(0); - cpuid(0, 0, 0, 0, 0); // memory barrier cpus[cpu()].booted = 1; @@ -76,7 +74,7 @@ mpmain(void) scheduler(); } -void +static void bootothers(void) { extern uchar _binary_bootother_start[], _binary_bootother_size[]; @@ -91,7 +89,7 @@ bootothers(void) if(c == cpus+cpu()) // We've started already. continue; - // Set target %esp, %eip + // Fill in %esp, %eip and start code on cpu. *(void**)(code-4) = c->mpstack + MPSTACK; *(void**)(code-8) = mpmain; lapic_startap(c->apicid, (uint)code); -- cgit v1.2.3