[Top] [All Lists]

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

To: Franck <>
Subject: Re: [PATCH] Add support for 4KS cpu.
From: "Kevin D. Kissell" <>
Date: Wed, 05 Oct 2005 11:46:38 +0200
Cc: "Maciej W. Rozycki" <>, Ralf Baechle <>,
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <>
User-agent: Mozilla Thunderbird 1.0.6 (X11/20050716)
Franck wrote:
2005/10/4, Kevin D. Kissell <>:

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,
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.


                Kevin K.

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