From patchwork Tue Feb 28 09:28:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 657471 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2826236wrb; Tue, 28 Feb 2023 01:28:45 -0800 (PST) X-Google-Smtp-Source: AK7set/KIYRCdn4JKqzjOXz/a3Yf4o/R9Cy0L3rqDvM17g7CEfEaSVY+uLwjTQDKvwbBYC2GrY4A X-Received: by 2002:a62:8406:0:b0:5f1:468b:c88 with SMTP id k6-20020a628406000000b005f1468b0c88mr2268842pfd.27.1677576524984; Tue, 28 Feb 2023 01:28:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677576524; cv=none; d=google.com; s=arc-20160816; b=ei9AAGkpptHXUeR326fY3BWog0QrBZa8IcyFczhlQr92LT0t1xIZ9RBTFaOQ73Cvp2 K7GCJroiNGksWQkFjg0MyNqKW+DPuhWBLIiieZtrALIGVpv0VkvIPYAc2+RmACjx/Dld vNHNsx+MBt2XRFVmX738EtASWGRXkrsrrC/n0fTEeJvDrSWRFE4+BDiF3TSTfFcEJAaa F0Oy/eMuWDoGn0GnCBQG/uVJ/dWNv5pjHosU38d8W5cTBHfpgRNtrCaSuAbiev7OVDHS Kf9ph8rg5hsWuy3NE1TE2QH4Fij2bksizh/I+S0ySOEw7OmP2aVWCYmruvj4KGZCvIe8 Mqgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=PnOyVHVX+f3lddNivuoqPxxykQfkT6UUmWMwX7pAm5s=; b=AY2U5w550L5I3Fx9w6FL9jJJnr5EY4DKG0sFIN24WmsoA+tUkd9CPylcp9CH09ILmC /tFAG43XlbtCNScbdF4RfriqKsK041NlNFBpW2v2oPUVn4XU22EDcnILCtHCAyJnUNoc Bm9Qg89Fmkajn9X21NP/JmPv1IylQ8V91xgUtBFEe8Mv1RvIsWXXmmbzPzSfATGdUdMJ Gm3gbV8yQf4DrkPNhOvtVPRJGCCdHSWEGrT1JtJA3Ih30pkvq1iFKNt1QFH+hweNLReM CRvi/9Q2DLwZG2Wi/zw/SbqlEmT9b38mW+wR6KL/U7LUPM5sf9We8xYSKgpa3KvC0xpN jMvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ul3y4kxZ; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id fd7-20020a056a002e8700b005dc44c567a0si10568462pfb.24.2023.02.28.01.28.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Feb 2023 01:28:44 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ul3y4kxZ; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8C19F85AB3; Tue, 28 Feb 2023 10:28:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="ul3y4kxZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6864C85ABB; Tue, 28 Feb 2023 10:28:36 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 818B380EB1 for ; Tue, 28 Feb 2023 10:28:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-wm1-x32d.google.com with SMTP id p16so5910536wmq.5 for ; Tue, 28 Feb 2023 01:28:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=PnOyVHVX+f3lddNivuoqPxxykQfkT6UUmWMwX7pAm5s=; b=ul3y4kxZfny567X6zig6oy8Q4AwwoW43zjuga4gXL4j9cF4M6TuK5ycIHt+6r9KLTT lSqsjtQXDu7CB2+aksn8DA2Ki3QjxKwlTEVUplaL3epWJiWta0/enB4agxMUcX/MFrUV 9+NCIJDpvGfXsvLuaYfCQWLVHxdwNmy6EvKrelOz22dJ7rnfKKa5RmkqDmewxxzsbz1Z 2hyqGEM3Jgaw5GJyOcuSBggru7rI0/fhkDy1vcEx/TLgXdsM5HrmZ9VYnKLAsh6EgZat 4AzGz4dmM5oiWDVmD4lwwoLFHuLN6qPj08NvAbwOQOzkJPCA9pClP369CRh7L2c0CNpX V+gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PnOyVHVX+f3lddNivuoqPxxykQfkT6UUmWMwX7pAm5s=; b=4xtjV0wZ0D09YnYEF4gWIk5jrXIKL/CcO7boNmQus7A3yAK8pqpjhNrdq1f8Unosij IcPTP/twgAHcez23qI57mxqZgTi1XrCrYTtDFdlCUNB8iiD/awjblWY8pnKWnEOcv/iY tvvLsKJuz0EO7b+XdQhQ4xkPb5Z6h176osDsPy5oUfnXNgDd6O+eODRzpFUCU4JrcICL qA7ta3r/yrw2XY7xld74FKo7rYFqXNmCh+onJ6FLTK3+BVUb22eDpwzPkYKdcmDhQuqQ O4oQwFDy+dhQ/hL3PjW4fMM28dscs6H0LXEuDCdBGzgKGzAezmz5b2vpzwpPV25M9qpQ 8I7Q== X-Gm-Message-State: AO0yUKWN1Nis2j9hbUd9dEULTLau4kVjbd3pyhCXB0YRRh0HcqNKS3ni jehTuUDoUCYZSQ720+80HMsy1x8UHiwcZPXo X-Received: by 2002:a05:600c:3296:b0:3ea:e582:48dd with SMTP id t22-20020a05600c329600b003eae58248ddmr1588825wmp.34.1677576512959; Tue, 28 Feb 2023 01:28:32 -0800 (PST) Received: from localhost.localdomain ([2a02:85f:fc09:d5bf:4813:3dda:502a:376d]) by smtp.gmail.com with ESMTPSA id d24-20020a1c7318000000b003dc522dd25esm11586800wmb.30.2023.02.28.01.28.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Feb 2023 01:28:32 -0800 (PST) From: Ilias Apalodimas To: u-boot@lists.denx.de, trini@konsulko.com Cc: sjg@chromium.org Subject: Pull request for tpm-next-28022023 Date: Tue, 28 Feb 2023 11:28:24 +0200 Message-Id: <20230228092825.334248-1-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 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.6 at phobos.denx.de X-Virus-Status: Clean Hi Tom, The following changes since commit 5b197eee334bdf75cc9e9148161299679a5251ea: Merge tag 'v2023.04-rc3' into next (2023-02-27 17:28:21 -0500) are available in the Git repository at: https://source.denx.de/u-boot/custodians/u-boot-tpm/ tags/tpm-next-28022023 for you to fetch changes up to a11be4c303eabb142e074c7ca14b6ae0d293f0cb: tpm: Implement tpm_auto_start() for TPMv1.2 (2023-02-28 09:44:33 +0200) The CI showed no issues: https://source.denx.de/u-boot/custodians/u-boot-tpm/-/pipelines/15398 ---------------------------------------------------------------- Due to U-Boot's lazy binding we always relied on command line tools to initialize the TPM subsystem and devices. One exception is the EFI subsystem. When compiled with TCG2 measured boot support the TPM was automatically initialized. However that init was not complete. The TCG specs [0] (and specifically ยง12.3 Self-test modes) describe how self-tests on the device should be performed. This PR is adding an extra API function, that can be used to initialize the TPM2.0 properly. Simon added the equivalent for TPM1.2 and refactored the DM tests to include the new funtion. [0] https://trustedcomputinggroup.org/wp-content/uploads/TPM-Rev-2.0-Part-1-Architecture-01.07-2014-03-13.pdf ---------------------------------------------------------------- Ilias Apalodimas (4): tpm: add a function that performs selftest + startup efi_loader: use tpm_auto_start for the tpm device tpm: sandbox: Change the return code when device is already open test: add a test for the new tpm_auto_start() function Simon Glass (2): tpm: Separate out the TPM tests for v1 and v2 tpm: Implement tpm_auto_start() for TPMv1.2 arch/sandbox/dts/test.dts | 4 ++ drivers/tpm/tpm2_tis_sandbox.c | 2 +- include/tpm-common.h | 2 +- include/tpm-v1.h | 11 +++++ include/tpm-v2.h | 16 +++++++ include/tpm_api.h | 8 ++++ lib/efi_loader/efi_tcg2.c | 2 +- lib/tpm-v1.c | 14 ++++++ lib/tpm-v2.c | 17 +++++++ lib/tpm_api.c | 21 +++++++++ test/dm/tpm.c | 102 +++++++++++++++++++++++++++++++++++++++-- 11 files changed, 191 insertions(+), 8 deletions(-)