From patchwork Thu Jul 8 08:23:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 471209 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp45843jao; Thu, 8 Jul 2021 01:23:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzznKUlN8yrEBOz/QljimGa2LrTB6fSW018mszhhO9qvdJ8krwChxXL+d1PGfVGP7UlOFK8 X-Received: by 2002:a17:906:4882:: with SMTP id v2mr29783677ejq.134.1625732602442; Thu, 08 Jul 2021 01:23:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625732602; cv=none; d=google.com; s=arc-20160816; b=a3Izusj4JPjfd01lSIRW9AFdtOsk0i966KVnfrjEc6/nXS6V4c8xpvNvg0dPmdwpCY L0NDmeYpnhNkx3TNH57g/lt2dXCfZmuN8Bo4cpdb7YJuAFLX0YTDAVrU4xmqmsCrSU06 Kwm8BCna2DSKuALWNQurrfKCYd6Vb1cBT0i8I9Ew2prs89ZZFi9F24YL9aQcPsXXdieh Bn94QbRML1MMEQClbL3oFf0fJvG6u5isdy3XzO2J64Ou9peaSlBvu+4v3SGkDGAcxWrc KbkehvyUk3FOI6MwNe82mDr1vLNZ1g6v5kBdnBp6EUyyzSKmlD0vhyZcQ2uDy4mq+//o hpUw== 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=2dEwzwb/m1H8kLksHWbmUh2pcNyTNkBaWaRYRjb5RU0=; b=sLky3W5iUEBi0PIxdYFMHYRfBsY5Eadyazc9V0hx8aWh9HFKjgNhSukDPNfvv6ucZc K2+1gMfDNm3IHgAVEAEQaeEuxvW2/OCFSqVb61d/j8ZD5HaZqv7NkPmKHCTIQ/VDj5SC r7Z61e8ZDb8QGu32ky7uVV61KpyQIyYSqiPI6aaw5m7Ok3a94i43VM7gWsMsui4rrYDQ r2qv1MppUtu65UKGWznrpIAFX04qaRDcENAmmCuRmThvLyjZCsjQEWRiRVvtshDhtarj bqD/90CEDIorxWLjYBzXi1T+kvYJNUVe9heEsFeCBbzY3tzZvsAIppd/ZjCrUp/q7upd VCaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KXjg5MGu; 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 ne19si2379380ejc.288.2021.07.08.01.23.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 01:23:22 -0700 (PDT) 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=KXjg5MGu; 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 C62CC83113; Thu, 8 Jul 2021 10:23:18 +0200 (CEST) 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="KXjg5MGu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9B9D582F13; Thu, 8 Jul 2021 10:23:17 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (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 9B17682F03 for ; Thu, 8 Jul 2021 10:23:14 +0200 (CEST) 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-x336.google.com with SMTP id o22so3543833wms.0 for ; Thu, 08 Jul 2021 01:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2dEwzwb/m1H8kLksHWbmUh2pcNyTNkBaWaRYRjb5RU0=; b=KXjg5MGuna4Ko/OD3LZ/fcKa4BJ5RKHeIV+a9OwyXV70VXFIIco5h2z0VFS72BipNe xohi6BCx1LHSG239MrTqOVku8+dErCwy7UcZKbWzA9XahwtSW5n2+/psDdNKgsSkQb6F Hft0bejcmPMY3VQBG3NC1jCujNHUzN/9d3oaGdaZjeYHFZVZtFx2WzLRh5e9lQ0ep+Qn EBSCkJU+/wLe4DUem2OyJPT+pacmJLT6fbEWKqnIGRSSOad6wap53/1tPFGV6SBNchu4 o0IsCaiZdWBrBAKolEx5ucGFc9IBKoShrnnbSaEKPN0qWlrD34vf+Beam5dX/25ZCjsk EqlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2dEwzwb/m1H8kLksHWbmUh2pcNyTNkBaWaRYRjb5RU0=; b=axbra/sj8A6o3Sff3R9AYiuWAX9STfjxyKxusjUeWtqBCdVShi70bMD8raSmmRUmon e2T43Y/V5jay2pBdJdlB457EyQ2MQ5onunKyEW9BZf7QJXHGORLaOhrET+MzVq4lTil6 tXjZ+DHxykUb9XAjzwQuXmB7yQOZxKVBkHb+7gjiiKqPoaBJbq3evi40MlcfC/eLdHtj K0Cq3F3YcV1GD5hmB0bBzpzIutvd3JtN0R/bAHWc6GVVVvWTenECobjHfH4iwNWgX7O/ TxN0Ioq4A5Mll4T+S2Z9ADp1xu/xuz7aV+DM/4wVlKANAHHubvZ4fxaieM0jUXjc2LPT gM8w== X-Gm-Message-State: AOAM531TbRl2omJRf+O7chaYM3AJR6U+3bXQmgb88qwOuP+P6tduqBcS mBy4lq5jpegWrGe2pKcaDiM7jA== X-Received: by 2002:a1c:f206:: with SMTP id s6mr30824501wmc.102.1625732594150; Thu, 08 Jul 2021 01:23:14 -0700 (PDT) Received: from localhost.localdomain (ppp-94-66-242-227.home.otenet.gr. [94.66.242.227]) by smtp.gmail.com with ESMTPSA id z3sm1689362wrv.45.2021.07.08.01.23.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 01:23:13 -0700 (PDT) From: Ilias Apalodimas To: xypron.glpk@gmx.de, trini@konsulko.com Cc: Ilias Apalodimas , Simon Glass , Robert Marko , Alex Nemirovsky , Sean Anderson , Weijie Gao , Bin Meng , Rayagonda Kokatanur , Stefan Bosch , Dhananjay Phadke , Masahisa Kojima , u-boot@lists.denx.de Subject: [PATCH 0/3 v3] Inrtoduce TPM TIS Date: Thu, 8 Jul 2021 11:23:05 +0300 Message-Id: <20210708082310.87540-1-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.32.0.rc0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Introduce a TPM TIS layer, which can be used for all the TIS TPMs. We can slowly start converting all the TPM TIS based drivers and remove a lot of code duplication. The series also adds an MMIO based driver, which can be used on QEMU along with swtpm [1] to provide selftests for the EFI TCG protocol Changes since v1: - introduce TPM TIS APUI Changes since v2: - Add myself as a maintainer on TPM drivers [1] https://qemu.readthedocs.io/en/latest/specs/tpm.html Ilias Apalodimas (3): tpm2: Introduce TIS tpm core tpm2: Add a TPMv2 MMIO TIS driver MAINTAINERS: Add entry for TPM drivers MAINTAINERS | 5 + drivers/tpm/Kconfig | 9 + drivers/tpm/Makefile | 1 + drivers/tpm/tpm2_tis_core.c | 545 ++++++++++++++++++++++++++++++++++++ drivers/tpm/tpm2_tis_mmio.c | 156 +++++++++++ drivers/tpm/tpm_tis.h | 40 +++ include/tpm-v2.h | 1 + 7 files changed, 757 insertions(+) create mode 100644 drivers/tpm/tpm2_tis_core.c create mode 100644 drivers/tpm/tpm2_tis_mmio.c -- 2.32.0.rc0