Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp11279506rwd; Thu, 22 Jun 2023 11:02:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ51nTPz3xNmxDXc26scbY6nSUJGZYCSshL3uS01yIYuMlKJN7urWouEUtRZLSHW2iyYWDII X-Received: by 2002:a05:6358:1a9c:b0:132:3ac2:caaf with SMTP id gm28-20020a0563581a9c00b001323ac2caafmr4744085rwb.20.1687456950466; Thu, 22 Jun 2023 11:02:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687456950; cv=none; d=google.com; s=arc-20160816; b=E0QFVDhbWyaSficjqcRCGDqfXFNloRtOuNsY7lIFFhOu7bbEUQhAkX5WitDK4REbgk pqau9DnideU5BISRAirMKMraSzzQzx1xO+39eZRJFxmHsWaUUv6gWr5uTyG/75VQDgx7 xq3GxEDmO2CBJPF5ZHnEh/RuknQY/9aD0AqiTyQD35A+Vzu86GZjbZmIGvcMwweZkv5L m/dPYmu/5r4rV5yLdY9UcNrbiaWREpRAjk0NB0sUCPVKpPaSifrSfGgWMvgeCHcR3Q7l lodalUGVz3ixxtZVXyO4YlRIvKe+I2u5HCNkWWYssDqa0gS0Httjo+qNXSLHHI0nMnjF t/xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jXRt9dPC9QnsXFBQBaEE3wiB397xMxO9wSNemigQiw4=; b=uIPiw6nmtgozzQxKQgyqLdAzElaB0HNFjkR/PtZdKeGbbawOfn9nfvpiwtIKDl3aTD uZKhObFvRW0EsQTh5C8PgkF0Y+tmeSvD3FBNaLLzPe9B3/DC6typRP0t6TuluyZymTI0 teXWecWjHQUTC+A3cApEjeBOr+LvsH7iQxTg1QaT/+1e4NCBN3umP3fX/9dJkiTjWIhd PJzuhCs2OIkn5PLkjro195oHe6wl/BbVqa+IZRFtdda0G90iAhaZwKCqyVxxAeLxEzYS UkMikZvSMTQ9dops1Hrk6WvHFZDKXsSkfJZESfs+AfPBVF6tWaUzunCPPdGSYA/R69xI qxOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SLLthQNj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k1-20020a636f01000000b0054ffea27c23si6405441pgc.285.2023.06.22.11.02.15; Thu, 22 Jun 2023 11:02:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SLLthQNj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230185AbjFVRlV (ORCPT + 99 others); Thu, 22 Jun 2023 13:41:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbjFVRlU (ORCPT ); Thu, 22 Jun 2023 13:41:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38CC31BE1; Thu, 22 Jun 2023 10:41:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BF633618CD; Thu, 22 Jun 2023 17:41:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9155BC433C0; Thu, 22 Jun 2023 17:41:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687455678; bh=YAOh3PltHuv3oiVdQk7pp6PuM5ji7zkTeX46kRr9GsA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SLLthQNjRf6xNoc1hI5BkPHrZjL1FjjBmrbUNEM7rLK76EaHjMAwPGMaYsnG4NMgH XGl317enxqEC0vOWOlZvBoLZsOWU/iRi5WgOywc+9VRbTpGs3AADnq1ioaStdEZULn 0HAPYCYsBsc9BKf9d6GgyK3cMYVsk880L0Vqq/mBFtHlJj4j77qVUZ7ubZ9nD9jRqt QC9TzCb3fGYYmv4/H0GUCLyuQQtuSiS89PSvYT7FG5ZbS1BXGec+ZFc9g3YIBzqiHd VgOByMiNMzIjJOht5jGLtLICV6qfbNvt4eVgOOwF1YxZQY77Xp9U3vrZcnz7yWg+s2 Q5mskb8E5DMfg== Date: Thu, 22 Jun 2023 18:41:13 +0100 From: Conor Dooley To: Alexandre Ghiti Cc: Andrew Jones , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Sunil V L , Song Shuai , linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= Subject: Re: [PATCH v2 2/3] Documentation: riscv: Add early boot document Message-ID: <20230622-clone-overfed-21ec0886e904@spud> References: <20230621072234.9900-1-alexghiti@rivosinc.com> <20230621072234.9900-2-alexghiti@rivosinc.com> <20230621-d6da578719f8af903d6746ef@orel> <20230622-4af59422f118ea634836d351@orel> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kh9jAV9zzKnGH3pC" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --kh9jAV9zzKnGH3pC Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 22, 2023 at 07:32:23PM +0200, Alexandre Ghiti wrote: > On Thu, Jun 22, 2023 at 7:24=E2=80=AFPM Andrew Jones wrote: > > > > On Wed, Jun 21, 2023 at 02:19:50PM +0200, Andrew Jones wrote: > > > On Wed, Jun 21, 2023 at 09:22:33AM +0200, Alexandre Ghiti wrote: > > ... > > > > +Hardware description > > > > +-------------------- > > > > + > > > > +The firmware can pass either a devicetree or ACPI tables to the RI= SC-V kernel. > > > > + > > > > +The devicetree is either passed directly to the kernel from the pr= evious stage > > > > +using the `$a1` register, or when booting with UEFI, it can be pas= sed using the > > > > +EFI configuration table. > > > > + > > > > +The ACPI tables are passed to the kernel using the EFI configurati= on table. In > > > > +this case, a tiny devicetree is still created by the EFI stub. Ple= ase refer to > > > > +"EFI stub and devicetree" tree section below for details about thi= s devicetree. > > > ^ redundant 'tree' here > > > > > > > Can whoever applies this drop this 'tree' I pointed while applying? >=20 > Yes, sorry: @Conor Dooley give me the overly long lines you wanted me > to break and I'll send a v3, it won't take much time and I'll fix this > too! Look, I said it was pure pedantry on my part, and not something that helps with understanding. You've been warned! diff --git a/Documentation/riscv/boot.rst b/Documentation/riscv/boot.rst index 019ee818686d..a52793fd9f6c 100644 --- a/Documentation/riscv/boot.rst +++ b/Documentation/riscv/boot.rst @@ -143,11 +143,12 @@ be carefully examined. Device-tree mapping via fixmap ------------------------------ =20 -The RISC-V kernel uses the fixmap region to map the devicetree because the -devicetree virtual mapping must remain the same between :c:func:`setup_vm`= and -:c:func:`setup_vm_final` calls since the :c:var:`reserved_mem` array is -initialized with virtual addresses established by :c:func:`setup_vm` and u= sed -with the mapping established by :c:func:`setup_vm_final`. + +As the :c:var:`reserved_mem` array is initialized with virtual addresses +established by :c:func:`setup_vm`, and used with the mapping established by +:c:func:`setup_vm_final`, the RISC-V kernel uses the fixmap region to map = the +devicetree. This ensures that the same virtual mapping is used by both +functions. =20 Pre-MMU execution ----------------- --kh9jAV9zzKnGH3pC Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZJSHuQAKCRB4tDGHoIJi 0jsVAQDEXMV48OW7eoZ1+j6mFXAUoK4gEfiDynMorze08Q3uqgEA6tiHd5oOT7Lt VRIIRuWAwkwl7eEczS4ibrV8mm0sAAo= =BX7b -----END PGP SIGNATURE----- --kh9jAV9zzKnGH3pC--