summaryrefslogtreecommitdiff
path: root/mp.c
diff options
context:
space:
mode:
authorrsc <rsc>2006-07-16 15:50:13 +0000
committerrsc <rsc>2006-07-16 15:50:13 +0000
commitb74f4b57ae48719fca4fc621732b055b2debaf3e (patch)
treec485febec4a42c66783c05690a9bfb5c1b47b07f /mp.c
parentef2bd07ae4cb2e27d62cfdcb7e71d82948fb80ed (diff)
downloadxv6-labs-b74f4b57ae48719fca4fc621732b055b2debaf3e.tar.gz
xv6-labs-b74f4b57ae48719fca4fc621732b055b2debaf3e.tar.bz2
xv6-labs-b74f4b57ae48719fca4fc621732b055b2debaf3e.zip
Keep interrupts disabled during startup.
Diffstat (limited to 'mp.c')
-rw-r--r--mp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mp.c b/mp.c
index 19e18d1..c6e7d3f 100644
--- a/mp.c
+++ b/mp.c
@@ -191,6 +191,8 @@ mp_bcpu(void)
return bcpu-cpus;
}
+extern void mpmain(void);
+
void
mp_startthem()
{
@@ -205,7 +207,7 @@ mp_startthem()
if (c == cpu()) continue;
cprintf ("starting processor %d\n", c);
*(unsigned *)(APBOOTCODE-4) = (unsigned) (cpus[c].mpstack) + MPSTACK; // tell it what to use for %esp
- *(unsigned *)(APBOOTCODE-8) = (unsigned)&main; // tell it where to jump to
+ *(unsigned *)(APBOOTCODE-8) = (unsigned)mpmain; // tell it where to jump to
lapic_startap(cpus[c].apicid, (uint32_t) APBOOTCODE);
}
}