From: "Matt Sealey" <matt@genesi-usa.com>
To: <linuxppc-dev@ozlabs.org>
Subject: PowerPC PVR version bug (G4 etc.)
Date: Sun, 30 Oct 2005 17:38:50 -0600 [thread overview]
Message-ID: <E1EWHES-0004Ex-H3@mail.pegasosppc.com> (raw)
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
reply other threads:[~2005-10-31 0:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1EWHES-0004Ex-H3@mail.pegasosppc.com \
--to=matt@genesi-usa.com \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).