linux-mips
[Top] [All Lists]

Re: [PATCH] Enable AT_PLATFORM for Loongson 2F CPU

To: Robert Millan <rmh@gnu.org>
Subject: Re: [PATCH] Enable AT_PLATFORM for Loongson 2F CPU
From: David Daney <ddaney@caviumnetworks.com>
Date: Mon, 08 Nov 2010 11:13:46 -0800
Cc: Aurelien Jarno <aurelien@aurel32.net>, Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
In-reply-to: <1289133059.1547.0@thorin>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1289133059.1547.0@thorin>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10
On 11/07/2010 04:30 AM, Robert Millan wrote:
El 04/11/10 19:43:08, en/na Robert Millan va escriure:
David Daney a écrit :
You are claiming that all loongson2 are loongson-2f.  Is that
really true?  Or are there other types of loongson2 that are not
loongson-2f?

I'll figure out how to distinguish them and send a new patch.

I looked at details about CPU identification, and this
seems to be broken.

See the the notes about PRId in pages 72 and 66, respectively:
http://dev.lemote.com/files/resource/documents/Loongson/ls2f/Loongson2FUserGuide.pdf

In both 2E and 2F, the implementation field is the same (0x63).

Revision field is the same too, according to docs, and it can't
be used anyway (no garantee of consistency).

I seems weird to me that you cannot get this information from the PRId register. Perhaps the documentation is defective.

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.

David Daney




I'm sending a new patch that uses machtype instead. Yes, I know
it's a bit of a kludge, but it really seems to be the only way.

Well I appreciate consistency with GCC flag names,

Actually, I missread GCC flag (it's dashless).  I'm using
"loongson2f" as David requested.



<Prev in Thread] Current Thread [Next in Thread>