linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* PowerPC PVR version bug (G4 etc.)
@ 2005-10-30 23:38 Matt Sealey
  0 siblings, 0 replies; only message in thread
From: Matt Sealey @ 2005-10-30 23:38 UTC (permalink / raw)
  To: linuxppc-dev


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@genesi-usa.com>
Manager, Genesi, Developer Relations

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-10-31  0:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-30 23:38 PowerPC PVR version bug (G4 etc.) Matt Sealey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).