linux-mips
[Top] [All Lists]

Re: [PATCH] Add support for 4KS cpu.

To: Franck <vagabon.xyz@gmail.com>
Subject: Re: [PATCH] Add support for 4KS cpu.
From: "Kevin D. Kissell" <kevink@mips.com>
Date: Wed, 05 Oct 2005 11:46:38 +0200
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>, Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
In-reply-to: <cda58cb80510050000r1baea5c7k@mail.gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <cda58cb80510040149p690397afo@mail.gmail.com> <Pine.LNX.4.61L.0510041219500.10696@blysk.ds.pg.gda.pl> <434277D5.1090603@mips.com> <cda58cb80510050000r1baea5c7k@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla Thunderbird 1.0.6 (X11/20050716)
Franck wrote:
2005/10/4, Kevin D. Kissell <kevink@mips.com>:

They also have some physical security and cryptography accelleration
features, some of which use extended CPU state that would
require some kernel context management support if anyone wanted
to actually use them in Linux applications. The real point of
having a CPU_4KSC config flag would be to enable building-in
such support.

what is extended CPU state that you're talking about ?

That would be telling.  ;o)   Seriously, see below.

I'm being a teeny bit vague about this, because I'm not 100%
certain that all the details of "SmartMIPS" have been published.


hmm, does that mean that smart mips extension couldn't be supported in
Linux in case that this extension have not been published ?

I'm personally not a big believer in security-through-obscurity,
but there are those, both inside and outside MIPS, who felt that
the security of SmartMIPS cores would be enhanced if we didn't
give away all of the details.  As a consequence, we put off
publishing the nitty-gritty details of SmartMIPS for quite a while.
I note that we now have the programmers' manual on-line at www.mips.com,
so I guess I'm implicitly cleared to discuss it in at least that level
of detail.

A key element of SmartMIPS that allows for a ~2x speedup for
crypto codes that rely on extended precision math (RSA, ECC)
is the combination of an extension to the Hi/Lo accumulator
(called "ACX") with a special extract-and-reduce instruction
("MFLHXU").  If one wants to use that in Linux - or at least,
if one wants to allow more than one thread to be able to use
it at a time - one needs to save/restore ACX on the kernel
stackframe, along with Hi and Lo.

                Regards,

                Kevin K.

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