diff options
author | Robert Morris <[email protected]> | 2017-08-08 13:27:06 -0400 |
---|---|---|
committer | Robert Morris <[email protected]> | 2017-08-08 13:27:06 -0400 |
commit | 14270288b7e5327832cdf6a8d9da52ef58fce652 (patch) | |
tree | b604cb49fb049a14966418eda4589cd1271f8e53 /main.c | |
parent | aba8423c4a5ae01828040d04f668f07ec544dcd0 (diff) | |
parent | 825ce074b10a0e1f63fd3a1fe245220d04054e0a (diff) | |
download | xv6-labs-14270288b7e5327832cdf6a8d9da52ef58fce652.tar.gz xv6-labs-14270288b7e5327832cdf6a8d9da52ef58fce652.tar.bz2 xv6-labs-14270288b7e5327832cdf6a8d9da52ef58fce652.zip |
Merge branch 'master' of g.csail.mit.edu:xv6-dev
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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 |