M pc/archgeneric.c => pc/archgeneric.c +1 -0
@@ 59,6 59,7 @@ static X86type x86type[] =
{ 5, 4, 23, "P55C MMX", },
{ 5, 7, 23, "P54C VRT", },
{ 6, 1, 16, "PentiumPro", },/* determined by trial and error */
+ { 6, 3, 16, "PentiumII", }, /* determined by trial and error */
{ 3, -1, 32, "386", }, /* family defaults */
{ 4, -1, 22, "486", },
M pc/dat.h => pc/dat.h +3 -0
@@ 167,6 167,9 @@ struct Mach
int load;
int intr;
+ ulong spuriousintr;
+ ulong lastintr;
+
int loopconst;
int cpumhz;
M pc/devata.c => pc/devata.c +0 -5
@@ 1820,11 1820,6 @@ retry:
cp->count, cp->status, cp->error);
error(Eio);
}
-{ int i;
- for(i = 0; i < 18; i++)
- print("%2.2uX ", buf[i]);
- print("\n");
-}
cp->len = 8;
cp->count = 0;
M pc/trap.c => pc/trap.c +16 -6
@@ 121,8 121,6 @@ char *excname[] = {
[18] "machine check",
};
-static int nspuriousintr;
-
/*
* All traps come here. It is slower to have all traps call trap() rather than
* directly vectoring the handler. However, this avoids a lot of code duplication
@@ 132,10 130,11 @@ static int nspuriousintr;
void
trap(Ureg* ureg)
{
- int v, user;
+ int i, v, user;
char buf[ERRLEN];
Irqctl *ctl;
Irq *irq;
+ Mach *mach;
user = 0;
if((ureg->cs & 0xFFFF) == UESEL){
@@ 149,6 148,8 @@ trap(Ureg* ureg)
m->intr++;
if(ctl->isr)
ctl->isr(v);
+ if(v >= VectorPIC && v <= MaxVectorPIC)
+ m->lastintr = v-VectorPIC;
}
for(irq = ctl->irq; irq; irq = irq->next)
@@ 171,9 172,18 @@ trap(Ureg* ureg)
* the corresponding bit in the ISR isn't set.
* In fact, just ignore all such interrupts.
*/
- if(nspuriousintr < 2)
- print("spurious interrupt %d\n", v-VectorPIC);
- nspuriousintr++;
+ print("cpu%d: spurious interrupt %d, last %d",
+ m->machno, v-VectorPIC, m->lastintr);
+ for(i = 0; i < 32; i++){
+ if(!(active.machs & (1<<i)))
+ continue;
+ mach = MACHP(i);
+ if(m->machno == mach->machno)
+ continue;
+ print(": cpu%d: last %d", mach->machno, mach->lastintr);
+ }
+ print("\n");
+ m->spuriousintr++;
return;
}
else{