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 23482C32771 for ; Fri, 19 Aug 2022 13:47:04 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DC3D4848DA; Fri, 19 Aug 2022 15:47:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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; unprotected) header.d=chromium.org header.i=@chromium.org header.b="OuhiEbdY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 88110848DA; Fri, 19 Aug 2022 15:47:00 +0200 (CEST) Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) (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 47D3B84822 for ; Fri, 19 Aug 2022 15:46:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oi1-x22e.google.com with SMTP id m6so4817007oib.4 for ; Fri, 19 Aug 2022 06:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=g7cbYuYIzaBpW5aJDJlqtGbwjT/bnlngzexoHqJCE8M=; b=OuhiEbdYPW8zqoFJQTnFztW9OB+AMYuDTJqUwHGMq3TepPv5rCutVlwCY8W3jCgNNx 9Qvtd/n9TvHnvyFLB1s3GqNkEsTN452OJQKhvBdDVTbj5cU05nIUXxjjPK0rXv4KwFs0 nH8hTA8vbsco3g3e6PbnbwDyOTWkWqamAWuHk= 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; bh=g7cbYuYIzaBpW5aJDJlqtGbwjT/bnlngzexoHqJCE8M=; b=CrZGlEXq+tM40AFxKpGqrJNpu1/pTZTqGekMrfAWSsputG/m/mxxO0uFDyPNmciCvq DsUpCazt53KRK1fjG8j6Gp6Z7GWZKbImV7Fr0f4MJZWdlkPIE2qfYdLOaFmWFPgQunbK YEL0yQPCzkVQnUlymVVbP2MjrAsXjAwZ7PfzBiKZxWuMa2nPvGxmEq8iOFO53bHnnMIy G1d38pFlGTTDic0kTy4WA6hZLIyFLBDgdvmOXTkzWlKgSdnfu8GoF8oWFHqD+c8pnTFS BF7sRxAPAvuZ/wnLrPzdlWKusG3m3T8U9Am3Epu+QTgABCtdavnRv9M71Q2v3XdFLxhw GsYw== X-Gm-Message-State: ACgBeo29AbvZEqlG+1yQczc+7tnlxDhLIUXCIGJniesipksGvtpLo1RD B8gcaHotvVnwWX+AoYmqR2SAyuNA2UaNkQ== X-Google-Smtp-Source: AA6agR6jnMQoqXxo80HI/MtBKt8OthsiF567jqY5Nw+pO1xDc7seZCh6/yQFErkuFIe9fGIzm+U/kw== X-Received: by 2002:a05:6808:13d1:b0:343:641e:2cb0 with SMTP id d17-20020a05680813d100b00343641e2cb0mr3343847oiw.264.1660916815635; Fri, 19 Aug 2022 06:46:55 -0700 (PDT) Received: from sjg1.roam.corp.google.com (c-67-190-102-125.hsd1.co.comcast.net. [67.190.102.125]) by smtp.gmail.com with ESMTPSA id z36-20020a056870d6a400b0011856117469sm1309429oap.10.2022.08.19.06.46.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Aug 2022 06:46:54 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Simon Glass , Heinrich Schuchardt , Ilias Apalodimas , Masahisa Kojima , Mathew McBride , Ruchika Gupta , Sughosh Ganu Subject: [PATCH v3 0/7] tpm: Various minor fixes and enhancements Date: Fri, 19 Aug 2022 07:46:40 -0600 Message-Id: <20220819134647.269563-1-sjg@chromium.org> X-Mailer: git-send-email 2.37.1.595.g718a3a8f04-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 This series contains some minor enhancements for the TPM code to make it work with Chromium OS verified boot. Changes in v3: - Drop limits on the TPM hash size - Update commit message Changes in v2: - Use "cmd" for the digest type in the tpm command - Update comment for tpm_pcr_extend() 'name' parameter - Use constants instead of open-coded values Simon Glass (7): tpm: Require a digest source when extending the PCR tpm: Correct the permissions command in TPMv1 tpm: Correct the define-space command in TPMv2 tpm: sandbox: Allow init of TPM in a different phase tpm: Allow reporting the internal state tpm: Implement state command for Cr50 tpm: Allow committing non-volatile data cmd/tpm-common.c | 20 ++++++ cmd/tpm-user-utils.h | 2 + cmd/tpm-v1.c | 3 +- cmd/tpm-v2.c | 3 + cmd/tpm_test.c | 5 +- drivers/tpm/cr50_i2c.c | 117 +++++++++++++++++++++++++++++++++ drivers/tpm/tpm-uclass.c | 10 +++ drivers/tpm/tpm2_tis_sandbox.c | 17 ++++- include/tpm-common.h | 20 ++++++ include/tpm-v2.h | 68 +++++++++++++++++++ include/tpm_api.h | 8 ++- lib/tpm-v1.c | 5 +- lib/tpm-v2.c | 68 +++++++++++++++++-- lib/tpm_api.c | 10 +-- test/dm/Makefile | 1 + test/dm/tpm.c | 34 ++++++++++ 16 files changed, 370 insertions(+), 21 deletions(-) create mode 100644 test/dm/tpm.c -- 2.37.1.595.g718a3a8f04-goog