From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BFC1CC433EF for ; Wed, 23 Feb 2022 14:50:28 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2732183B73; Wed, 23 Feb 2022 15:50:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="T2ErS1St"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E042883C8F; Wed, 23 Feb 2022 15:50:23 +0100 (CET) Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 36FB983C90 for ; Wed, 23 Feb 2022 15:50:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.behun@nic.cz Received: from thinkpad (unknown [172.20.6.87]) by mail.nic.cz (Postfix) with ESMTPSA id C3230140BF8; Wed, 23 Feb 2022 15:50:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1645627819; bh=tEGyn8poxl8R1+f+wdC7RNwAY9iGeEwa2lPfZWpEsIA=; h=Date:From:To; b=T2ErS1St9gazth35pHRxjlnjhcTk2xYwISgNn5qWy5WSlPtgZ6r83k+rNyLH+i6UO UvCPcQ2RiZEi3BYSuxRxke4GQsCpwY4HigrDSU822/8PEJM+lMOYBW5czgoElXkm9w bqBAlW773evY3OApo31K9kfrWKerX8rSgx05TCxU= Date: Wed, 23 Feb 2022 15:50:19 +0100 From: Marek =?UTF-8?B?QmVow7pu?= To: Pali =?UTF-8?B?Um9ow6Fy?= Cc: Stefan Roese , Konstantin Porotchkin , Vladimir Vid , u-boot@lists.denx.de Subject: Re: [PATCH u-boot-mvebu 5/5] arm: mvebu: a37xx: Add support for reading Security OTP values Message-ID: <20220223155019.3766d24f@thinkpad> In-Reply-To: <20220222204757.3qwagsrmtkwzwcgv@pali> References: <20220217092619.1445-1-pali@kernel.org> <20220217092619.1445-6-pali@kernel.org> <20220217153110.21ed55f6@dellmb> <20220222204757.3qwagsrmtkwzwcgv@pali> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On Tue, 22 Feb 2022 21:47:57 +0100 Pali Roh=C3=A1r wrote: > On Thursday 17 February 2022 15:31:10 Marek Beh=C3=BAn wrote: > > > + * But this command does not provide access to lock bit. > > > + */ > > > + if (word < 2) { > > > + in[0] =3D row; > > > + in[1] =3D word * 32; > > > + res =3D mbox_do_cmd(MBOX_CMD_OTP_READ_32B, in, 2, out, 2); > > > + if (res !=3D -ENOSYS) { > > > + if (!res) > > > + *data =3D out[0]; > > > + return res; > > > + } > > > + /* Fallback for old version of CZ.NIC wtmi firmware. */ > > > + } =20 > >=20 > > I am afraid this is not correct, because Marvell's firmware reads the > > efuse without Error Correction. So it is possible for Marvell's command > > to return different value than CZ.NIC's command. =20 >=20 > This is not truth. CZ.NIC firmware for MBOX_CMD_OTP_READ command calls > efuse_read_row_no_ecc which is not doing error correction too. >=20 > So both commands return same value, without error correction. Seems that I have trouble remembering what how I have actually implemented it :) Oh well. Sorry about this.