Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8955317rwb; Thu, 24 Nov 2022 06:22:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf6alriS8zX5n0f8LQv/LjxWojAgbI/KbD1uEDNxsYWa+qZcCJZLzX4YoFElDX5xyHbaLusC X-Received: by 2002:aa7:8054:0:b0:56c:4303:a93d with SMTP id y20-20020aa78054000000b0056c4303a93dmr18216620pfm.73.1669299733582; Thu, 24 Nov 2022 06:22:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669299733; cv=none; d=google.com; s=arc-20160816; b=zc6SnhpwfXKqTBrYSTEDwRA1q4NS6JdLtQvl8TP/oSHqwnxXmgVYXoIOm6eN7TzEus qNKmscykJwl19iSeEYNLJRIvmZ2cCP5k4LFr9Plqu76jRrA4EiDf0a0dj/P1N5QcxP9f 6sZCoKTP1EZOA/I5uUhnfwUpm6ImCZ7OkoLKClSxTxlbvWFq4YTRdikeQ6p7zF3yJiYa WEjlTIC/aGtjOPW+EBzfJuPreK8XxxILmBlpw8HNL4ot8r1D6kcyr8NfPXricJKIjLYb 9mmGo2z7KpNg5+AilXnEW2bFBzdqudG8ZqrTuBblK//d53Z6OmOb6w1x74UkVwfAYeUJ GQlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SccepFkG1BaYDhxThv4kTIw73gWWQ8B34c8oBRXziP8=; b=cYcU8dfQprYJ82U+JVfFeIdZNAMeUUD1yAJpCjd5HJ68YGoWF5IikN+R4CjA/vIvz3 OA/X/3WXXwvBasIZpcFZIcxeTRQOIVew8hmFdwJFiPhbQQRni82VwDxbrzcGplAxtB/K yaPF/udxjDH+mJismBgVSpFUDXPHVz9pr4SJpOdJ4cFipf3iUeDGykViKVTr+Ha4H9q0 XqasvHUBbysUPvf9BKtGUTIw1WXuf4LRZEAKDWEs+7FyvOA9rs99M8v+Gt4ikt2I9Fbi 4n6578euEs/AmQKoMJzs61gEXB3wESsoz8F/9nxoVSlh0HNF4FRJCh9pJ0b/4xKhZZxs 2+FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=N5oSIApe; 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=pass (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 cp19-20020a170902e79300b00188a9150321si671523plb.342.2022.11.24.06.22.01; Thu, 24 Nov 2022 06:22:13 -0800 (PST) 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.de header.s=s31663417 header.b=N5oSIApe; 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=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230342AbiKXN50 (ORCPT + 86 others); Thu, 24 Nov 2022 08:57:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230236AbiKXN44 (ORCPT ); Thu, 24 Nov 2022 08:56:56 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FCFFFFAA4; Thu, 24 Nov 2022 05:56:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1669298174; bh=SccepFkG1BaYDhxThv4kTIw73gWWQ8B34c8oBRXziP8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=N5oSIApeIyqhSeyC5gdSR0djmO35Q82/vTO7AnK+pUNovI047gP53VxHdyEh644Gs vDbkjFbFt4syPSalb34P3JmOTUqPiUORWZ3cu/CtvTl1I5MDTSI5LbrbRykKs3MPPB gDqmJMCbW/daQoZ5iTvHIoqr6zvwolRhD2aLsgkpb99iWmZybH3HfbmPqUJnkMNObK 4M2a2Ouq50SagnRldDSMKXrD4VUHBcq6CmZ+/BDhv32/We5dpWepTL9XotCwnkiFVu TYXuIvIFTdnNeOaR/smYBw2k8Rv1UALGd+DflsGFfHRtoG9vBH3jN5QSKi9OQr1Lm0 TWJ58lS+6OZLQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from Venus.speedport.ip ([84.162.7.17]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mg6e4-1pPH3Q1hnS-00hcyE; Thu, 24 Nov 2022 14:56:14 +0100 From: Lino Sanfilippo To: peterhuewe@gmx.de, jarkko@kernel.org, jgg@ziepe.ca Cc: stefanb@linux.vnet.ibm.com, linux@mniewoehner.de, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, jandryuk@gmail.com, pmenzel@molgen.mpg.de, l.sanfilippo@kunbus.com, LinoSanfilippo@gmx.de, lukas@wunner.de, p.rosenberger@kunbus.com Subject: [PATCH v11 13/14] tpm, tpm_tis: startup chip before testing for interrupts Date: Thu, 24 Nov 2022 14:55:37 +0100 Message-Id: <20221124135538.31020-14-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20221124135538.31020-1-LinoSanfilippo@gmx.de> References: <20221124135538.31020-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:zL2CNXLyU474XTdrXuPgbob0QK0DB8me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u/b67IKA4NLdlFiEB4QYUQhpL0nsFgH9aBIqZebPWX9tG84Tz6cgR 5PXiwM0vVzJRDLlq5Jj3PJc29ZfEBRVsIlCC7fTsVyDIDlSR3vya9bCIdI6r7b1Qd5yws60o0 be2bAg== X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,MIME_BASE64_TEXT, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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 RnJvbTogTGlubyBTYW5maWxpcHBvIDxsLnNhbmZpbGlwcG9Aa3VuYnVzLmNvbT4KCkluIHRwbV90 aXNfZ2VuX2ludGVycnVwdCgpIGEgcmVxdWVzdCBmb3IgYSBwcm9wZXJ0eSB2YWx1ZSBpcyBzZW50 IHRvIHRoZQpUUE0gdG8gdGVzdCBpZiBpbnRlcnJ1cHRzIGFyZSBnZW5lcmF0ZWQuIEhvd2V2ZXIg YWZ0ZXIgYSBwb3dlciBjeWNsZSB0aGUKVFBNIHJlc3BvbmRzIHdpdGggVFBNX1JDX0lOSVRJQUxJ WkUgd2hpY2ggaW5kaWNhdGVzIHRoYXQgdGhlIFRQTSBpcyBub3QKeWV0IHByb3Blcmx5IGluaXRp YWxpemVkLgpGaXggdGhpcyBieSBmaXJzdCBzdGFydGluZyB0aGUgVFBNIHVwIGJlZm9yZSB0aGUg cmVxdWVzdCBpcyBzZW50LiBGb3IgdGhpcwp0aGUgc3RhcnR1cCBpbXBsZW1lbnRhdGlvbiBpcyBy ZW1vdmVkIGZyb20gdHBtX2NoaXBfcmVnaXN0ZXIoKSBhbmQgcHV0CmludG8gdGhlIG5ldyBmdW5j dGlvbiB0cG1fY2hpcF9zdGFyd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