summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.c b/main.c
index 2972b21..47c36cc 100644
--- a/main.c
+++ b/main.c
@@ -22,7 +22,7 @@ main(void)
mpinit(); // detect other processors
lapicinit(); // interrupt controller
seginit(); // segment descriptors
- cprintf("\ncpu%d: starting xv6\n\n", cpu->id);
+ cprintf("\ncpu%d: starting xv6\n\n", cpunum());
picinit(); // another interrupt controller
ioapicinit(); // another interrupt controller
consoleinit(); // console hardware
@@ -54,7 +54,7 @@ mpenter(void)
static void
mpmain(void)
{
- cprintf("cpu%d: starting\n", cpu->id);
+ cprintf("cpu%d: starting\n", cpunum());
idtinit(); // load idt register
xchg(&cpu->started, 1); // tell startothers() we're up
scheduler(); // start running processes
@@ -89,7 +89,7 @@ startothers(void)
*(void**)(code-8) = mpenter;
*(int**)(code-12) = (void *) V2P(entrypgdir);
- lapicstartap(c->id, V2P(code));
+ lapicstartap(c->apicid, V2P(code));
// wait for cpu to finish mpmain()
while(c->started == 0)