From patchwork Thu Jun 27 08:29:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1953040 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=c+AMh3/w; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8sFd4QGVz20X6 for ; Thu, 27 Jun 2024 18:30:13 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A604C8855E; Thu, 27 Jun 2024 10:30:01 +0200 (CEST) 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="c+AMh3/w"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 454328855C; Thu, 27 Jun 2024 10:29:59 +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.3 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-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (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 6DC58880A5 for ; Thu, 27 Jun 2024 10:29:57 +0200 (CEST) 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-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4256788e13bso323575e9.2 for ; Thu, 27 Jun 2024 01:29:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719476996; x=1720081796; darn=lists.denx.de; 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=XeXW3Qkj/z7FbBVWiNsQkea6rMAPAsdsziJNKVVIk2Y=; b=c+AMh3/wI/9DrByU05FyOMKgYtv/dxMFDyoaWswCdIbk28Zk25L8Ge3OOQMlMjXr5p mX3fbOLuOHYfN8vPuv/waG3XiIiNA0tLAIlAYDioM/hxH24thL8fi3wpS7PntmoyckkP qeJb1ioGN4qB+NSY7rbpebqIKpoCtbMctL+js= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719476996; x=1720081796; 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=XeXW3Qkj/z7FbBVWiNsQkea6rMAPAsdsziJNKVVIk2Y=; b=Cc22KAUdAm3tKZDMQRkHSSdTWyhzbVsClTxomJXj2KDx0gE4oxm9XkmAPSTkdznKt1 u50yuDJwTegnesjJ1ZQih+CZvL2N6osdrC7KsX92cmpvZ5uQDVGAXyGVA/6moT1QI2wx 33wL1dEOWxdeli8Ob1AYCyhp3ORvo0wsownPbSIAF9nwWAq6aFAM2MP+FZyCQg/a4njU Lznm0MZ5cxUQHdLULc9YML1ooh6yM1lzeMQRu6kitxvnqC4LwT5pxMTwJ2RW4CtF8juJ 3DYC31jYVxvW2PXwzY+t+if7fKCrbEfiCHkFKAZRIG3jKVFGv1gkL5qOZb9nANTyBb5A xmfw== X-Gm-Message-State: AOJu0YwcPL7Wie9bAW0T0HIyLHNCuYpJ3ZjTe1rERPIz8FUHvbo52FNE q9H9Npys6HbKDxkppzQwSxZupSQoXt5SuOnLjl4c1fu2wKJ8zYr3y5a1QsLI3xsmqSsXbUdqLb6 kdw== X-Google-Smtp-Source: AGHT+IHwXOurhtCK6jiDB1RfJnImk071Hu7AK/+L5rXx1/twPRpXOPvbGjuYJRgBxJ+gtvYu+HYWrQ== X-Received: by 2002:a05:600c:c7:b0:424:a4b9:7eb4 with SMTP id 5b1f17b1804b1-424a4b97f4amr51640305e9.30.1719476996465; Thu, 27 Jun 2024 01:29:56 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3674357c1c8sm1106534f8f.9.2024.06.27.01.29.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jun 2024 01:29:56 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH v6 1/8] nvidia: nyan-big: Disable debug UART Date: Thu, 27 Jun 2024 09:29:42 +0100 Message-Id: <20240627082949.357089-2-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240627082949.357089-1-sjg@chromium.org> References: <20240627082949.357089-1-sjg@chromium.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 This cannot be enabled early in boot since some other init is needed. At this point it is unclear exactly what init is needed, so disable the debug UART to avoid a hang. Signed-off-by: Simon Glass --- (no changes since v1) configs/nyan-big_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/nyan-big_defconfig b/configs/nyan-big_defconfig index 1483d17d975..4dec710cf8d 100644 --- a/configs/nyan-big_defconfig +++ b/configs/nyan-big_defconfig @@ -17,7 +17,6 @@ CONFIG_TEGRA124=y CONFIG_TARGET_NYAN_BIG=y CONFIG_TEGRA_GPU=y CONFIG_SYS_LOAD_ADDR=0x82408000 -CONFIG_DEBUG_UART=y CONFIG_FIT=y CONFIG_FIT_BEST_MATCH=y CONFIG_BOOTSTAGE=y From patchwork Thu Jun 27 08:29:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1953041 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=ZV/SnurR; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8sFr5GSQz20X6 for ; Thu, 27 Jun 2024 18:30:24 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4AE5988580; Thu, 27 Jun 2024 10:30:02 +0200 (CEST) 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="ZV/SnurR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 33C0388572; Thu, 27 Jun 2024 10:30:00 +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.3 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-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (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 CDBBA8852D for ; Thu, 27 Jun 2024 10:29:57 +0200 (CEST) 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-wr1-x42b.google.com with SMTP id ffacd0b85a97d-366de090da9so3585513f8f.1 for ; Thu, 27 Jun 2024 01:29:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719476997; x=1720081797; darn=lists.denx.de; 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=4AgDkU3kc+gE9cH9KGK92Fgrg6aAJ0qflIR6mzpaVBA=; b=ZV/SnurRwSxhA/72bix6uhMH7qiRp0Qvk6Dv6KkQ5S3uaGPenadaseknTePP3X+6uX KSOwoL5DR9C3p5vFG3cQuaZOW8Be9ccMOmqLuuijb/3PnF/l1Z799yRDc3vvThRns1Gk QvG/xL3wKHROn8DmCGURUPnVEwlS3jozG4Zh0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719476997; x=1720081797; 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=4AgDkU3kc+gE9cH9KGK92Fgrg6aAJ0qflIR6mzpaVBA=; b=nZwSGukvZnvfmMClYZaGlCGJkmCjhpBaQfuT0SPpP6WQNXJBXMWPlmTNIafYGJK9jE cwQjsGClq2EU01c6fIgnt3qnafyEz1rtFGWLBrIIlAxXQ1jL428rCGdgEbTzj7yhTsuH ED/lOeTBy0njbiSk+WJ2kD+GhwR/E4IskjI8aPhYiTa6tVChVgcLqxnMLldCfKhiv7XA +IZsP6jqdLL/gyQ+AxPCfybpa3IGC1P53pOp1DF2cM9zFHKTkWQUTBvXlrdhRLnqY2qv JCpICyG7IJUhpNez44SHGV9bdzhRms2rqPSImkN9OytMCO2L+EGLd5xFrjMr97gac+Pt JNCA== X-Gm-Message-State: AOJu0YzGzSyMyLZCOztAjpjC5BTnc71wZT6bB+SzbufH2y3vJ5w/IF38 rI0ZL8jyN8lA8RTrXUjX7CNkvH3CzxBDO3nfYfJ5/GHXXEQtT29R0jU8l1+Ij2F+2yrE3FSrtad Lug== X-Google-Smtp-Source: AGHT+IHET53KxcWwA3ULVzcNEFACGKh5FmTt9KrVkuXLws0sFClKnZkINu51iemf2AsGJ222ZmV3iA== X-Received: by 2002:adf:e881:0:b0:367:3d12:4ffd with SMTP id ffacd0b85a97d-3673d125212mr1458735f8f.18.1719476997139; Thu, 27 Jun 2024 01:29:57 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3674357c1c8sm1106534f8f.9.2024.06.27.01.29.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jun 2024 01:29:56 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Heinrich Schuchardt Subject: [PATCH v6 2/8] tpm: Avoid code bloat when not using EFI_TCG2_PROTOCOL Date: Thu, 27 Jun 2024 09:29:43 +0100 Message-Id: <20240627082949.357089-3-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240627082949.357089-1-sjg@chromium.org> References: <20240627082949.357089-1-sjg@chromium.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 It does not make sense to enable all SHA algorithms unless they are needed. It bloats the code and in this case, causes chromebook_link to fail to build. That board does use the TPM, but not with measured boot, nor EFI. Since EFI_TCG2_PROTOCOL already selects these options, we just need to add them to MEASURED_BOOT as well. Note that the original commit combines refactoring and new features, which makes it hard to see what is going on. Fixes: 97707f12fda tpm: Support boot measurements Reviewed-by: Heinrich Schuchardt Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Put the conditions under EFI_TCG2_PROTOCOL - Consider MEASURED_BOOT too boot/Kconfig | 4 ++++ lib/Kconfig | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/boot/Kconfig b/boot/Kconfig index 36bdc83b957..4c9d2c0f79a 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -734,6 +734,10 @@ config LEGACY_IMAGE_FORMAT config MEASURED_BOOT bool "Measure boot images and configuration when booting without EFI" depends on HASH && TPM_V2 + select SHA1 + select SHA256 + select SHA384 + select SHA512 help This option enables measurement of the boot process when booting without UEFI . Measurement involves creating cryptographic hashes diff --git a/lib/Kconfig b/lib/Kconfig index 189e6eb31aa..568892fce44 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -438,10 +438,6 @@ config TPM bool "Trusted Platform Module (TPM) Support" depends on DM imply DM_RNG - select SHA1 - select SHA256 - select SHA384 - select SHA512 help This enables support for TPMs which can be used to provide security features for your board. The TPM can be connected via LPC or I2C From patchwork Thu Jun 27 08:29:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1953042 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=eWVBaHSA; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8sG41f8wz20X6 for ; Thu, 27 Jun 2024 18:30:36 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BFFC088582; Thu, 27 Jun 2024 10:30:02 +0200 (CEST) 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="eWVBaHSA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F3F6688579; Thu, 27 Jun 2024 10:30:00 +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.3 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-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) (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 12B61884A7 for ; Thu, 27 Jun 2024 10:29:59 +0200 (CEST) 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-lj1-x236.google.com with SMTP id 38308e7fff4ca-2ed5ac077f5so21046131fa.1 for ; Thu, 27 Jun 2024 01:29:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719476998; x=1720081798; darn=lists.denx.de; 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=JfQhvNgKcrCfr+fuDoJ/yQIZ0hGftxiA34nh3+CI+jY=; b=eWVBaHSAMqqR30Miu5lFuGKHw5kx3RrN2/K28syGlrqdUruTjN2KR62+/mwEVpJsek JChiU6c89haiLfNxG7ivg53URVsOltgZy67YsqIQJpm/6lOaXBs7+pFa4RCa5wjV+6cc RIYvBgB6trs2ollVIMnQmeieDTthOPJ0zoEvo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719476998; x=1720081798; 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=JfQhvNgKcrCfr+fuDoJ/yQIZ0hGftxiA34nh3+CI+jY=; b=C9rDT1CuhvlI2/bIahkDgLHARM49H5yusbGpokdoXDj/zZSgfir5QS5XH8MTZaN/// GF3SC/63YaySgS/RlPbF/iUsAHRcmdFfS5z3Vj/I83ksVGBoDnbvdJ82qY9ZGVCK1P5H hMi0umh+p2Kcpq6o1O7CdfcjzajA35smmua0z2PDw8gMX3BmFCxvFw/N1gkMjU3hhyHe 00Zz7lsgd7VtrqzCaQj3U7qpnWAGWibKJoh6XZbbCexSZMqZF0stXmlSNOvws1gRo8Bs Q0FxP0iZpXmeFPjFY3uSGSlhlAGJwFDCqp94gGPEeW05h3zWrWgFMV0mcbssafzMPUo/ wyvw== X-Gm-Message-State: AOJu0YxPmX1zFqfz2f5M+qiEA5tfui8bPCimBNrsuQDHf92cp8BOe1xW ZWmSk3xRRgmz5YNR1UY8PYh8bZSzY0NKlNsbvKpS+7g62UtehzS7IEzqhvTXGZ2SZeIZMO9NXAn 78w== X-Google-Smtp-Source: AGHT+IHxX05NrfrVHEjKR4/B0yW1+GfMcEx91OOZH8usdCVhxy1i2ezzOc7kBI6OBaRwOm2CH/naBQ== X-Received: by 2002:a19:7612:0:b0:52c:d639:dd4b with SMTP id 2adb3069b0e04-52ce06442eamr7522871e87.23.1719476997895; Thu, 27 Jun 2024 01:29:57 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3674357c1c8sm1106534f8f.9.2024.06.27.01.29.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jun 2024 01:29:57 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Bin Meng Subject: [PATCH v6 3/8] x86: Set a board-size limit for chromebook_link Date: Thu, 27 Jun 2024 09:29:44 +0100 Message-Id: <20240627082949.357089-4-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240627082949.357089-1-sjg@chromium.org> References: <20240627082949.357089-1-sjg@chromium.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 Set a size limit for this board so that we get a build error if it grows too much. Note that the limit is approximately, since it does not include the FDT, microcode and fdtmap, which can change in size. However this board is fairly stable, so overflowing this limit will likely result in the image not fitting in the ROM space available for U-Boot. Signed-off-by: Simon Glass --- (no changes since v4) Changes in v4: - Add new patch to set a board-size limit for chromebook_link configs/chromebook_link_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/chromebook_link_defconfig b/configs/chromebook_link_defconfig index a9f91dd9b26..1a72fd178a8 100644 --- a/configs/chromebook_link_defconfig +++ b/configs/chromebook_link_defconfig @@ -15,6 +15,8 @@ CONFIG_DEBUG_UART=y CONFIG_HAVE_MRC=y CONFIG_SMP=y CONFIG_HAVE_VGA_BIOS=y +CONFIG_HAS_BOARD_SIZE_LIMIT=y +CONFIG_BOARD_SIZE_LIMIT=630000 CONFIG_FIT=y CONFIG_BOOTSTAGE=y CONFIG_BOOTSTAGE_REPORT=y From patchwork Thu Jun 27 08:29:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1953043 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=T7q2zq67; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8sGH1VVkz20X6 for ; Thu, 27 Jun 2024 18:30:47 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 46DA38856B; Thu, 27 Jun 2024 10:30:03 +0200 (CEST) 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="T7q2zq67"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4430288579; Thu, 27 Jun 2024 10:30:01 +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.3 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-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) (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 59C7C8855E for ; Thu, 27 Jun 2024 10:29:59 +0200 (CEST) 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-wr1-x442.google.com with SMTP id ffacd0b85a97d-36742cc9c12so342812f8f.2 for ; Thu, 27 Jun 2024 01:29:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719476998; x=1720081798; darn=lists.denx.de; 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=A6d6Au1EjTcFyCj48QfjSy1CLH2vHtoyvSNInjPJf5g=; b=T7q2zq67rNUUR7EqTgylXjonDFE3dBt71nXhLC0cGyjfvIWzQoBUCHfhtuWXUg08MK 0pJtNiASswRL57hCtu9ZtG4SvX2Le43no+hpqOuLQlECbhRPS/9LKD8Tf2jF6I2iZabS XMJD2Pka95C8l+Rla93OaylltNkZHZxBaWLIE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719476998; x=1720081798; 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=A6d6Au1EjTcFyCj48QfjSy1CLH2vHtoyvSNInjPJf5g=; b=wqn7AjmVsO+NnmC2F9VHnlUMFgTW/ILCJeViqWOusUiRx4Jik2/b4zKLYuFew1mjaP ewN9V+FKbAu8g/AdS9LCFBC1Y6QJ0tqaFF8DOoYRf5NlOyliyOtYJZ4dPfA0HkLs7rac 5xV7b3/EpFxknoMee5ZFEA+Td5N5TtxW16CEiR5InC0zrh6rJrOaKCO7RDe9gi0nd1+/ LtXgpXuXqU+kS+6lsZILLOTb9lTTwW5EG9/N3Mv+ujPxAaeIAual1oxw+5YlKdKHbIeX qDhnVEvltbnCbUje9CBB9uyHh9DRojm8cvvdHXS38KT+Mez4S2cVsn+Gm3rJc5CDGwl6 64Bg== X-Gm-Message-State: AOJu0Yze+KB2B+wEt/4AoGb3d9wtP5Z5RxK+6zsTXjOA7Ygv4+SJb9rA BaVLlyay1GFCBX3ro7nltJM26xUsRvmnI9lkXnmHRd2aaM1SpJf0QFnkH0bmaKSgUDr7haHdl41 0rj6o X-Google-Smtp-Source: AGHT+IEGP4CA2+hYeLkTxC+TUnS2A98lEpnhGQNKPtGQeapDFTvODvcYEDCx8H4jT/n6ij0gFSzLjQ== X-Received: by 2002:adf:e50e:0:b0:360:88bc:644b with SMTP id ffacd0b85a97d-366e96442fbmr7605177f8f.58.1719476998607; Thu, 27 Jun 2024 01:29:58 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3674357c1c8sm1106534f8f.9.2024.06.27.01.29.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jun 2024 01:29:58 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Quentin Schulz , Jeffy Chen , huang lin Subject: [PATCH v6 4/8] rockchip: veyron: Add logging for power init Date: Thu, 27 Jun 2024 09:29:45 +0100 Message-Id: <20240627082949.357089-5-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240627082949.357089-1-sjg@chromium.org> References: <20240627082949.357089-1-sjg@chromium.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 Add better logging for power init so that CONFIG_LOG_ERROR_RETURN can be enabled. Signed-off-by: Simon Glass Reviewed-by: Quentin Schulz --- (no changes since v2) Changes in v2: - Remove the superfluous if() and drop the debug() as well board/google/veyron/veyron.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/board/google/veyron/veyron.c b/board/google/veyron/veyron.c index 32dbcdc4d10..6d4c9debdee 100644 --- a/board/google/veyron/veyron.c +++ b/board/google/veyron/veyron.c @@ -29,44 +29,38 @@ static int veyron_init(void) int ret; ret = regulator_get_by_platname("vdd_arm", &dev); - if (ret) { - debug("Cannot set regulator name\n"); - return ret; - } + if (ret) + return log_msg_ret("vdd", ret); /* Slowly raise to max CPU voltage to prevent overshoot */ ret = regulator_set_value(dev, 1200000); if (ret) - return ret; + return log_msg_ret("s12", ret); udelay(175); /* Must wait for voltage to stabilize, 2mV/us */ ret = regulator_set_value(dev, 1400000); if (ret) - return ret; + return log_msg_ret("s14", ret); udelay(100); /* Must wait for voltage to stabilize, 2mV/us */ ret = rockchip_get_clk(&clk.dev); if (ret) - return ret; + return log_msg_ret("clk", ret); clk.id = PLL_APLL; ret = clk_set_rate(&clk, 1800000000); if (IS_ERR_VALUE(ret)) - return ret; + return log_msg_ret("s18", ret); ret = regulator_get_by_platname("vcc33_sd", &dev); - if (ret) { - debug("Cannot get regulator name\n"); - return ret; - } + if (ret) + return log_msg_ret("vcc", ret); ret = regulator_set_value(dev, 3300000); if (ret) - return ret; + return log_msg_ret("s33", ret); ret = regulators_enable_boot_on(false); - if (ret) { - debug("%s: Cannot enable boot on regulators\n", __func__); - return ret; - } + if (ret) + return log_msg_ret("boo", ret); return 0; } @@ -81,7 +75,7 @@ int board_early_init_r(void) if (!fdt_node_check_compatible(gd->fdt_blob, 0, "google,veyron")) { ret = veyron_init(); if (ret) - return ret; + return log_msg_ret("vey", ret); } #endif /* From patchwork Thu Jun 27 08:29:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1953044 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=CB+EjQoB; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8sGW2TDJz20X6 for ; Thu, 27 Jun 2024 18:30:59 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 03A8A88549; Thu, 27 Jun 2024 10:30:06 +0200 (CEST) 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="CB+EjQoB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 22A308857E; Thu, 27 Jun 2024 10:30: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.3 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-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) (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 235A788571 for ; Thu, 27 Jun 2024 10:30:00 +0200 (CEST) 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-wr1-x433.google.com with SMTP id ffacd0b85a97d-3608e6d14b6so4836456f8f.0 for ; Thu, 27 Jun 2024 01:30:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719476999; x=1720081799; darn=lists.denx.de; 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=bJXFsCW6LCl1bXkmZ8sKbXEiUPqgjCbPoT+lGmHDHLY=; b=CB+EjQoB1TIeKbJnL8RsaqmpL/7irKONX2hoxaN5EW7K8IoJWbBZamzNUP2xuw9o9c i2a6iOsUwapbeSoF1HyNBg5VjoBOneO2RI7m63/jZ9wRYz0YRd4EcuWBcnd7Dc1nk7VK MKijJTeUY9A7zNmXZrDT06AeCGADKbrze7DN0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719476999; x=1720081799; 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=bJXFsCW6LCl1bXkmZ8sKbXEiUPqgjCbPoT+lGmHDHLY=; b=DxyVJEzc4nb8SLphhP5oIsg0Li3MOUsyUvQv7PZZT4dM7hNuuGUzmBrT6+KpkG0rx1 qtSUJglfn1b1GTDH/2/5+ycQSkYs/I6pfa7UZMBPn+xF93KOx0lvREcVb2EmtM/6+RUZ f99H4178Gpc4cNZxjT9OL9Gd2EngTxFj6sL9zQ2lArUd9RZI65XX59179ABgv3R26BoK +Uo0uwOS2J0XfoC+jpk8/ywGrg2W39s7A86QEmY4Xf6oisfrsK6LbUXUlfRdqINIBufW pU9MeMK+vXAQbpiXgy7Y+cgH6ogEmnh9tzkAdsG5XmeFnnY9oFIjFhmfiVpc5GQjfcd2 2wFA== X-Gm-Message-State: AOJu0YyewHd8olhQpz0sPzPz9h4Wf+BK0IGfUIOBTMWaNVAHDDRg59oF Eu3x36AvouIOAXPtAzR9xlRINb59Of8RNrgsl9AricE/EThxATsPmBQCoKOPszGbiEBYNddcl/M 4EA== X-Google-Smtp-Source: AGHT+IF1VfVA9eDx6CcbP0rSI0s7wPAKb6qhcl8Y5o1CcJqvtvXlse3T9r7lgtQPJ0sH5Scl5j8MCQ== X-Received: by 2002:adf:e507:0:b0:367:4165:ad4 with SMTP id ffacd0b85a97d-36741650be0mr965508f8f.16.1719476999479; Thu, 27 Jun 2024 01:29:59 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3674357c1c8sm1106534f8f.9.2024.06.27.01.29.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jun 2024 01:29:59 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Jonas Karlman , Quentin Schulz , Lukasz Majewski Subject: [PATCH v6 5/8] power: regulator: Handle autoset in regulators_enable_boot_on() Date: Thu, 27 Jun 2024 09:29:46 +0100 Message-Id: <20240627082949.357089-6-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240627082949.357089-1-sjg@chromium.org> References: <20240627082949.357089-1-sjg@chromium.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 With a recent change, regulators_enable_boot_on() returns an error if a regulator is already set. Check for and handle this situation. Fixes: d99fb64a98a power: regulator: Only run autoset once for each regulator Reviewed-by: Jonas Karlman Reviewed-by: Quentin Schulz Signed-off-by: Simon Glass --- (no changes since v1) drivers/power/regulator/regulator-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c index 77d101f262e..d9e1fb68295 100644 --- a/drivers/power/regulator/regulator-uclass.c +++ b/drivers/power/regulator/regulator-uclass.c @@ -518,7 +518,7 @@ int regulators_enable_boot_on(bool verbose) dev; uclass_next_device(&dev)) { ret = regulator_autoset(dev); - if (ret == -EMEDIUMTYPE) { + if (ret == -EMEDIUMTYPE || ret == -EALREADY) { ret = 0; continue; } From patchwork Thu Jun 27 08:29:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1953045 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=cvNFZEcy; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8sGm0B2Xz20X6 for ; Thu, 27 Jun 2024 18:31:12 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D4E8688572; Thu, 27 Jun 2024 10:30:06 +0200 (CEST) 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="cvNFZEcy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DAAB68859A; Thu, 27 Jun 2024 10:30: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.3 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-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) (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 D688B88572 for ; Thu, 27 Jun 2024 10:30:00 +0200 (CEST) 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-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-42565670e20so1806105e9.0 for ; Thu, 27 Jun 2024 01:30:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719477000; x=1720081800; darn=lists.denx.de; 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=JPDTBpVZuVkaqULrtYe8FXz9i1e5MJHdje88Wa78OmY=; b=cvNFZEcyt5YL2Sk9liIQzRC+wt0SaaPuV5YR6jnZ6Vwa60L5ldvBnmEeUTpOws1kn4 hrXPthMAyWcOjwX35352a0aBI1pXFo+TTTy1ovpf8oboXuz5ju3S2WPMiV1fKNNJUFRW E551eTQ7qL3sYo2fcEuaeu67eF+k7wB6P8ALM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719477000; x=1720081800; 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=JPDTBpVZuVkaqULrtYe8FXz9i1e5MJHdje88Wa78OmY=; b=AGSfRVtrn7phvGPNZxUxYDLVSzRYqceWjqZFmWiCsIUpXL2AGYJp3OEFR2YVffHUtK mrfH0eKwWh51uOlB2VvZ7YJoVbhgizN5phIOSOXZj4a7iBXzOC2KungnW1sxgSLhjRVd t4qF+XUDJH2+Pkjfg4HfzTy9zBbWCc2/mogzmaQCSqNk2k2yI4pLaYtrUoFbATrjLQMA 0QsSiqqfz1zaTE3SFdQaSs/IejZTQt+NY04jEQY/rLKNi/VkWckvNeTZqSXecjXkjXkU 7FhkQIP6T6OhayivH/6xnN/664+OYmOfaD1zBLKYUUp/CNCw/8W1KWU+6DIdXeNz4bk2 I36Q== X-Gm-Message-State: AOJu0YxmiSrLWrVBJowRHZTbADiAvXz93fjABbxCxTByH2Sp5P1FxhwF 3mAsN1lo/mXNxxTkkpJ+9BBs+yineUiFqna10zceVwaiibEIY7WnDj7p//ShawI7WrhAmlC25u0 muw== X-Google-Smtp-Source: AGHT+IE0WtOtmveYPHln9CIffpOmhUUtVH+m1jMqnEK+qATy6S0EJ2KIHoItFie5N8WdLduGKmwJ7g== X-Received: by 2002:a5d:548b:0:b0:366:e308:f9a1 with SMTP id ffacd0b85a97d-3673cc7f1b3mr1718118f8f.23.1719477000175; Thu, 27 Jun 2024 01:30:00 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3674357c1c8sm1106534f8f.9.2024.06.27.01.29.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jun 2024 01:29:59 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH v6 6/8] spl: Allow ATF to work when dcache is disabled Date: Thu, 27 Jun 2024 09:29:47 +0100 Message-Id: <20240627082949.357089-7-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240627082949.357089-1-sjg@chromium.org> References: <20240627082949.357089-1-sjg@chromium.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 The dcache may not be enabled in SPL. Add a check to avoid trying to use an undefined function. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) common/spl/spl_atf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c index 3bdd013a35f..9afe6456bc4 100644 --- a/common/spl/spl_atf.c +++ b/common/spl/spl_atf.c @@ -204,7 +204,8 @@ static void __noreturn bl31_entry(uintptr_t bl31_entry, uintptr_t bl32_entry, fdt_addr); raw_write_daif(SPSR_EXCEPTION_MASK); - dcache_disable(); + if (!CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) + dcache_disable(); atf_entry(bl31_params, (void *)fdt_addr); } From patchwork Thu Jun 27 08:29:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1953046 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=UBa6DPuZ; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8sGz3FC1z20X6 for ; Thu, 27 Jun 2024 18:31:23 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 50E8E8858B; Thu, 27 Jun 2024 10:30:07 +0200 (CEST) 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="UBa6DPuZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 71CB4884DD; Thu, 27 Jun 2024 10:30:04 +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.3 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-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (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 B85458857A for ; Thu, 27 Jun 2024 10:30:01 +0200 (CEST) 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-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-42562a984d3so7621775e9.3 for ; Thu, 27 Jun 2024 01:30:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719477001; x=1720081801; darn=lists.denx.de; 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=CiMow7s4j2CsLyjXWJPRpZ4yYDVro6zP4w6YhlUwuAw=; b=UBa6DPuZuN9ezZogmLCjIjvff2vTagN6XG8m0njEP8gAM+8oBsI7cSk+wM5lgpJY5U de7BHLmTz44KCQ9mzVhyQXPeKL4fGFuoPiKxduNxpp01dx0rCv3hGe0Ycp/+cROdBPv3 mM43IyfxhV006v3rW661LKtQrbjW1/iXF2h4Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719477001; x=1720081801; 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=CiMow7s4j2CsLyjXWJPRpZ4yYDVro6zP4w6YhlUwuAw=; b=Lqm846rfYjjssPCFyFGfxtwKrCzkVsFfszlZ1FbT4rk1ImCuUYe6bXbV2Ij0cItQNR 4vqII3s6VAc/ooKhDD20zZXJhgOxTNg2NjOWzfiN4qbOF0eoCItpUbbOTxzHxb5FeGMm bMiA5WTuLLDe01JtYgH3mzHRecKJigXvbFBfDCVe2KMGShxlsDqMCZRSbg30NxGQSOdA ZqZJog1n9Fkeh9Daz0wZnAiF39A0Ja65nk5+SxKrXhLxp/DTfVYNmBddKoSS+inuFHjh Lww77KKMD8itS2o4YBYyh/rk0eTJ6u38M8FIqOYeqOO7wtN90ZZ3759+lqAMXjT9q8qi ExqA== X-Gm-Message-State: AOJu0YymUYYnlmmo8sZcHnkgeCbnTGrN9ATlCQE4acCtjILYxjTZfbIB Z6AlaloiQ/NzdolRvOrIbEsUfSyJ8X1DEc9ZlKiSB/fcuBzFvaMzORsoEDqnvVIsseauh08pNj2 p1Q== X-Google-Smtp-Source: AGHT+IEDGzu3guCkXmGlXr8+KU1y93LBatWWAypwcxVYCQOtGaY+/IQWLlrVtwjLJnY2Vq5F9bTYSw== X-Received: by 2002:a05:600c:210d:b0:425:6561:477b with SMTP id 5b1f17b1804b1-4256561481cmr6776705e9.40.1719477001064; Thu, 27 Jun 2024 01:30:01 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3674357c1c8sm1106534f8f.9.2024.06.27.01.30.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jun 2024 01:30:00 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Jeffy Chen , Jonas Karlman , Quentin Schulz , huang lin Subject: [PATCH v6 7/8] rockchip: bob: kevin: Disable dcache in SPL Date: Thu, 27 Jun 2024 09:29:48 +0100 Message-Id: <20240627082949.357089-8-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240627082949.357089-1-sjg@chromium.org> References: <20240627082949.357089-1-sjg@chromium.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 This causes a hang, so disable it. Unfortunately the RAM-size fix does not resolve the problem and I am unsure what is wrong. As soon as the cache is enabled the board appears to hang. Fixes: 6d8cdfd1536 ("rockchip: spl: Enable caches to speed up checksum validation") Signed-off-by: Simon Glass --- (no changes since v1) configs/chromebook_bob_defconfig | 1 + configs/chromebook_kevin_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/chromebook_bob_defconfig b/configs/chromebook_bob_defconfig index acfe3934104..b2ecfa6050c 100644 --- a/configs/chromebook_bob_defconfig +++ b/configs/chromebook_bob_defconfig @@ -1,5 +1,6 @@ CONFIG_ARM=y CONFIG_SKIP_LOWLEVEL_INIT=y +CONFIG_SPL_SYS_DCACHE_OFF=y CONFIG_COUNTER_FREQUENCY=24000000 CONFIG_ARCH_ROCKCHIP=y CONFIG_TEXT_BASE=0x00200000 diff --git a/configs/chromebook_kevin_defconfig b/configs/chromebook_kevin_defconfig index 95fdb418d82..da748e4f022 100644 --- a/configs/chromebook_kevin_defconfig +++ b/configs/chromebook_kevin_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_SKIP_LOWLEVEL_INIT=y CONFIG_COUNTER_FREQUENCY=24000000 CONFIG_ARCH_ROCKCHIP=y +CONFIG_SPL_SYS_DCACHE_OFF=y CONFIG_TEXT_BASE=0x00200000 CONFIG_SPL_GPIO=y CONFIG_NR_DRAM_BANKS=1 From patchwork Thu Jun 27 08:29:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1953047 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=eBeqPDHs; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8sHK4yrDz20X6 for ; Thu, 27 Jun 2024 18:31:41 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 67402885A4; Thu, 27 Jun 2024 10:30:10 +0200 (CEST) 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="eBeqPDHs"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1768B88569; Thu, 27 Jun 2024 10:30:06 +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.3 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-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (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 DC4D388572 for ; Thu, 27 Jun 2024 10:30:02 +0200 (CEST) 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-wr1-x434.google.com with SMTP id ffacd0b85a97d-3608e6d14b6so4836477f8f.0 for ; Thu, 27 Jun 2024 01:30:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719477002; x=1720081802; darn=lists.denx.de; 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=BmoXNBYVFrospD2TCLEmd7FUTXRsZen2gmLgiCnYL2w=; b=eBeqPDHsg3y7/B2z65ItTieMww05dDfKoqsHchIAQopMebTLE9llbP55St7ombG0eH Oq192v732iRKh8YqpgKWTIY0ktMGaOqQaYPMA9CwGFkAIO4IN1o6QbvjmRk2XiTkPyBt nFlipLXz81pzO8oiw4E5ViDBXBuMG5AHemyxM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719477002; x=1720081802; 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=BmoXNBYVFrospD2TCLEmd7FUTXRsZen2gmLgiCnYL2w=; b=hggT3qoKHO6A/hGiQS6Pt+L5RrSwkEuu7Umr/bv7GzdPR/YxNC5Bbh3rJNXdskNpFH PQ+6lIZZmJLPTt91zIbEe5+eaa26K8lrSyyFuXaqtB0SX0yLIGNhy4XCuwFglKdNBCTu upB86ku2PYQgIBoUIf+NEpnw7D74Q+DUsKQVrQyFE1NnIkO6Ijo5922QBlaSTVeuJfHs ASCE8r8SgLBpcp8VI3OvNM0jeRkhQOp4vqXAq21JL2LnsrNPNnxw/zhUPHA3yQn3ls0R Zli2DoD9gUNagODRGFulgGTaZne1ddvM6HaT5iR44j7C3dip+rlZu+kXBHQieomv7cm1 CSNA== X-Gm-Message-State: AOJu0YxB07RHe4uFbexH7vXXMt4QFbU5diIhXi6ohmi2Y9nGsqMZO9Ll /eM+Ur3YpzPfT3VUhD5so9FL83XYmTr+z2Vi53w/+bdCnts3DFHLKHBfH2lW3pGquWJW7r5mkGy maw== X-Google-Smtp-Source: AGHT+IFDM8LfhvCOdGqnq7qcfj2a4qOJM70FHlESfszUH2RpqptPSr8jwSGXPG6HjzS0/IAg1g5xPw== X-Received: by 2002:adf:9b0a:0:b0:35f:2b1d:433 with SMTP id ffacd0b85a97d-366e94948dbmr7022765f8f.26.1719477002172; Thu, 27 Jun 2024 01:30:02 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3674357c1c8sm1106534f8f.9.2024.06.27.01.30.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jun 2024 01:30:01 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH v6 8/8] Drop the special am335x_boneblack_vboot target Date: Thu, 27 Jun 2024 09:29:49 +0100 Message-Id: <20240627082949.357089-9-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240627082949.357089-1-sjg@chromium.org> References: <20240627082949.357089-1-sjg@chromium.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 Now that am335x_evm boots OK on the Beaglebone black, drop the latter and update the docs to cover the change. Also add a few updates about 'make fit' and drop the note about the security review, as U-Boot's verified boot has had quite extensive review now. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v4) Changes in v4: - Fix 'stating' typo - Move Binman size feature to a separate series Changes in v2: - Drop patch "regulator: rk8xx: Fix incorrect parameter" - Rewrite boneblack patch to onstead drop the target and update docs board/ti/am335x/MAINTAINERS | 1 - configs/am335x_boneblack_vboot_defconfig | 94 ------------------------ configs/am335x_evm_defconfig | 3 +- doc/usage/fit/beaglebone_vboot.rst | 21 +++--- 4 files changed, 12 insertions(+), 107 deletions(-) delete mode 100644 configs/am335x_boneblack_vboot_defconfig diff --git a/board/ti/am335x/MAINTAINERS b/board/ti/am335x/MAINTAINERS index 219c8715bf1..ed8800a2663 100644 --- a/board/ti/am335x/MAINTAINERS +++ b/board/ti/am335x/MAINTAINERS @@ -3,6 +3,5 @@ M: Tom Rini S: Maintained F: board/ti/am335x/ F: include/configs/am335x_evm.h -F: configs/am335x_boneblack_vboot_defconfig F: configs/am335x_evm_defconfig F: configs/am335x_evm_spiboot_defconfig diff --git a/configs/am335x_boneblack_vboot_defconfig b/configs/am335x_boneblack_vboot_defconfig deleted file mode 100644 index d473a1a793b..00000000000 --- a/configs/am335x_boneblack_vboot_defconfig +++ /dev/null @@ -1,94 +0,0 @@ -CONFIG_ARM=y -CONFIG_ARCH_CPU_INIT=y -# CONFIG_SPL_USE_ARCH_MEMCPY is not set -# CONFIG_SPL_USE_ARCH_MEMSET is not set -CONFIG_ARCH_OMAP2PLUS=y -CONFIG_TI_COMMON_CMD_OPTIONS=y -CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y -CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x4030ff00 -CONFIG_SF_DEFAULT_SPEED=24000000 -CONFIG_DEFAULT_DEVICE_TREE="am335x-boneblack" -CONFIG_AM33XX=y -CONFIG_CLOCK_SYNTHESIZER=y -CONFIG_SPL=y -CONFIG_ENV_OFFSET_REDUND=0x280000 -CONFIG_TIMESTAMP=y -CONFIG_FIT_SIGNATURE=y -CONFIG_FIT_VERBOSE=y -CONFIG_SYS_BOOTM_LEN=0x1000000 -CONFIG_DISTRO_DEFAULTS=y -CONFIG_AUTOBOOT_KEYED=y -CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n" -CONFIG_AUTOBOOT_DELAY_STR="d" -CONFIG_AUTOBOOT_STOP_STR=" " -CONFIG_BOOTCOMMAND="run findfdt; run init_console; run finduuid; run distro_bootcmd" -CONFIG_SYS_CONSOLE_INFO_QUIET=y -CONFIG_ARCH_MISC_INIT=y -CONFIG_SPL_SYS_MALLOC=y -CONFIG_SPL_SYS_MALLOC_SIZE=0x800000 -CONFIG_SPL_MUSB_NEW=y -# CONFIG_SPL_NAND_SUPPORT is not set -CONFIG_SPL_NET=y -CONFIG_SPL_NET_VCI_STRING="AM33xx U-Boot SPL" -CONFIG_SPL_OS_BOOT=y -CONFIG_SPL_FALCON_BOOT_MMCSD=y -CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR=0x1700 -CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR=0x1500 -CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS=0x200 -CONFIG_CMD_SPL=y -CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2 -# CONFIG_CMD_SETEXPR is not set -CONFIG_BOOTP_DNS2=y -CONFIG_OF_CONTROL=y -CONFIG_SPL_OF_CONTROL=y -CONFIG_ENV_OVERWRITE=y -CONFIG_ENV_IS_IN_MMC=y -CONFIG_SYS_REDUNDAND_ENVIRONMENT=y -CONFIG_SYS_RELOC_GD_ENV_ADDR=y -CONFIG_SYS_MMC_ENV_DEV=1 -CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -CONFIG_VERSION_VARIABLE=y -CONFIG_NET_RETRY_COUNT=10 -CONFIG_BOOTP_SEND_HOSTNAME=y -# CONFIG_SPL_BLK is not set -CONFIG_BOOTCOUNT_LIMIT=y -CONFIG_SYS_BOOTCOUNT_BE=y -CONFIG_DFU_MMC=y -CONFIG_DFU_RAM=y -CONFIG_USB_FUNCTION_FASTBOOT=y -CONFIG_DM_I2C=y -CONFIG_MISC=y -CONFIG_SYS_I2C_EEPROM_ADDR=0x50 -# CONFIG_SPL_DM_MMC is not set -CONFIG_MMC_OMAP_HS=y -CONFIG_MTD=y -CONFIG_DM_SPI_FLASH=y -CONFIG_SPI_FLASH_WINBOND=y -CONFIG_PHY_ATHEROS=y -CONFIG_PHY_SMSC=y -CONFIG_PHY_GIGE=y -CONFIG_MII=y -CONFIG_DRIVER_TI_CPSW=y -CONFIG_DM_PMIC=y -# CONFIG_SPL_DM_PMIC is not set -CONFIG_PMIC_TPS65217=y -CONFIG_SPL_POWER_TPS65910=y -CONFIG_SPI=y -CONFIG_DM_SPI=y -CONFIG_OMAP3_SPI=y -CONFIG_TIMER=y -CONFIG_OMAP_TIMER=y -CONFIG_USB=y -CONFIG_DM_USB_GADGET=y -CONFIG_SPL_DM_USB_GADGET=y -CONFIG_USB_MUSB_HOST=y -CONFIG_USB_MUSB_GADGET=y -CONFIG_USB_MUSB_TI=y -CONFIG_USB_GADGET=y -CONFIG_SPL_USB_GADGET=y -CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" -CONFIG_USB_GADGET_VENDOR_NUM=0x0451 -CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 -CONFIG_USB_ETHER=y -CONFIG_SPL_USB_ETHER=y -CONFIG_LZO=y diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig index d243cb16e72..cabc181460a 100644 --- a/configs/am335x_evm_defconfig +++ b/configs/am335x_evm_defconfig @@ -13,6 +13,8 @@ CONFIG_AM335X_USB0_PERIPHERAL=y CONFIG_AM335X_USB1=y CONFIG_SPL=y CONFIG_TIMESTAMP=y +CONFIG_FIT_SIGNATURE=y +CONFIG_FIT_VERBOSE=y CONFIG_SPL_LOAD_FIT=y CONFIG_SYS_BOOTM_LEN=0x1000000 CONFIG_DISTRO_DEFAULTS=y @@ -119,5 +121,4 @@ CONFIG_SPL_USB_ETHER=y CONFIG_WDT=y # CONFIG_SPL_WDT is not set CONFIG_DYNAMIC_CRC_TABLE=y -CONFIG_RSA=y CONFIG_LZO=y diff --git a/doc/usage/fit/beaglebone_vboot.rst b/doc/usage/fit/beaglebone_vboot.rst index cd6bb141910..1298ba1ae08 100644 --- a/doc/usage/fit/beaglebone_vboot.rst +++ b/doc/usage/fit/beaglebone_vboot.rst @@ -67,18 +67,20 @@ a. Set up the environment variable to point to your toolchain. You will need export CROSS_COMPILE=arm-linux-gnueabi- -b. Configure and build U-Boot with verified boot enabled:: +b. Configure and build U-Boot with verified boot enabled. Note that we use the +am335x_evm target since it covers all boards based on the AM335x evaluation +board:: export UBOOT=/path/to/u-boot cd $UBOOT # You can add -j10 if you have 10 CPUs to make it faster - make O=b/am335x_boneblack_vboot am335x_boneblack_vboot_config all - export UOUT=$UBOOT/b/am335x_boneblack_vboot + make O=b/am335x_evm am335x_evm_config all + export UOUT=$UBOOT/b/am335x_evm c. You will now have a U-Boot image:: - file b/am335x_boneblack_vboot/u-boot-dtb.img - b/am335x_boneblack_vboot/u-boot-dtb.img: u-boot legacy uImage, + file b/am335x_evm/u-boot-dtb.img + b/am335x_evm/u-boot-dtb.img: u-boot legacy uImage, U-Boot 2014.07-rc2-00065-g2f69f8, Firmware/ARM, Firmware Image (Not compressed), 395375 bytes, Sat May 31 16:19:04 2014, Load Address: 0x80800000, Entry Point: 0x00000000, @@ -466,7 +468,7 @@ the private key that you signed with so that it can verify any kernels that you sign:: cd $UBOOT - make O=b/am335x_boneblack_vboot EXT_DTB=${WORK}/am335x-boneblack-pubkey.dtb + make O=b/am335x_evm EXT_DTB=${WORK}/am335x-boneblack-pubkey.dtb Here we are overriding the normal device tree file with our one, which contains the public key. @@ -597,14 +599,11 @@ Further Improvements Several of the steps here can be easily automated. In particular it would be capital if signing and packaging a kernel were easy, perhaps a simple make -target in the kernel. +target in the kernel. A starting point for this is the 'make image.fit' target +for ARM64 in Linux from v6.9 onwards. Some mention of how to use multiple .dtb files in a FIT might be useful. -U-Boot's verified boot mechanism has not had a robust and independent security -review. Such a review should look at the implementation and its resistance to -attacks. - Perhaps the verified boot feature could be integrated into the Amstrom distribution.