From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jTAqT-0002KF-Qm for mharc-grub-devel@gnu.org; Mon, 27 Apr 2020 16:59:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55266) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTAqQ-0002JM-Uw for grub-devel@gnu.org; Mon, 27 Apr 2020 16:59:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTAqP-0006Gg-5a for grub-devel@gnu.org; Mon, 27 Apr 2020 16:59:14 -0400 Received: from mout.gmx.net ([212.227.17.21]:53991) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jTAqO-0006GI-4w for grub-devel@gnu.org; Mon, 27 Apr 2020 16:59:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1588021141; bh=KN2MYJvrTw1K4OfZRemPK7O2C3KDfXZYU6InoIVJrF4=; h=X-UI-Sender-Class:Date:In-Reply-To:References:Subject:To:CC:From; b=HeowcFlvltVBYSQU0wPd3Ee6vccFGYalICJB3hQvmnveFlgQfJsINs/kMcbvzkhsa KN9Etwjr+iSlQnCtlolQRQHm/1+ONUvOxnJ0gj+9mlS2vcVGSEy8LRfzelu7rABXju r/AFA8X7fuuXXEClLVCf1Xc2+Z820SQ2IMshYrSw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost ([84.119.33.226]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MbRjt-1iw2sn3KLx-00bv9U; Mon, 27 Apr 2020 22:59:00 +0200 Date: Mon, 27 Apr 2020 20:58:57 +0000 In-Reply-To: References: <20200426194007.382925-1-atish.patra@wdc.com> <20200427110106.r2jqkaeheiw3lunl@tomti.i.net-space.pl> <68c6f6a8-6c13-f2f4-f2ca-287c3f5330f4@gmx.de> <0C4E5FD2-6DE1-4A42-84E1-2202F62E04A5@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH RFC/RFT 0/3] Add grub loader support for RISC-V Linux To: Ard Biesheuvel CC: Daniel Kiper , Atish Patra , grub-devel@gnu.org, David Abdurachmanov , Leif Lindholm , Alexander Graf , Chester Lin , Ilias Apalodimas From: Heinrich Schuchardt Message-ID: <28180641-DF47-48A2-A675-1351B83FA073@gmx.de> X-Provags-ID: V03:K1:4lbOD7V6mbV1KD9NccSKuTmld8fDSeXtWUCsXpSK8t4WF/CXCmk RUYgcWDuvCO85KovakoWkmuGjFUb4S+/yWwvFIIU3EaOMcCmOzv+CEO1GaMioTsLl92cLJ2 k5b2qnIncG/UOdrXCTKfsXzaLwNsraRVAIGUpOq6MiEb9zc3EKFDcKjU/xIvxzQWGZ/ZNJt RSxjwZTIuhOVc/7CNuyWw== X-UI-Out-Filterresults: notjunk:1;V03:K0:JS8QvWTniqg=:rvAZWO4fCQJ8sR3OgMczjx TiEbeua7svqEFhyahfvKk/23hQafEJbd+9nuIU9vvvJzUmPeVhRqMV/X1BmumNy87GMGzd5jt 3Wbgcx+wWz4ryPdrN7ayPAZNvGxGAUVBW+EupEF7E71hB25DDEvRmjrU6xqeC2LobBJJzkNi/ hzlQnoEYT6qGoJER6B/Px931+bPjOwgbWePPs5/oo3V7jEtkLO40qVG+LsuluodEs0VWBVQ+5 GDgwLXUA8PpHujG30UsbtgpAflsWI8EFmTlesGX3JApyeW0b99qlW9SokSFfyiJf0lQp5wBWV HkD0XMuN9xb0OeHxjAJpEhDpfQ/2xacVnqWq2KwxqVkBT0aIazmATz+5af0/uamPzD6hXslL2 1TKjNvctf5xtGPq2R2map/i3NrwBM26TjGvNonM6uf+qUInjA+Xt8DYK7GO6F0iVDtEn/jYxH URlnejnJUD+8BRSpqblWsZbqzcYE1t7vWV2WD2navjhgR+rvDYQ6OeHHY6ssAzNYfNX7tlcmX 6b3KT+UWvJRGkLSVi8Qq0HX8U2Edl+E8Cf7XzguvuUlOCz9Szjxp3sCT0+H9iGOuTeziz+KUy TP+OoIt9er+v5MRzgJz7FUMYng+3mz5XLQBjvWFjf/J3hLC7SsLhpmWbzdBgCxIdzdueU/oC3 AmuSTQZhgRIez5bQiHbUjevaPc0P+0FjbZgzHa3LdjV1NocdY+zxJ9CkeoFZvySrWdKXr57z0 mxv2IK0G5J5PsiVql0k3wvGY36slfyRmHrcmtsEuhQ7QJfYxSW7dDq0VFf45q/20NDenlp4Gs a4eCAaPf+Zv6ZWYBMvsu6Ra4HvW1grLudd8p7gKqRzHu37GtDmljW9k51pVxKtKW70YADZ+Tm lmXYKBB7juZ2bP+IC6Slqct/me0efKSHKQWy8179ozIJ6tBdfOTvcC0U49aXfycagHqXbEjAb wNmV06LgWqKFjDDilw1oFgYV2l+bTyqMU9yOmtv3KYB3aKP5Qst/VJWX7uPfWTKXuw5gASKkb IvrVWqODF3eRohhdYJA1UINiWqNvuiVDSFHcfOpm081Qdqw5DhBFfFGFNi6jIS4DUwBZ/y1Vp 7RA0b8ewfBGM+84LPjJo2jZNmCCFjBycEgb2f7UauZ8Fn0w6OWdCIJgftWv2iC8vyjClhEi+g JSSt3nyTVs2IUtjz0pTB9dtuhaWU5Tivf3hyWMybGm8+9SSam7V4b5qmmR9PQfbFCOe20AS/B L9PSmJdp/Tl2FVDN4 Received-SPF: pass client-ip=212.227.17.21; envelope-from=xypron.glpk@gmx.de; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/27 16:59:10 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.21 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2020 20:59:16 -0000 Am April 27, 2020 8:52:43 PM UTC schrieb Ard Biesheuvel = : >On Mon, 27 Apr 2020 at 22:47, Ard Biesheuvel wrote: >> >> On Mon, 27 Apr 2020 at 22:47, Heinrich Schuchardt > wrote: >> > >> > Am April 27, 2020 7:39:38 PM UTC schrieb Ard Biesheuvel >: >> > >On Mon, 27 Apr 2020 at 21:36, Heinrich Schuchardt > >> > >wrote: >> > >> >> > >> On 4/27/20 1:01 PM, Daniel Kiper wrote: >> > >> > On Mon, Apr 27, 2020 at 08:15:41AM +0200, Ard Biesheuvel >wrote: >> > >> >> On Sun, 26 Apr 2020 at 21:40, Atish Patra > >> > >wrote: >> > >> >>> >> > >> >>> This series adds grub loader support for RISC-V Linux=2E >Thanks to >> > >the awesome >> > >> >>> initial RISC-V support added by Alex, we just needed a >loader for >> > >RISC-V to >> > >> >>> load and execute Linux using UEFI protocol=2E >> > >> >>> >> > >> >>> Fortunately, ARM64 Linux loader is written in an >architecture >> > >agnostic manner >> > >> >>> so thatgeneric RISC-V can easily reuse the loader code=2E >Thus, the >> > >first patch >> > >> >>> just moves the ARM64 code to common code=2E I have compile >tested >> > >for >> > >> >>> ARM64/ARM32=2E Even though it doesn't introduce any functional >> > >change >> > >> >>> for ARM/ARM64, any real testing will be helpful=2E >> > >> >> >> > >> >> May I suggest that we not blindly adopt the ARM code here, >but >> > >> >> instead, use the new initrd loading protocol that removes the >need >> > >for >> > >> >> GRUB to modify or even know about the device tree at all? >> > >> >> > >> Does this protocol exist in EDK2 by now? >> > >> >> > > >> > >Yes=2E It exists as a shell command, and as a load option for OVMF= =2E >> > > >> > >> In U-Boot there is a basic implementation which can provide a >single >> > >> initrd image with a hardcoded file name=2E The file_path argument >> > >passed >> > >> to U-Boot is ignored due to Ilias' security concerns when he >wrote >> > >the >> > >> patch=2E >> > >> >> > >> GRUB is only needed if we have multiple kernels to choose from >with >> > >> distinct initial ramdisks=2E >> > >> >> > >> Please, describe what you expect the initrd loading protocol to >do >> > >when >> > >> called from GRUB=2E How will the ramdisk fitting the kernel chosen >in >> > >GRUB >> > >> be identified? >> > >> >> > > >> > >The same what GRUB's 'initrd' command does=2E Whichever initrd you >> > >select with it is the one that gets returned by the protocol=2E >> > >> > Will GRUB provide the absolute device path in parameter file_path? >> > >> >> Which parameter 'file_path" is that? > >Ah, I guess you mean the LoadFile2 argument? That is always >end-of-device-path in this case, since the initrd device path only >consists of the vendor media GUID=2E > >The thing to keep in mind here is that the OS does not *choose* an >initrd, it simply loads the one that the bootloader has staged for it=2E How should U-Boot know which initrd fits the kernel chosen by the user in = GRUB? That information exists in grub=2Ecfg only=2E If GRUB cannot provide this information, what is GRUB's added value in the= boot process?