From patchwork Wed Mar 22 17:04:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gabriel L. Somlo" X-Patchwork-Id: 1759930 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=oYGQ4JSb; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=djl9uuN1; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PhZbY48byz1yWp for ; Thu, 23 Mar 2023 04:05:13 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=w0lxiW6dI3TMdUYWYIp5X4t5b0B1MWX2fVNZGiVJXd0=; b=oYGQ4JSbh07TRO /wgsA76sNBxtpJpb1ZpPZxiKA+mLt2dHKLtJKLu2kQpswBbOse+Q2j6FDX1CfCrB3arZcojlSQ/TT B/N07wliBu3pZhbn8YEcXcUVhWw7x3UZrAwc3MLwXVFbqBRLXxlduvAMjhhyRMa4Upxo0KT7RFaqr OznFBR9yWxUuVuF+i6vU5j9APDNxcaet8VgTzlhMshULiU/P2gPZoXvCwK85ZIbnO1YQQ+MpsEw2o v1Dob1xvxX1n5P/1ajqGJKX2D7zKJ6D/0yLcfvY7lGAuIEBTfRo8IKe9+Nf4SuFMDpLCTYDubF692 W/qCEZ2hptjoTPQi2CQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pf1tT-00GmSP-2e; Wed, 22 Mar 2023 17:04:59 +0000 Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pf1tR-00GmR8-0f for opensbi@lists.infradead.org; Wed, 22 Mar 2023 17:04:58 +0000 Received: by mail-qt1-x82e.google.com with SMTP id t19so9380643qta.12 for ; Wed, 22 Mar 2023 10:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679504694; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=KrQ9QGwXOSJHCOG0GILgvbMYxdvUClwM76L/9QzVKRE=; b=djl9uuN1Ap3956PXZzB7dYuYTcf/j27rIn4pq6fuhblidexShOZuz2bQNC4Q1/TnA5 AecpCsiKTdUlD97ZcW5OSdo1h+PXWWL82CjtJn7VHT8xVpwkujbSAZJyhdRayqIa+lGQ JiNx7kA7s0ldF4UkSCETFRQooRjVYek9F550qX7IQtljRLRv5xPhSyXVOoih2wyj7kJ5 3f8lUD1kN+EUqJw1cIhTS/SUquQoyf33DM/sw/c/MxoWOYn1bOSTf759fxd364CwDyN/ bJqvqRtLynWUtnMv5mE00UXbF6yltpcCFhA/OqlTrzJ7RWrXxqPW5iiXUmA/LsjzmttL 8j3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679504694; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KrQ9QGwXOSJHCOG0GILgvbMYxdvUClwM76L/9QzVKRE=; b=AcgDsBGJ7HcrfcYBYObXPj0DMjlAUsfqbZIkEYL38/Txq2r95qL4tgzx90hJmvfg1V taFFGX9lZOdNlOUj3p59rvp+U/tjC7hkuKh7z2S5ooU6ceVo1fYGGuWxWZBGgozwuJxV PSWxKPDGW2XFBl/9ht30AfdXtZ4G3WkOOXni4nYhevXpKpbsDvxtlOQ8Klrd0qUTouN+ P9ZZoBGFECkFJ8vmJmjfZoGQJUpSF3v6yWn94YhxmrYWvfSlnumko+/dzCkl/60Oo5eJ +UEpNa3owSy1TSY73Stm6WBnQCXhOB5Zeor4++vjSfndnnpjq5AYCI5FyCo+f3HOvMs5 PHHA== X-Gm-Message-State: AO0yUKUSiXgeShQS+5n7rUOlXJ+EYy7umjt0+v5wibECZvEaklyJkbdr Jnb+AI570AoQ0VBka6g/zW3rnIk9quA= X-Google-Smtp-Source: AK7set9DNpwFvB8ZS+hcVym2P3MurlG6QDWh1GT669+IECFUptjwvdsPP1xy2BYUcnqFwMsdUH4eiw== X-Received: by 2002:ac8:5c0c:0:b0:3bf:e43f:6992 with SMTP id i12-20020ac85c0c000000b003bfe43f6992mr6147098qti.57.1679504693962; Wed, 22 Mar 2023 10:04:53 -0700 (PDT) Received: from glsvmlin.ini.cmu.edu (GLSVMLIN.INI.CMU.EDU. [128.2.16.9]) by smtp.gmail.com with ESMTPSA id c7-20020ac86e87000000b003e1ff058350sm5517408qtv.63.2023.03.22.10.04.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 10:04:53 -0700 (PDT) From: Gabriel Somlo To: opensbi@lists.infradead.org Subject: [PATCH v1] docs: Correct FW_JUMP_FDT_ADDR calculation example Date: Wed, 22 Mar 2023 13:04:48 -0400 Message-Id: <20230322170448.3600124-1-gsomlo@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230322_100457_276054_2CD2DC85 X-CRM114-Status: UNSURE ( 9.75 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: When using `PLATFORM=generic` defaults, the kernel is loaded at `FW_JUMP_ADDR = FW_TEXT_START + 0x200000`, and the FDT is loaded at `FW_JUMP_FDT_ADDR = FW_TEXT_START + 0x2200000`. Therefore, the maximum kernel size before `FW_JUMP_FDT_ADDR` must be increased is the difference, or `0x2000000`. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:82e listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [gsomlo[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org When using `PLATFORM=generic` defaults, the kernel is loaded at `FW_JUMP_ADDR = FW_TEXT_START + 0x200000`, and the FDT is loaded at `FW_JUMP_FDT_ADDR = FW_TEXT_START + 0x2200000`. Therefore, the maximum kernel size before `FW_JUMP_FDT_ADDR` must be increased is the difference, or `0x2000000`. Update the example calculation to reflect this, and avoid confusion. Signed-off-by: Gabriel Somlo --- docs/firmware/fw_jump.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/firmware/fw_jump.md b/docs/firmware/fw_jump.md index 956897e..d1b07b9 100644 --- a/docs/firmware/fw_jump.md +++ b/docs/firmware/fw_jump.md @@ -48,12 +48,12 @@ follows: ``` ${CROSS_COMPILE}objdump -h $KERNEL_ELF | sort -k 5,5 | awk -n '/^ +[0-9]+ /\ {addr="0x"$3; size="0x"$5; printf "0x""%x\n",addr+size}' \ - | (( `tail -1` > 0x2200000 )) && echo fdt overlaps kernel,\ + | (( `tail -1` > 0x2000000 )) && echo fdt overlaps kernel,\ increase FW_JUMP_FDT_ADDR ${LLVM}objdump -h --show-lma $KERNEL_ELF | sort -k 5,5 | \ awk -n '/^ +[0-9]+ / {addr="0x"$3; size="0x"$5; printf "0x""%x\n",addr+size}'\ - | (( `tail -1` > 0x2200000 )) && echo fdt overlaps kernel,\ + | (( `tail -1` > 0x2000000 )) && echo fdt overlaps kernel,\ increase FW_JUMP_FDT_ADDR ```