Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6686029iob; Wed, 11 May 2022 03:10:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIOdHMOJokLyDzyp3rIcWRrwzVLGE/90YNriDWKjHdMQdmq8lmj/mvZAGw+h5UIh22LRPT X-Received: by 2002:a05:6402:2546:b0:427:c112:6de6 with SMTP id l6-20020a056402254600b00427c1126de6mr27173523edb.46.1652263840066; Wed, 11 May 2022 03:10:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652263840; cv=none; d=google.com; s=arc-20160816; b=U2JPnoWoH7upPdOvfhovefXicJ5Renbd/S46MjPYxd+Y9OVaIYAuV3KtB3cUReLM7Y G8nbvbSIKsYSKBYXsPLoA93dIZIoBM/hemX2M3m3/6JKr3jXT5Zz4rpBIMywvSRvXgjz pIpFvOAx0HxEuLV0O4enc5Uk8E2bD79P/GYR5VpRPNFmGSKjCyxDHeKjCLEehA7wjWH3 +TSbnWArCy3lNSD5Pj41LLtQc7HvmjBLjdd8loYH0djww73njvMAubwyZXn4N6j2wbzm Gla7RmPWl9LsIZvhB2PQSXZ4+wfOb95GoFMSBxCbUP2wkIrEzzf6EvLXwamP/lIYGihr YMuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=cdjp8qINrhIdlEgavGMrSA+Az5mZZZ9LfESS5+XERno=; b=hrfAFDpF7Br1ZH971XK8m6862EMvW19B31YZyEyhg6zDgdLrKiBduMnwXN+THQoWBr L55BhzGubaXrPKIJ0T2FV1+8Zc1qxOLSvKAFMo7ryIuKjiJMHY429JNNvVIrfQdlYBMv 8u+0N2uwdBsIl1dF3wSWqy8WRKLE3TIYLV+ypSs/WkTydkLgKpA+7zn+zQvJPPFTbbj3 UEh5O0iGvxb7e/yBCEfyqkeedTtpALuqn3pytP2sItZjR8oF9N63x+3h6frooYNO88QY ixeYdiBuAI1sT3b7Sdx2F5FX8Zs+1vS5ai+N6jiuvLFFoO/DAU1S6JogdgXXX3qUM8Fv WpWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa42-20020a17090786aa00b006df76385d22si2074440ejc.450.2022.05.11.03.10.13; Wed, 11 May 2022 03:10:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230000AbiEKJVv (ORCPT + 99 others); Wed, 11 May 2022 05:21:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239523AbiEKJVu (ORCPT ); Wed, 11 May 2022 05:21:50 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B23943EF3F for ; Wed, 11 May 2022 02:21:48 -0700 (PDT) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[127.0.0.1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1noiWz-0001tq-95; Wed, 11 May 2022 11:21:17 +0200 Message-ID: Date: Wed, 11 May 2022 11:21:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [EXT] [PATCH v9 3/7] crypto: caam - determine whether CAAM supports blob encap/decap Content-Language: en-US To: Pankaj Gupta , Horia Geanta , Herbert Xu , "David S. Miller" Cc: "kernel@pengutronix.de" , Michael Walle , James Bottomley , Jarkko Sakkinen , Mimi Zohar , David Howells , James Morris , Eric Biggers , "Serge E. Hallyn" , Jan Luebbe , David Gstir , Richard Weinberger , Franck Lenormand , Matthias Schiffer , Sumit Garg , "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" References: <20220506062553.1068296-1-a.fatoum@pengutronix.de> <20220506062553.1068296-4-a.fatoum@pengutronix.de> <5e7c0b3c9bc285f1cf9f7b20f055aa376e1688cc.camel@pengutronix.de> From: Ahmad Fatoum In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hello Pankaj, On 11.05.22 11:16, Pankaj Gupta wrote: >> -----Original Message----- >> From: Ahmad Fatoum >>>> + 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. Do you know any SoC where this is the case? (i.e. era < 10 && CTPR_LS_BLOB && AES_CHA == 0) > 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. > > (rd_reg32(&priv->ctrl->perfmon.cha_num_ls) & > CHA_ID_LS_AES_MASK) >> CHA_ID_LS_AES_SHIFT; Sorry, I am not fond of adding quirk handling for Hardware that might not even exist. Cheers, Ahmad > >> Cheers, >> Ahmad > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |