From patchwork Tue Feb 28 09:28:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 657472 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2826313wrb; Tue, 28 Feb 2023 01:28:59 -0800 (PST) X-Google-Smtp-Source: AK7set+hOOn0tpVPT9vVRP6582fWxUAneseVAmOxdkCjC+oeh51wheN+ypyFqXWjukJamVIb41+e X-Received: by 2002:a05:6a20:4294:b0:cc:c3f7:9193 with SMTP id o20-20020a056a20429400b000ccc3f79193mr3223603pzj.3.1677576539059; Tue, 28 Feb 2023 01:28:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677576539; cv=none; d=google.com; s=arc-20160816; b=aiN+WsGoLaE+ElIqL0XpezDMBGfOLf2jIhht7Dwh2PAP1oq9ROI04mQk9KCykPGl7y odwB/BMAc7OBj97dkD3T3MqCAV4yxyf5jsj/GS9PuVTtHg3S1sFE9SMwCIuu5AEKEE81 igyAXTp+sX77AL++b4SAy8Ru1swCKNHyGky9HDMKv5srcCiBRWjBFxuTY2J70nibSbOu WfqFuEXDoi+IHj0pTs/OIBsw8u7pRxSrV76lAyhTCSeL7T9y9uzju+1qPh8vzBM/GPMz 0ZRS9Roz88ZJXxWy918GXOPARSGlyjZkaS/rQ/Fb2+16MHlZjQYvTE+bMmx8Csrdmbxg kx9w== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PnOyVHVX+f3lddNivuoqPxxykQfkT6UUmWMwX7pAm5s=; b=NPKiBphDQ9Xf2ElV449uPjBt5DKrFg0PD5gCawNLRY3HpQxeHc9WhkZYrsrD2oygaG o0CoLekBPjoBPhwWJA4cQsHgX2BJz+uoQlc3u6mEszIdD/r9zJcxZBC9sdi4cLAMn5qf TNpVb7CFIfdArvp/SPhlYf4NAphHX1Z63jmyMXdwpdGZybk/CvjW/F05F6USk8VxFNwm B4pEgzYCj+qx6zbvETEZhzRq7E3+5GaZbRuAG1ob1IIFJ2JfBwXdbPT2B1huwzpARH4x 4djK0IrmDngP4Y1fbi7CVV/yXEhbZbTBb3VFHu9wj0mpLgiXiLKKPcgfhf0wWTcFy7hD JphQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WZCe61eW; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id x2-20020aa78f02000000b005a8b856ad47si9270584pfr.7.2023.02.28.01.28.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Feb 2023 01:28:59 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WZCe61eW; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 BF3F485AC3; Tue, 28 Feb 2023 10:28:44 +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="WZCe61eW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3F8B380EB1; Tue, 28 Feb 2023 10:28:38 +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-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (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 6D4B085AB3 for ; Tue, 28 Feb 2023 10:28:34 +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-x335.google.com with SMTP id k37so5961516wms.0 for ; Tue, 28 Feb 2023 01:28:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PnOyVHVX+f3lddNivuoqPxxykQfkT6UUmWMwX7pAm5s=; b=WZCe61eWiyFCgsiW1PoflpKPkxxZPg6phn6DwMvMNjsNERS0GMwv3Bu2jcVhkrqwHI rS6pPPc6Y29fxmAxfwz0tAcrpFj6UHlJJAJzeyloYG9JRErSQWGOMjc5PYFWhgDRMt51 H6GoHG31GM5D2tgNbLEJMjKxaQELv3sfWdQh7/Eo7GwcLysl7v10WX94rUFcfDercx/t MlzDmBZymcS2Nm3qF0KOpX+6PCRlSuXN0t0rjYEQwrFYm2rtjNg8qhOOzZMb0Al1uodz tIlf3lxtPEDFR3IReysK3noayenMPVvt3on4N79bzpA7SAGjvu+Mi9Xq+NgD4YKJlXKg HHFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PnOyVHVX+f3lddNivuoqPxxykQfkT6UUmWMwX7pAm5s=; b=NFVxSRXEfNngVAKPGLTjW/TrEx0NyV6CUQQb/ACLuE3z7CqXPpATynY3gQTdrLg7Jd NpwbOdWnclVQhLKJVNyI1jStxmS3ePyyyUY/iMharEZl686LPeDFb4sx8Zvcj1j2BdW7 rxsPlm49aoyEXRPkdEpv4OCPBkOmvEqoucJlC74oWJSJbW35lmKEEFo7mbXzJdd0GHob +mUXIF26X1dtPouxSe+FX8nuAA6U3jXZEo07xsbghP3wh8omCHllas5bgbgHJYiB8pE0 ZrziXX5PQDAxjKLa4+D8mp+oZ1fe0aTDpgx6QJUBXpIJMWDHAoKeSdwyTtQOKQfFxuO1 FSKw== X-Gm-Message-State: AO0yUKXUyUeg3Cc4Mkd4kq9Ez7KOsu9XeNDkMA1DHffrGqRWnj1PX2oV uVwZyJFjeF+yuP7dvhir3mZtsMlb7HG4Upd5 X-Received: by 2002:a05:600c:19d4:b0:3e1:bfc:d16e with SMTP id u20-20020a05600c19d400b003e10bfcd16emr1599840wmq.39.1677576513840; Tue, 28 Feb 2023 01:28:33 -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.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Feb 2023 01:28:33 -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:25 +0200 Message-Id: <20230228092825.334248-2-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230228092825.334248-1-ilias.apalodimas@linaro.org> References: <20230228092825.334248-1-ilias.apalodimas@linaro.org> 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(-)