Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp483440pxb; Thu, 7 Apr 2022 10:25:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxokbBWVoU5WhN4oU4dX0XEbHoWK0YOdh0NX22XV1UtuKgX83dFDlDyo5g7nB4Fm46I2QZQ X-Received: by 2002:aa7:dac7:0:b0:41c:c456:3d5c with SMTP id x7-20020aa7dac7000000b0041cc4563d5cmr15555646eds.117.1649352343171; Thu, 07 Apr 2022 10:25:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649352343; cv=none; d=google.com; s=arc-20160816; b=pQQT6oPXCLeRThPDRkniVkWTT1isbwGu+j7glzEkMiQ70ivEWWj/lUycRM8qzzgvTa AYPQ2jn0QMLXB2jvXLrQ00y7N6Mn/eqy95IO983Zrgd5vulAGuapeDd3lJGBcZgL5rng qrTphIMN8cc/v2knwEBFdW7w3O8UjDI+q9yeqdtTLjfPd+k9Hdw72Id8Bgyju8ud1hh2 JiB88rbJNNLqfNayb5VhUf16me2fwRDdpAubigsrV6ChuqNVijRl2gZ/v3G6wZn5QbQH tI1dFZUvYuFxXMBCucBqSdiyHCGViOjun5bIyEl7g6ZR04nuNyUbWkS2Fkgv7uLJjhEt 73TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+8FAwpjcDILWSNDx21CKUAniktty0diX3BBBPxBxwd4=; b=JatgK2nld/v2Bxh1eUKjg0UOy3WvZoxYr6BE0AZWYsEakVeuw14WgsasD5FOjfmf5Z BpAycDqdEart1Vo++FGlHPsyrT1lvD8sDIPX/5n7WxTuh0IaVK1aHKse2MkIUFxOJ76Q wdfyhweHcZxlP67tPKqvMIVbNzDhQ7qr2Ou3gBJYsZsW0MbPkEIrA9ssjW5juPdav5fX V5jG08YzjyGaSLOKt4fdaY7Vb3l/MJXloMccvncuUsYrNze1jQrmS9tCT7j9TGLDS/sF pNL7V4F9YFI82LbMjXfKbPHHrDk9Oi5adAAsVptsxOLwEgmzoK8aPjkn6cmgewGFNf8C fOsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=HQ7EXUW0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c6-20020a170906528600b006df76385d62si10183926ejm.514.2022.04.07.10.25.16; Thu, 07 Apr 2022 10:25:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=HQ7EXUW0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244687AbiDGLVg (ORCPT + 99 others); Thu, 7 Apr 2022 07:21:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229821AbiDGLVa (ORCPT ); Thu, 7 Apr 2022 07:21:30 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD95C19533A; Thu, 7 Apr 2022 04:19:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1649330355; bh=+8FAwpjcDILWSNDx21CKUAniktty0diX3BBBPxBxwd4=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=HQ7EXUW0mimX7QIrI44zFyjDh1CIh0dfexOujOd9tC4nKczWDM7KLVMS1i8p6jjsL n5MGBhKbaC36g95F/K4g/ttes1M4KPgbXK913YLQdOBfb//D6IvP8COwOO2RnB6m7Q 3pszwSvSQ7hDnM3J1JR7Kq0Z8gxaWMsDjpJlKcDc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([46.223.2.23]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mn2W5-1oIwmS1vaJ-00k9ZU; Thu, 07 Apr 2022 13:19:15 +0200 From: Lino Sanfilippo To: peterhuewe@gmx.de, jarkko@kernel.org, jgg@ziepe.ca, =robh+dt@kernel.org Cc: devicetree@vger.kernel.org, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, stefanb@linux.ibm.com, p.rosenberger@kunbus.com, lukas@wunner.de, Lino Sanfilippo Subject: [PATCH 1/5] tpm: add functions to set and unset the tpm chips reset state Date: Thu, 7 Apr 2022 13:18:45 +0200 Message-Id: <20220407111849.5676-2-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220407111849.5676-1-LinoSanfilippo@gmx.de> References: <20220407111849.5676-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:vsXneH/Z/sGRwRqqSWBf86QGc9y88g1044oI/ue+S4oOjAaxNqb CZDLh+ocCxBVvKtNTa8zcPm3jvF9NTUQLid2fGsZ5JhttpSBPCAMBaJHtKkeh2/ff1GcHsh ZO/65USFf5MPdLOAEVmhmFCVLs7vwC8ujUn5iCqXZJWyisu7QthBih+rtrhgH23WBVqWYws EzsD9GVfGv8Qn2v3gA2pQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:pNl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gDRBHfgMDfpuu/FppuiH+uAR58ig1CR9y+dk4oRvF2PT/cMP34JJ9C sc5OlLBhbAYMGk= X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,MIME_BASE64_TEXT,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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-kernel@vger.kernel.org Q3VycmVudGx5IGl0IGlzIG5vdCBwb3NzaWJsZSB0byBzZXQgdGhlIHRwbSBjaGlwcyByZXNldCBz dGF0ZSBmcm9tIHdpdGhpbgp0aGUgZHJpdmVyLiBUaGlzIGlzIHByb2JsZW1hdGljIGlmIHRoZSBj aGlwIGlzIHN0aWxsIGluIHJlc2V0IGFmdGVyIHRoZQpzeXN0ZW0gY29tZXMgdXAuIFRoaXMgbWF5 IGUuZy4gaGFwcGVuIGlmIHRoZSByZXNldCBsaW5lIGlzIHB1bGxlZCBpbnRvCnJlc2V0IHN0YXRl IGJ5IGEgcGluIGNvbmZpZ3VyYXRpb24gaW4gdGhlIGRldmljZSB0cmVlLgoKVG8gaGFuZGxlIHRo aXMgY2FzZSBleHRlbmQgdHBtX3Rpc19waHlfb3BzIGJ5IHRoZSB0d28gZnVuY3Rpb25zICJzZXRf cmVzZXQiCmFuZCAidW5zZXRfcmVzZXQiIHdoaWNoIG1heSBvcHRpb25hbGx5IGJlIGRlZmluZWQg YnkgYSB0cG0gZHJpdmVyLgpJZiBkZWZpbmVkIGNhbGwgInVuc2V0X3Jlc2V0IiBhdCBjaGlwIHN0 YXJ0dXAgYmVmb3JlIHRoZSBmaXJzdCB0cG0gY29tbWFuZAppcyBpc3N1ZWQuIEFsc28gaWYgZGVm aW5lZCB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