Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc/mpc6xx Cosmetics: there are exceptions to t...



details:   https://anonhg.NetBSD.org/src/rev/5a1924d0019d
branches:  trunk
changeset: 532128:5a1924d0019d
user:      kleink <kleink%NetBSD.org@localhost>
date:      Fri May 31 20:10:45 2002 +0000

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

diffstat:

 sys/arch/powerpc/mpc6xx/cpu_subr.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 8b8924668ef1 -r 5a1924d0019d sys/arch/powerpc/mpc6xx/cpu_subr.c
--- a/sys/arch/powerpc/mpc6xx/cpu_subr.c        Fri May 31 20:01:28 2002 +0000
+++ b/sys/arch/powerpc/mpc6xx/cpu_subr.c        Fri May 31 20:10:45 2002 +0000
@@ -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 @@
 
        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)



Home | Main Index | Thread Index | Old Index