From: David Daney <ddaney@caviumnetworks.com>
To: Robert Millan <rmh@gnu.org>
Cc: Aurelien Jarno <aurelien@aurel32.net>,
Ralf Baechle <ralf@linux-mips.org>,
linux-mips@linux-mips.org
Subject: Re: [PATCH] Enable AT_PLATFORM for Loongson 2F CPU
Date: Mon, 08 Nov 2010 14:50:43 -0800 [thread overview]
Message-ID: <4CD87EC3.2060405@caviumnetworks.com> (raw)
In-Reply-To: <AANLkTikCD_HjshMiP0ubyYZkPDoRb8nkFScUPE3GB2F4@mail.gmail.com>
On 11/08/2010 02:27 PM, Robert Millan wrote:
> 2010/11/8 David Daney<ddaney@caviumnetworks.com>:
>> I seems weird to me that you cannot get this information from the PRId
>> register. Perhaps the documentation is defective.
>
> Yes, I agree it's really shortsighted of them, but I don't
> see any way around it.
>
>> The Chinese version of the Loongson2E user guide seems to say something
>> about the two lower nibbles of the PRId, but being a non-chinese reader, I
>> have no idea if it would be relevant.
>>
>> I would think that the low order bits of the register can reliably
>> differentiate these two parts.
>
> There are English versions for both 2E and 2F. See page 66
> of the Loongson 2F document:
>
> http://dev.lemote.com/files/resource/documents/Loongson/ls2f/Loongson2FUserGuide.pdf
>
> <quote>
> The revision number can distinguish some chip revisions, however there
> is no guarantee
> that changes to the chip will necessarily be reflected in the PRId
> register, or that changes to
> the revision number necessarily reflect real chip changes. For this
> reason, software should
> not rely on the revision number in the PRId register to characterize the chip.
> </quote>
>
> Page 72 of the Loongson 2E document
> (http://www.lemote.com/upfiles/godson2e-user-manual-V0.6.pdf) has the
> same text.
>
> In both documents, the lower byte is defined as "Revision number",
> and its value is 0x02 (for both 2E and 2F).
>
> If you'd rather not assume the docs are correct, I can test if
> my Yeeloong (Loongson 2F) has 0x02, but then in case it's
> something higher, would you be willing to assume:
>
> rev<= 0x02 --> 2E
> rev> 0x02 --> 2F
>
No, I refuse to assume that.
Look at the description of the register in this document:
http://dev.lemote.com/files/resource/documents/Loongson/ls2e/godson2e.user.manual.pdf
On page 49, it says that bits 0-3 contain the minor version number and
bits 4-7 are the major version number (according to a workmate that
reads Chinese).
I don't know for certain, but it seems plausible that the 2E and 2F will
differ in bits 4-7, and bits 0-3 can be ignored.
> or similar logic? This seems risky if we take into account
> that there's no guarantee from the vendor.
>
next prev parent reply other threads:[~2010-11-08 22:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-04 12:18 [PATCH] Enable AT_PLATFORM for Loongson 2F CPU Robert Millan
2010-11-04 16:44 ` David Daney
2010-11-04 17:33 ` Aurelien Jarno
2010-11-04 18:43 ` Robert Millan
2010-11-04 19:11 ` David Daney
2010-11-04 19:29 ` Ralf Baechle
2010-11-07 12:30 ` Robert Millan
2010-11-08 19:13 ` David Daney
2010-11-08 22:27 ` Robert Millan
2010-11-08 22:50 ` David Daney [this message]
2010-11-08 23:02 ` Robert Millan
2010-11-09 9:48 ` wu zhangjin
2010-11-09 12:24 ` Robert Millan
2010-11-09 15:40 ` Ralf Baechle
2010-11-11 14:47 ` Robert Millan
2010-11-15 23:50 ` Robert Millan
2010-11-15 23:59 ` David Daney
2010-11-22 12:44 ` Robert Millan
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=4CD87EC3.2060405@caviumnetworks.com \
--to=ddaney@caviumnetworks.com \
--cc=aurelien@aurel32.net \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=rmh@gnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.