Browse Source

Panic if there is no MP table

The code assumes, from the earliest stages, that apicbase
has been set. Right now, it's only set in the mp table parser.

The result is that there are obscure failures if no _MP_ is found.

We need to drag this code base into the third millenium but at least
for now make an error that is useful, instead of just a panic on
referencing address 0x20.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Ronald G. Minnich 7 years ago
parent
commit
c992900d7f
1 changed files with 3 additions and 2 deletions
  1. 3 2
      sys/src/9/amd64/mp.c

+ 3 - 2
sys/src/9/amd64/mp.c

@@ -419,8 +419,9 @@ mpsinit(int maxcores)
 	_MP_ *mp;
 	PCMP *pcmp;
 
-	if((mp = sigsearch("_MP_")) == nil)
-		return;
+	if((mp = sigsearch("_MP_")) == nil) {
+		panic("NO _MP_ table");
+	}
 	if(DBGFLG){
 		DBG("_MP_ @ %#p, addr %#ux length %ud rev %d",
 			mp, l32get(mp->addr), mp->length, mp->revision);