From patchwork Sat Nov 20 00:03:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1557485 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=IbV3/2/z; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Hwv0T3PMzz9sS8 for ; Sat, 20 Nov 2021 11:04:23 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 076C482F45; Sat, 20 Nov 2021 01:04:14 +0100 (CET) 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="IbV3/2/z"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8441B82FB8; Sat, 20 Nov 2021 01:04:11 +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.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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-oo1-xc29.google.com (mail-oo1-xc29.google.com [IPv6:2607:f8b0:4864:20::c29]) (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 0122D82F3E for ; Sat, 20 Nov 2021 01:04:06 +0100 (CET) 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-oo1-xc29.google.com with SMTP id r18-20020a4a7252000000b002c5f52d1834so4275237ooe.0 for ; Fri, 19 Nov 2021 16:04:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=q7R5V5xOtnBYIQaiuSLeufcMXlFx5YeIS9CdSglzYhs=; b=IbV3/2/z5+xoMYJgf7+Qcw2w5TRwXbjPpzGjJlnHqPUeew5UTh4vDxcxhAmMOXTeL4 makCt10vyjsmj8A/brrmm4XkdWX9J1M4UIhZmRl4/g1rTmsQdso4/k7yWw+Hld9rFlmc y2hsBEP7ziLFSQ/BZFAEIoyT546X5zB4hRdj4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=q7R5V5xOtnBYIQaiuSLeufcMXlFx5YeIS9CdSglzYhs=; b=rWw/C+3hGKOBgRd4Yp8A4XGCRzVCAf3YINk2ZaEN+QyUvq/O3v7P7zjMdVlsmuskho JSZWUQI1gp30EJTtQvBISAoX/tfR8Qn8zvJaKvwFy5Gc7q64kS9m+qb4pZ19mxS+qywX ZblGm1mGL1dG+/DeM8ojcpfd9f4zUvu0f+84U6fwumczIYI2QdQ5cCml0ol3X2hSDBe8 7xr5XMZmQkHckljT/0DxYIkVkk+fjU+hP/MfAOH3yGQ+1vz7qRMFRSxM21AidHn/ZlDa yHMdpLZbLFvPguYkXzu2drS52/4tFCNxyubqkTAiBJGwOGLlxnoSa5TRO1HMUYI+KLx2 kHng== X-Gm-Message-State: AOAM531ZyfAT+TnKNxfgeVeKAZqLAz+k8IQbm0sfQTeObVTtBpyCMLXN r49vqvez2opfIgNBePQwQ1yOtg== X-Google-Smtp-Source: ABdhPJzULBdAXe62VY+s0mTxFr6r1+fdutBEanildm1aEkfZhcCPdLMiEqP1zgbUKL3yC4THlYrWfQ== X-Received: by 2002:a4a:2705:: with SMTP id l5mr20097549oof.51.1637366645349; Fri, 19 Nov 2021 16:04:05 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id g7sm274768oon.27.2021.11.19.16.04.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 16:04:04 -0800 (PST) From: Simon Glass To: devicetree@vger.kernel.org Cc: Tom Rini , U-Boot Mailing List , Simon Glass Subject: [PATCH] dt-bindings: u-boot: Add a few more options bindings Date: Fri, 19 Nov 2021 17:03:56 -0700 Message-Id: <20211120000356.1850639-1-sjg@chromium.org> X-Mailer: git-send-email 2.34.0.rc2.393.gf8c9666880-goog MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 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 This adds three new options with varying degree of interest / precedent. This being sent to the mailing list since it might attract more review. A PR will be sent when this has had some review. That is why the file path is set up for https://github.com/devicetree-org/dt-schema rather than the Linux kernel. Signed-off-by: Simon Glass --- schemas/options/u-boot.yaml | 51 +++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/schemas/options/u-boot.yaml b/schemas/options/u-boot.yaml index 71dfda7..b8bdec1 100644 --- a/schemas/options/u-boot.yaml +++ b/schemas/options/u-boot.yaml @@ -71,6 +71,37 @@ properties: 2: use simplified command line (e.g. avoid hush) 3... reserved + load-environment: + $ref: /schemas/types.yaml#/definitions/uint32 + default: 1 + maximum: 1 + description: | + This allows control over whether U-Boot loads its environment after + relocation. This normally happens automatically, but can pose a security + risk, so disabling it in certain situations is useful. + + Note: This could be a boolean. It is defined as an integer since that + allows changing the value without resizing the devicetree. I'm not sure + how ugly that is, but IMO the fact that 'false' boolean values are + represented by being missing is a bit of a pain. One must either add or + delete the property. + + Values: + + 0: don't load the environment + 1: do load the environment + + no-apm-final: + $ref: /schemas/types.yaml#/definitions/flag + description: | + For devices running on coreboot, this tells U-Boot not to lock down the + Intel Management Engine (ME) registers. This allows U-Boot to access the + hardware more fully for platforms that need it. + + Absence of this property indicates that the ME registers should be locked + down as part of U-Boot's start-up sequence and before the command line is + available. + silent-console: $ref: /schemas/types.yaml#/definitions/uint32 default: 0 @@ -88,6 +119,23 @@ properties: enabled) 2: console output is suppressed and not recorded + spl-payload-offset: + $ref: /schemas/types.yaml#/definitions/uint32 + default: 0 + description: | + If present (and SPL is controlled by the devicetree), this allows the + offset of the SPL payload (typically U-Boot) to be specified. The offset + is in bytes from the start of the media (typically SPI flash). + + Note: This is quite widely used in U-Boot, but since v2018.01 it is + possible to use Binman instead, to provide this offset (and various + others) to SPL, or even to U-Boot proper. So far I have not tried sending + the Binman bindings upstream, but perhaps that should be done instead. + + See here for details: + + https://u-boot.readthedocs.io/en/latest/develop/package/binman.html#image-description-format + required: - compatible @@ -101,6 +149,9 @@ examples: bootcmd = "vboot go auto"; bootdelay-sec = <(-1)>; bootsecure = <1>; + load-environment = <0>; + no-apm-final; silent-console = <1>; + spl-payload-offset = <0x40000>; /* 256K */ }; };