Cosmetics: there are exceptions to the PVR major/minor rule.

This commit is contained in:
kleink 2002-05-31 20:10:45 +00:00
parent 10e4eb9d0b
commit 0bf753ef67
1 changed files with 10 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu_subr.c,v 1.15 2002/05/31 15:04:14 kleink Exp $ */
/* $NetBSD: cpu_subr.c,v 1.16 2002/05/31 20:10:45 kleink Exp $ */
/*-
* Copyright (c) 2001 Matt Thomas.
@ -347,8 +347,15 @@ cpu_identify(char *str, size_t len)
asm ("mfpvr %0" : "=r"(pvr));
vers = pvr >> 16;
maj = (pvr >> 8) & 0xff;
min = (pvr >> 0) & 0xff;
switch (vers) {
case MPC7410:
min = (pvr >> 0) & 0xff;
maj = min <= 4 ? 1 : 2;
break;
default:
maj = (pvr >> 8) & 0xff;
min = (pvr >> 0) & 0xff;
}
for (cp = models; cp->name != NULL; cp++) {
if (cp->version == vers)