summaryrefslogtreecommitdiff
path: root/mp.c
diff options
context:
space:
mode:
authorkaashoek <kaashoek>2006-09-07 01:37:58 +0000
committerkaashoek <kaashoek>2006-09-07 01:37:58 +0000
commitf70172129c94e4d53b56fc10a7d859679b581bd2 (patch)
treef5c95ac0b9eea765d36ab0cb0c53573e2dfa0f9d /mp.c
parentf9bc4452b5437570f1709430e9364cc3e323cf3a (diff)
downloadxv6-labs-f70172129c94e4d53b56fc10a7d859679b581bd2.tar.gz
xv6-labs-f70172129c94e4d53b56fc10a7d859679b581bd2.tar.bz2
xv6-labs-f70172129c94e4d53b56fc10a7d859679b581bd2.zip
run without lapic and ioapic, if they are not present
if no lapic available, use 8253pit for clock now xv6 runs both on qemu (uniprocessor) and bochs (uniprocessor and MP)
Diffstat (limited to 'mp.c')
-rw-r--r--mp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mp.c b/mp.c
index f2bb142..7a0a676 100644
--- a/mp.c
+++ b/mp.c
@@ -30,6 +30,7 @@ static char *buses[] = {
};
struct cpu cpus[NCPU];
+int ismp;
int ncpu;
uchar ioapic_id;
@@ -124,8 +125,11 @@ mp_init(void)
uchar byte;
ncpu = 0;
- if((r = mp_detect()) != 0)
+ if((r = mp_detect()) != 0) {
return;
+ }
+
+ ismp = 1;
// Run through the table saving information needed for starting
// application processors and initialising any I/O APICs. The table
@@ -165,7 +169,7 @@ mp_init(void)
p += sizeof(struct mpie);
continue;
default:
- cprintf("mpinit: unknown PCMP type 0x%x (e-p 0x%x)\n", *p, e-p);
+ cprintf("mp_init: unknown PCMP type 0x%x (e-p 0x%x)\n", *p, e-p);
while(p < e){
cprintf("%uX ", *p);
p++;