summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/main.c b/main.c
index 731e429..e5b7d64 100644
--- a/main.c
+++ b/main.c
@@ -22,7 +22,6 @@ main(void)
mpinit(); // detect other processors
lapicinit(); // interrupt controller
seginit(); // segment descriptors
- cprintf("\ncpu%d: starting xv6\n\n", cpunum());
picinit(); // another interrupt controller
ioapicinit(); // another interrupt controller
consoleinit(); // console hardware
@@ -31,7 +30,7 @@ main(void)
tvinit(); // trap vectors
binit(); // buffer cache
fileinit(); // file table
- ideinit(); // disk
+ ideinit(); // disk
if(!ismp)
timerinit(); // uniprocessor timer
startothers(); // start other processors
@@ -54,9 +53,9 @@ mpenter(void)
static void
mpmain(void)
{
- cprintf("cpu%d: starting\n", cpunum());
+ cprintf("cpu%d: starting %d\n", cpuid(), cpuid());
idtinit(); // load idt register
- xchg(&cpu->started, 1); // tell startothers() we're up
+ xchg(&(mycpu()->started), 1); // tell startothers() we're up
scheduler(); // start running processes
}
@@ -78,7 +77,7 @@ startothers(void)
memmove(code, _binary_entryother_start, (uint)_binary_entryother_size);
for(c = cpus; c < cpus+ncpu; c++){
- if(c == cpus+cpunum()) // We've started already.
+ if(c == mycpu()) // We've started already.
continue;
// Tell entryother.S what stack to use, where to enter, and what