From patchwork Fri Aug 5 06:11:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 595510 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp1029380maz; Thu, 4 Aug 2022 23:12:07 -0700 (PDT) X-Google-Smtp-Source: AA6agR7FNo0BV1JCeodwHOJt3Kqq+s7eT+rDpBK3IJZ3wgBgNwd7a8V7/rFDl3GwqGMb9lc87oSv X-Received: by 2002:a6b:b804:0:b0:67c:cf05:3083 with SMTP id i4-20020a6bb804000000b0067ccf053083mr2170656iof.5.1659679927662; Thu, 04 Aug 2022 23:12:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659679927; cv=none; d=google.com; s=arc-20160816; b=pwYjwppYec4/qVgq5zLv4g6pSOxWMQ2ZSZYH9LHS1q9mheLdZGvZbrL7agr+dR+G4q ifConIRe4+tWFgO2BMiMKI/XFziiBP2J97Lx0iMzLdGHKkrmdyZdQV9oUNqEUahvgRE0 t/tfbwDkJ8nqw2y76asAEu9WZ/Jwn8j8ibD9ZASvd9eWZqmaqB01FD3lRWhd8kASUYGS OV3JaHIxMIgaaTU0WBmvBxNvSL++SqKF8Q1UElyEaOKIhRsfJrhdzvDJ/vW10IoVC3Je lSKEzByM13WFcreEbQ27Kt51ncGqncv8cLDqgqXpYo5hdDjCfwpWa20wZUxEozZZL6N7 GuBQ== 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:to:from:dkim-signature; bh=1XAW9kx1ln50U4kvsN6LDXi80dPu0ANjDGv9FOaAJ6M=; b=y8HGsWZhFBxgq9SQjao1VOn/Vgc8L0tcJn3TSsI6nEFaZ24j6IJagVbEqzhMA1SjW7 Zedj0p9EIHlbhWettXS8ylKwl96DGK7NBAMUnZFAnyM0blkSomqzrH8Fvzry38Q2dlxN BbBpwMEBsGt53LGqGUF/qIhBU5qaAlkJGN+hvAPl7SFnFKLqK4kOHsDWrWAlwCHH/G2V RbyX72VOVmuGiDTSQ3GoSLRsCzCZiUrjDpCm5+R9N+YlKoDWmF5juCIi/bD8pLDly58w 12wnEEkd6ph05Qo2UnsDt+GF5+W6tLMCopz+4LTtk47xGMf9XAfdEEbnQ9yTEMnYODJI nlmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XbLLYb3B; 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 n14-20020a056e021bae00b002dd405dcb02si3320985ili.68.2022.08.04.23.12.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Aug 2022 23:12:07 -0700 (PDT) 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=XbLLYb3B; 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 B7A8B8486E; Fri, 5 Aug 2022 08:12:03 +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="XbLLYb3B"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 04FA38486E; Fri, 5 Aug 2022 08:12:02 +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.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-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) (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 4EC1D84877 for ; Fri, 5 Aug 2022 08:11:59 +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-wr1-x42e.google.com with SMTP id l4so2044897wrm.13 for ; Thu, 04 Aug 2022 23:11:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=1XAW9kx1ln50U4kvsN6LDXi80dPu0ANjDGv9FOaAJ6M=; b=XbLLYb3B4ynwNUqEE0khbGak34333v9Dt8FfE7V/M3+m7es9gSljDeFeqWbITJw11T /wRnD0tLTiFuh1SOVxYCsNOSZCsmCAB43xHYrgDg8mECGjvQMw9KM8CFv34Wp0Z7Atdc pKQxr1KzK6HzbO7I/TvkIQEjJczkxDhRmlpD6NdJ/IqAautg6Yiq0ghsunwSbYZkVl8O QHtFFlMoziJRVVE6hTFESZGM6nQ2rEgE6LDtEFNDfFQoD4hMilNyDMQhFpGwDDYgVIDV HdGcq2QdTMFnVtTwbzPGlvtMs2r+ygS3c2cSkGEAclzijYNX4ba9MMtOYx+frYoqwEN6 50xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=1XAW9kx1ln50U4kvsN6LDXi80dPu0ANjDGv9FOaAJ6M=; b=v4eZHiJeP9oR2Q1dAw0CGpjgGPrR+ObkVENaDvpRFc6V19HNfT8A/sGc4KgKVbuRGH LMxsPa3SsMHztGA2UPXuLdz7HnJVM1RZnwsBJgFVsWvd4jRXbQY3pvanaU53jsahQVjh 8IjHTrLYyNnpGTTTSTFp2n5ZNTfUNV9m6oyaJnZAr5CT8agGAEeLLZ6EoTH4BZK6F7HS fOdOP2+JBZxLTBI/LqNMisUWlATVA3FvP+Ldk+cR002DV/8sAbdrhcTAz8VVxHYP3fgY mtE5gc/vvMhb/5SMMsC+O1Eo3mn8HAKq48perC1qR274ABuSAyPWpFIMbkHi04J79wKV uVlQ== X-Gm-Message-State: ACgBeo1emK6fvqvJIfpEu4jnLm/9tZUg60xOckpxMl+8npV4CNf46YKo ECN1PXgn6a3qkbIVbdngUYW6c+yZHS5rzmr6 X-Received: by 2002:adf:ce10:0:b0:221:760e:17fc with SMTP id p16-20020adfce10000000b00221760e17fcmr386474wrn.495.1659679918711; Thu, 04 Aug 2022 23:11:58 -0700 (PDT) Received: from localhost.localdomain ([46.103.15.185]) by smtp.gmail.com with ESMTPSA id cc11-20020a5d5c0b000000b002205ffe88edsm522151wrb.31.2022.08.04.23.11.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Aug 2022 23:11:58 -0700 (PDT) From: Ilias Apalodimas To: u-boot@lists.denx.de, trini@konsulko.com Subject: Pull request for tpm-030822 Date: Fri, 5 Aug 2022 09:11:51 +0300 Message-Id: <20220805061151.3817-1-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.36.1 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 707b17f64e71fad1615ea25082f2e928f712e366: MAINTAINERS: Change POWERPC MPC85XX maintainer to Marek BehĂșn (2022-08-01 10:08:43 -0400) are available in the Git repository at: https://source.denx.de/u-boot/custodians/u-boot-tpm/ tags/tpm-030822 for you to fetch changes up to de70619dd3db08e4a1ac881801d3fab979408fd3: test: rng: Add a UT testcase for the rng command (2022-08-02 23:50:02 +0300) CI: https://source.denx.de/u-boot/custodians/u-boot-tpm/-/pipelines/13023 Please pull Thanks /Ilias ---------------------------------------------------------------- TPM devices generally have a builtin RNG. When booting via EFI the Linux kernel relies on EFI_RNG_PROTOCOL for enabling KASLR. Adjust the driver model and expose functions to retrieve a random number. With the above changes the EFI subsystem can install the EFI_RNG_PROTOCOL even if the target hardware only has a TPM, but no other RNG. ---------------------------------------------------------------- Ilias Apalodimas (1): efi_loader: initialize the RNG protocol after the TCC2 Simon Glass (1): tpm: Export the TPM-version functions Sughosh Ganu (6): tpm: rng: Add driver model interface for TPM RNG device tpm: Add the RNG child device cmd: rng: Add support for selecting RNG device cmd: rng: Use a statically allocated array for random bytes doc: rng: Add documentation for the rng command test: rng: Add a UT testcase for the rng command cmd/Kconfig | 1 + cmd/rng.c | 42 +++++++++++++------- doc/usage/cmd/rng.rst | 26 ++++++++++++ doc/usage/index.rst | 1 + drivers/rng/Kconfig | 9 +++++ drivers/rng/Makefile | 1 + drivers/rng/tpm_rng.c | 23 +++++++++++ drivers/tpm/tpm-uclass.c | 40 ++++++++++++++++--- include/tpm_api.h | 10 +++++ lib/Kconfig | 1 + lib/efi_loader/efi_setup.c | 14 +++---- lib/tpm_api.c | 98 +++++++++++++++++++++------------------------- test/dm/rng.c | 29 ++++++++++++++ 13 files changed, 213 insertions(+), 82 deletions(-) create mode 100644 doc/usage/cmd/rng.rst create mode 100644 drivers/rng/tpm_rng.c