PowerPC PVR version bug (G4 etc.)
Matt Sealey
matt at genesi-usa.com
Mon Oct 31 10:38:50 EST 2005
There is a small, innocuous but annoying processor version reporting bug.
/proc/cpuinfo for my 1Ghz 7447 says
revision : 0.1 (pvr 8002 0101)
In fact the processor is version 1.1. You can see it is properly encoded
but the macro used to decode it is (in asm-ppc/reg.h):
#define PVR_MAJ(pvr) (((pvr) >> 4) & 0xF) /* Major revision field */
#define PVR_MIN(pvr) (((pvr) >> 0) & 0xF) /* Minor revision field */
When Freescale processors are detected, it sets maj and min to the results
of these macros.
Then it prints:
seq_printf(m, "revision\t: %hd.%hd (pvr %04x %04x)\n",
maj, min, PVR_VER(pvr), PVR_REV(pvr));
Obviously for standalone Freescale processors, at least this is plain wrong;
the correct shift is >> 8 for the major revision field. There is a comment
above the PVR_ macros that this is an IBM encoding scheme, so..
Any chance of a minor fix for this? It will affect every G4 processor ever
made which is a lot of chips in a lot of machines, and for systems that can
use a 7447, 7447A, 7448 there are two or three PVRs (7448 especially which
has a 1.1 and a 2.1 version) that can produce a 0.1 result which may cause
problems if someone accidentally decides to grep that string and ignore the
PVR.
As I said it's innocuous but it's there.
Thanks :)
--
Matt Sealey <matt at genesi-usa.com>
Manager, Genesi, Developer Relations
More information about the Linuxppc-dev
mailing list