From patchwork Wed May 10 07:43:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 680510 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp2697339wrs; Wed, 10 May 2023 00:45:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ43WBGWmQI6vNX4QQiwyaoTR3ogxxUDuTVf5lRTykc70f2UXv4OVYIE4tTcRpK0L6jU5ZfJ X-Received: by 2002:a17:90b:390e:b0:24d:e975:8b91 with SMTP id ob14-20020a17090b390e00b0024de9758b91mr16154500pjb.40.1683704731712; Wed, 10 May 2023 00:45:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683704731; cv=none; d=google.com; s=arc-20160816; b=mhk7KcgD303ogTJDxzDlw8483QHGInTuITCMgoBIih4oaCjjTS68a5KTS2aqu9oAGX qMQA7aqnalZT/7rD9PyiJm+2ZpQyRrYtQjfSugXk0zFvJNJ5pmbxd8YAY9Dnnl3hKJny n/HRPFpD3ltCNBcHFzxWmLamSK9LEiB5Xw+tWczHi1y1P9n3qMNcncsBxO9l7iSAb8n4 fowdvK8HjRSqlCRXBUYmVDeUkPytF0M1bq0xf2GiOkQ3xDJGYnG9a4H1AXt8jFK4XwT7 t5IRlvwLo6/C1X3hfz/NuA6ArE7Ue8qMloYZGAb/wtKk5hEFOR8PVJQesExkOeQdEAj0 GQ0A== 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=HkcMeLVIrGlB7gHrqQEWq0Sz4FqSVhRBIyPIHp1yj5Q=; b=Tx6qC8H/uLM1hcCCUvFpTiwjsdVzo0sl6xxk0S53F2AoXMUDZxkDq4HVs/hLqYTzS5 8y41HqM1yWSCaQIrzP2pJaY2MxGeYzQAdEvXsy+ArH54VRh/Nx9sgtJvRtRyi1dNcdOb hDTeCjTRF2qQkR4xMt47upFqKPBHoI0yixkQhrn2DBmZkNvA+9DbExnTDDvusVKWVWOz bEJwe77xIQHigFIfjzr2JkJTZGTK5TnINNKcCUtSvfFu4XGgFL+LI3J62qY0WRfeH7Nc 6t5QalaI5lC87J5CEo3Ih31lk5zE0AO+T1EWoW/NDnncY/O3kNW0viFy3OcT7xsi2XpD bIvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GJiTrmH3; 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 x24-20020a63db58000000b0052c419dc8d1si3537493pgi.274.2023.05.10.00.45.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 May 2023 00:45:31 -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=GJiTrmH3; 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 BC58086091; Wed, 10 May 2023 09:44:40 +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="GJiTrmH3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8655086074; Wed, 10 May 2023 09:44:37 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) (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 5619486044 for ; Wed, 10 May 2023 09:44:35 +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-x42d.google.com with SMTP id ffacd0b85a97d-307a8386946so1055660f8f.2 for ; Wed, 10 May 2023 00:44:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683704675; x=1686296675; 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=HkcMeLVIrGlB7gHrqQEWq0Sz4FqSVhRBIyPIHp1yj5Q=; b=GJiTrmH3P70G/tjeUj/vPgl5EfZHOE5GQZl7aI4iTOybHRZZ/8y1fU6YPr618CWRkT TrfenVI1nGvQzW99dh/pkR7USxkBsSQaDhWd5vci30Rwp8SMNJl0lqi4Rgdym3tGf3tq 075vUf19kJBzEPqvHWIIWy/v/ao10DKmwUbj5vKQmfSIhnABd0417+XlfpR0uPFI87rW xmxRy8OKyObygwi50a73Bd9xIxr//gIIcUO7uhJW49FEjhqCjdYUE38Kul5N0RyPk5V2 sBN/+MonmkQOvGx9n0PzhySQS45HwzWKuAOEioan3O4F2ODQp6w6e8+6fa65zEJfNEwV zrsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683704675; x=1686296675; 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=HkcMeLVIrGlB7gHrqQEWq0Sz4FqSVhRBIyPIHp1yj5Q=; b=ICvNgQtgrCTCSglEiZ/U9wSzb/HSlJNRgFh3fW7HyjHrMuWAs+olxpZjlfFsr+eZOl LKFQL6Ojb/uBICTiRcGRmW04RP55xWbL5/F9K3uulul3sHTaUWgJNCAMOL/feeb5pBbF Qaas2nf6Le7uVbd4qiGez8y37JMyyR87WW5qNXU8Um2opbMRbnQMuEfGZtxgYfRk9vmC 6BLrhUMmVU/wJCmCcxZYGsDJ4tDz74oAiMerdxxeBMTxWSkH06bBkxPB5dfMLQr8up8h 6GQ1u2Liu0Z0f+d4o+DRA7pZ0QFEX67AfbI6xEX/vrn/exameK6xeFmhUquxqHvp23DQ 7g2w== X-Gm-Message-State: AC+VfDx35z62SLH8nZMxc+FnqhuS3+Gni9WjQfjVoxJM1164l+cDWtCq 4thDJzsTjevw44HCO6JHqPwGnGYDU4IbqGGFWqW0+Q== X-Received: by 2002:a5d:6312:0:b0:307:8a9f:cf28 with SMTP id i18-20020a5d6312000000b003078a9fcf28mr7924033wru.38.1683704674847; Wed, 10 May 2023 00:44:34 -0700 (PDT) Received: from localhost.localdomain (ppp176092130041.access.hol.gr. [176.92.130.41]) by smtp.gmail.com with ESMTPSA id p20-20020a1c7414000000b003f435652aaesm2022446wmc.11.2023.05.10.00.44.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 May 2023 00:44:34 -0700 (PDT) From: Ilias Apalodimas To: u-boot@lists.denx.de Cc: Eddie James , Simon Glass , Ilias Apalodimas , Heinrich Schuchardt , Michal Suchanek , Rasmus Villemoes , Dzmitry Sankouski , Robert Marko , Sean Anderson , Nikhil M Jain , Abdellatif El Khlifi , Andrew Davis , Daniel Golle , Safae Ouajih , Mattijs Korpershoek , =?utf-8?q?Pali_Roh=C3=A1r?= , Roger Knecht , Sughosh Ganu , Steven Lawrance , Stephen Carlson , Rui Miguel Silva , Linus Walleij , Marek Vasut , Leo Yu-Chi Liang , Kautuk Consul , Brandon Maier , Patrick Delaunay Subject: [PATCH 6/9] doc: Add measured boot documentation Date: Wed, 10 May 2023 10:43:54 +0300 Message-Id: <20230510074359.2837818-6-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230510074359.2837818-1-ilias.apalodimas@linaro.org> References: <20230510074359.2837818-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.8 at phobos.denx.de X-Virus-Status: Clean From: Eddie James Briefly describe the feature and specify the requirements. Signed-off-by: Eddie James Reviewed-by: Simon Glass --- doc/usage/index.rst | 1 + doc/usage/measured_boot.rst | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 doc/usage/measured_boot.rst diff --git a/doc/usage/index.rst b/doc/usage/index.rst index 0fde130a5480..477ea0ad99fe 100644 --- a/doc/usage/index.rst +++ b/doc/usage/index.rst @@ -13,6 +13,7 @@ Use U-Boot partitions cmdline semihosting + measured_boot Shell commands -------------- diff --git a/doc/usage/measured_boot.rst b/doc/usage/measured_boot.rst new file mode 100644 index 000000000000..8357b1f480f9 --- /dev/null +++ b/doc/usage/measured_boot.rst @@ -0,0 +1,23 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +Measured Boot +===================== + +U-Boot can perform a measured boot, the process of hashing various components +of the boot process, extending the results in the TPM and logging the +component's measurement in memory for the operating system to consume. + +Requirements +--------------------- + +* A hardware TPM 2.0 supported by the U-Boot drivers +* CONFIG_TPM=y +* CONFIG_MEASURED_BOOT=y +* Device-tree configuration of the TPM device to specify the memory area + for event logging. The TPM device node must either contain a phandle to + a reserved memory region or "linux,sml-base" and "linux,sml-size" + indicating the address and size of the memory region. An example can be + found in arch/sandbox/dts/test.dts +* The operating system must also be configured to use the memory regions + specified in the U-Boot device-tree in order to make use of the event + log.