lkml.org 
[lkml]   [2022]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [EXT] [PATCH v9 3/7] crypto: caam - determine whether CAAM supports blob encap/decap
Hi,

Am 2022-05-11 11:16, schrieb Pankaj Gupta:
>> -----Original Message-----
>> From: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> Sent: Monday, May 9, 2022 6:34 PM
>> To: Pankaj Gupta <pankaj.gupta@nxp.com>; Horia Geanta
>> <horia.geanta@nxp.com>; Herbert Xu <herbert@gondor.apana.org.au>;
>> David S.
>> Miller <davem@davemloft.net>
>> Cc: kernel@pengutronix.de; Michael Walle <michael@walle.cc>; James
>> Bottomley <jejb@linux.ibm.com>; Jarkko Sakkinen <jarkko@kernel.org>;
>> Mimi
>> Zohar <zohar@linux.ibm.com>; David Howells <dhowells@redhat.com>;
>> James
>> Morris <jmorris@namei.org>; Eric Biggers <ebiggers@kernel.org>; Serge
>> E.
>> Hallyn <serge@hallyn.com>; Jan Luebbe <j.luebbe@pengutronix.de>; David
>> Gstir
>> <david@sigma-star.at>; Richard Weinberger <richard@nod.at>; Franck
>> Lenormand <franck.lenormand@nxp.com>; Matthias Schiffer
>> <matthias.schiffer@ew.tq-group.com>; Sumit Garg
>> <sumit.garg@linaro.org>;
>> linux-integrity@vger.kernel.org; keyrings@vger.kernel.org; linux-
>> crypto@vger.kernel.org; linux-kernel@vger.kernel.org; linux-security-
>> module@vger.kernel.org
>> Subject: Re: [EXT] [PATCH v9 3/7] crypto: caam - determine whether
>> CAAM
>> supports blob encap/decap
>>
>> Caution: EXT Email
>>
>> Hello Pankaj,
>>
>> On Mon, 2022-05-09 at 12:39 +0000, Pankaj Gupta wrote:
>> > > - if (ctrlpriv->era < 10)
>> > > + comp_params = rd_reg32(&ctrl->perfmon.comp_parms_ls);
>> > > + ctrlpriv->blob_present = !!(comp_params & CTPR_LS_BLOB);
>> > > +
>> > > + if (ctrlpriv->era < 10) {
>> > > rng_vid = (rd_reg32(&ctrl->perfmon.cha_id_ls) &
>> > > CHA_ID_LS_RNG_MASK) >>
>> > > CHA_ID_LS_RNG_SHIFT;
>> >
>> > Check for AES CHAs for Era < 10, should be added.
>>
>> Do I need this? I only do this check for Era >= 10, because apparently
>> there are
>> Layerscape non-E processors that indicate BLOB support via
>> CTPR_LS_BLOB, but
>> fail at runtime. Are there any Era < 10 SoCs that are similarly
>> broken?
>>
>
> For non-E variants, it might happen that Blob protocol is enabled, but
> number of AES CHA are zero.
> If the output of below expression is > 0, then only blob_present
> should be marked present or true.
> For era > 10, you handled. But for era < 10, please add the below code.

Are there any CAAMs which can be just enabled partially for era < 10?
I didn't found anything. To me it looks like the non-export controlled
CAAM is only available for era >= 10. For era < 10, the CAAM is either
fully featured there or it is not available at all and thus the node
is removed in the bootloader (at least that is the case for layerscape).

-michael

\
 
 \ /
  Last update: 2022-05-11 11:22    [W:0.092 / U:1.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site