From patchwork Wed Jan 25 14:48:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 646560 Delivered-To: patch@linaro.org Received: by 2002:a17:522:b9de:b0:4b9:b062:db3b with SMTP id fj30csp315060pvb; Wed, 25 Jan 2023 06:50:52 -0800 (PST) X-Google-Smtp-Source: AMrXdXvnhvsgrL+IYPovRf1l2qKDh0ALDWdEip1CVuausMSvEPid/rCGny7HYuqal5U0cyHns8c9 X-Received: by 2002:a05:6830:1103:b0:66e:c88f:992d with SMTP id w3-20020a056830110300b0066ec88f992dmr15178227otq.30.1674658252165; Wed, 25 Jan 2023 06:50:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674658252; cv=none; d=google.com; s=arc-20160816; b=FERqCzdivni45Q40xp9C4s4P7Exmv6qQSHkMzT4mO1w+U1oXQ/SUFnbzrLJZpRqSKi 6bFSvrKKbZcizK/1Ny5OEPFiAAVDe2Bj27QBpkKpnk2kP73a2cGhQqeMZxbqWFFOJM8P D9H+tcKBUVRzDH2tLOfPKYIH4e9WKkCasUWKTUurWDmGm1n5d+z+yOSdMlPbKrajJ4nw d4Kiy+MI0WBvtpbDvxgDTuG2knF04OaLv0sZ9hec5ybpRez8xyFv6sXhQCEGWtlUW/vR OpAtjooWeJDjHxexx3mudj/9Wy9/3lejfoVSUbyMJsPwfuIjj8H/pHAY5IEHjxjqoIZn YcyQ== 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=OilGK1mftFnUBqVlsIktR0LqPpPfkUMxifI8HXfvKpo=; b=z0J7nqoKzCZziRhiOfSS+yrUT8oBs6RHw5btAhKkRM+r8rpqw3AzWIjLsyMt2nR4s9 dAj2WvAPsGK/s7jMy2nkgfO6BqnhXT3MtsKxxCtH49iQxhdMOqYEFeoY/pr3UZ5wHKR7 D3vayhXGzH4bp8w2x1C2lEWLHRFWJ2QzvVm3pGu8UrgQFIcDIyGz4+8nEXux7nHRUkl2 YpyJ5CBs0EQxeHK0y7E4iiU2ZmzUgN4oUrEsWQgFTzJ9yucuw98XzSQ8CY4H/vGTmkt7 9atdt8h5cYMCs2bAkoV8jenXR4Vv3MU6ZLMBNnJ80LYlhB4jBkJL+6dWhyBKRB7Sy9Rf tTQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pNmOktea; 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 g17-20020a9d1291000000b00686809f8859si4339265otg.167.2023.01.25.06.50.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 06:50:52 -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=pNmOktea; 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 F1F75854C2; Wed, 25 Jan 2023 15:49:20 +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="pNmOktea"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 73DA585117; Wed, 25 Jan 2023 15:49:09 +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-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (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 4E6BF854C2 for ; Wed, 25 Jan 2023 15:49:06 +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-ed1-x536.google.com with SMTP id k20so4866578edj.7 for ; Wed, 25 Jan 2023 06:49:06 -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=OilGK1mftFnUBqVlsIktR0LqPpPfkUMxifI8HXfvKpo=; b=pNmOkteaijnB9aP+J+yr222WpdVzJpwCqnry57S/pJ3vXlkwMHmIEu5gZkopBv9foB VgZpPr9/8M+yx+tQeto7yTzYnkP20tgBd6jG7RvrX0UxZaXOwgX+gwmSUtWkMWjxNGQA iD+Qj7oxIc7oYt4spirT8AldzTh3ZGs5rDJFWIBsYhy7OVoJNelgJBswX9wd4AzpMNUr 9QwVnlKy9TWqItAyg7RY4VtkDgTRcBWgKjmwuhLtooiKZHs4V13zW7MLLfLGTADzoKEx ZdrNvsMaRAm/1iDKHroEBnqNHJqux4rmDBIWjM9XRP5GKnLMgn+UVvdQDPgTZaJNGsfh 37Vw== 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=OilGK1mftFnUBqVlsIktR0LqPpPfkUMxifI8HXfvKpo=; b=jMfobTkt1mUO1XtEVylBRQlxVrzAvSOm65nH/FreZaRKCrd7XxXAKRLQU4TP5kVNAw HQvQlmpq5pvXUbpejkyWmsxbsQBzsFzcy+WGA1vg6vM14csMkSp8FeKNsdZiVi5gwezG wnnMB80cwGKvJY4eayUDNQQdatX88bnwsrH3S1fBS1mTzZ06MrlbTqgJElQfGIshjSPO HOm221RB/Agzf6r4ZzfWZg0b+Bt6zc4kRX2UveysuMp9rOVYvvnbR+hJ+/yOPjH8D0eP PKDa57gMdrmZ3G/lSmRe6og5D4Q1iSjPo4zHpxVSK/nX0xnQLMxz1nV2TAp2BV5u6jNE UT2w== X-Gm-Message-State: AFqh2kodf9xxjgEVwDS2K7AoqmLTphmIve93KMTGI4KFQHzOEmw6lDjS LbGZ8SoW3+fmWEfklOfuMk4jFMsTFwR4P1JJ X-Received: by 2002:a05:6402:197:b0:481:420e:206d with SMTP id r23-20020a056402019700b00481420e206dmr32297388edv.42.1674658145891; Wed, 25 Jan 2023 06:49:05 -0800 (PST) Received: from localhost.localdomain ([2a02:85f:fc9d:e4b5:cead:ddc2:38f4:7162]) by smtp.gmail.com with ESMTPSA id ec52-20020a0564020d7400b0049ef05260besm2455683edb.59.2023.01.25.06.49.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 06:49:05 -0800 (PST) From: Ilias Apalodimas To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Heinrich Schuchardt , Simon Glass , Sughosh Ganu Subject: [PATCH 2/2 v2] efi_loader: use tpm_auto_start for the tpm device Date: Wed, 25 Jan 2023 16:48:50 +0200 Message-Id: <20230125144851.532154-2-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230125144851.532154-1-ilias.apalodimas@linaro.org> References: <20230125144851.532154-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 A previous commit is adding a new tpm startup functions which initializes the TPMv2 and performs all the needed selftests. Since the TPM selftests might be needed depending on the requested lgorithm or functional module use that instead. Signed-off-by: Ilias Apalodimas --- lib/efi_loader/efi_tcg2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.38.1 diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c index 918e9a268641..d035a00d98ac 100644 --- a/lib/efi_loader/efi_tcg2.c +++ b/lib/efi_loader/efi_tcg2.c @@ -2422,7 +2422,7 @@ efi_status_t efi_tcg2_register(void) } /* initialize the TPM as early as possible. */ - err = tpm_startup(dev, TPM_ST_CLEAR); + err = tpm_auto_start(dev); if (err) { log_err("TPM startup failed\n"); goto fail;