summaryrefslogtreecommitdiff
path: root/mp.c
diff options
context:
space:
mode:
Diffstat (limited to 'mp.c')
-rw-r--r--mp.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/mp.c b/mp.c
index ade8930..79bb0ad 100644
--- a/mp.c
+++ b/mp.c
@@ -12,7 +12,6 @@
#include "proc.h"
struct cpu cpus[NCPU];
-int ismp;
int ncpu;
uchar ioapicid;
@@ -93,13 +92,14 @@ void
mpinit(void)
{
uchar *p, *e;
+ int ismp;
struct mp *mp;
struct mpconf *conf;
struct mpproc *proc;
struct mpioapic *ioapic;
if((conf = mpconfig(&mp)) == 0)
- return;
+ panic("Expect to run on an SMP");
ismp = 1;
lapic = (uint*)conf->lapicaddr;
for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
@@ -127,13 +127,8 @@ mpinit(void)
break;
}
}
- if(!ismp){
- // Didn't like what we found; fall back to no MP.
- ncpu = 1;
- lapic = 0;
- ioapicid = 0;
- return;
- }
+ if(!ismp)
+ panic("Didn't find a suitable machine");
if(mp->imcrp){
// Bochs doesn't support IMCR, so this doesn't run on Bochs.