From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1mKWLY-00025E-7L for mharc-grub-devel@gnu.org; Sun, 29 Aug 2021 21:44:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKWLW-000256-Gt for grub-devel@gnu.org; Sun, 29 Aug 2021 21:44:22 -0400 Received: from mout.gmx.net ([212.227.15.15]:45013) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKWLR-0006Ux-Mr for grub-devel@gnu.org; Sun, 29 Aug 2021 21:44:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1630287840; bh=9n0+1REvepe0IfF+y3Gi9Hd8caSqux1crCYGYRAdb2Y=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=S5pMArqRrLaEVutOIGcAjLrp2rox2xb7SP54BVjcquo34ZV34J//16kIBrCJIUgRX C31W7xEi82eqI3TxA2Y0I85DIqGQWQKOQxbEKDAFGS4fzbvPebcEBgJHNrcWynoagy eunN3qq7rhR5aTnw7w1ZmOGKKAAIThQNPi2e7x30= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.123.35] ([88.152.144.157]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MFbRs-1mDK0P3610-00H48j; Mon, 30 Aug 2021 03:43:59 +0200 Subject: Re: [PATCH v2 0/7] Add LoadFile2 and riscv Linux loader To: Nikita Ermakov , Fu Wei Cc: Atish Patra , The development of GNU GRUB , Ard Biesheuvel , Atish Patra , Daniel Kiper , Leif Lindholm , Heinrich Schuchardt References: <20210602211235.377366-1-arei@altlinux.org> From: Heinrich Schuchardt Message-ID: Date: Mon, 30 Aug 2021 03:43:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:2BF4r7ynYUh4MWW3nWPqZ0EY7PYHhxN7KSLbn3s8i7OZ8oG2mP4 nIqZIuTAn28hAHddXCMSnm3EKqcW6IC7pqgAubdCMYEf/1R2K0F6JUxQpmu5sb4N9iHCJCb M+qasOwkx/x86xqsQvGGZv+yy0eBUG70U9qI3cNnphVVfxY/3wS6+y+IUGR+16cYmcpyheF D8mihlkHMAi0ENpScsiRQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:NRuWbj5+n6o=:WFLSA5C62iEP7NB+os+sWl zcy7SGoDFussyr011xyQwSRGrHiPifUgH4eDtSzvHwcIlhm3tWV3R0vS464u7H8pV9xcLqLJa RP/bgmnzn6ppL2AeM+CZxGktCkli2FyMGWtdaxxZZjY3HUD0HXqr70IzL1qcJsCuUYDAg176a GXJD1Wcb1iYA3m0qRr8udbw8/lyMYyB3/wyK9yM7Pi/gvRQXlKNFw9tnBu/xf6kj1zqMihpe7 WLWbQTAxX9UP/RHvNoGIjjT4onWvHSoxyOvJoVOPLlQ2HPWmEX1jwRCiiKuc60wr0nb9sU/C4 71EMTVDZtlXA/H0h5u/8F/7aMVlsLcJFT41Fpk6vzpKwpRQ9XnoXxAAi4ohjO4LuMns3csq/g +QJyG+IGrsoW6nmnurHBFsapEuzVZPnOlhleujOvbyFnMjmHrT/x1tAceO7TnYjgcG+h/jGjT /xktShvn3b72Sbt6wcIxGA8BWlTABGx55v2Zz+gtZpe59oyTyRQsBpM47iKv4IJUcZIo/YR8X Ogonj91EE9X6pF4mE7/9wB6Vfu3oGljcV0juuaBRYxHJR+Uv6x5DsgL80X+TSYUdPwcqgni+U c/U5XpS90biM53GaGAU1DeMib6ML7ktSXxuqL1iNaNMAF7ycvMqaismMJfOa4JwRF8oLkHGxJ mYYvKHjb6dIcZzRXWZNd6x6zVAH9QXjT0PNRk/Ohuf4uVSz3SC6iSiIZ7JePzdRVd0H+U4bgc uPwkTuDmE8G4L+4xw+YMtQr/nkQYLVZdgNI9/gNtmXzPyMVIeiw4YsBkBsLruIIYZK0qmAtot xoL24QhMTgUhaZ8YYn8fFYjlque241C8q469PSSPu3VcPPg6gSvgVrp6Mt6dxVEJVxS4PpwY7 ubXwm9uomcEdh0uUq/9tVZfscf715LZKA+3IzmB5DZUYe9KxeypOXoD9Fq6S8bWK6YM0CmHoV y09WczAXVaFrYCxm4xiC8tyxD0bjEJ2VGEYnnz7Url2HpBj+kSRI8OZjXMWiVdkxFrnk/iFb5 SbcAgzWmGoxx5hg5KfNJQCADCfOwFjIvY/fdbGLVhQCJpj1wTAHEcPeyFgCbwXnREjX9uUMW7 QAky3388SIKDvtOV+ecjAvdTYhrRa21kULf07ey/oP+GoBMYMa9WECn1g== Received-SPF: pass client-ip=212.227.15.15; envelope-from=xypron.glpk@gmx.de; helo=mout.gmx.net X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, NICE_REPLY_A=-0.58, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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, 30 Aug 2021 01:44:22 -0000 On 8/29/21 2:44 PM, Nikita Ermakov wrote: > Btw, I have a minor suggestion [1] for your patch. > AFAIK hartid terminology and /chosen/boot-hartid are RISC-V specifics. > So, I think, we should not emit the warning and change DTB with a null > boot-hartid value. If get_hartid is not defined then we should, > probably, just skip this boot-hartid thing. > > What do you think? If it is alright I can change your patch with these > changes and send V3 or you can change it by yourself. > > [1] > https://github.com/sh1r4s3/grub/commit/af66530842dd3058e1ac0acd8e4ddfd51= 671fa6c > Why should /chosen/boot-hartid be set in GRUB? This property is set in the devicetree by U-Boot or EDK II before invoking GRUB. If GRUB is loading a device-tree from file, it should call the EFI_DT_FIXUP_PROTOCOL available in U-Boot to set /chosen/boot-hartid. Cf. https://github.com/U-Boot-EFI/EFI_DT_FIXUP_PROTOCOL Best regards Heinrich > > -- > Thanks, > Nikita > B8 4C 00 CD 21 > > =D0=BD=D0=B4, 29 =D1=81=D0=B5=D1=80=D0=BF. 2021, 05:30 =D0=BA=D0=BE=D1= =80=D0=B8=D1=81=D1=82=D1=83=D0=B2=D0=B0=D1=87 Fu Wei > =D0=BF=D0=B8=D1=88=D0=B5: > > Hi Nikita, > > Nikita Ermakov > =E4=BA= =8E2021 > =E5=B9=B48=E6=9C=8828=E6=97=A5=E5=91=A8=E5=85=AD =E4=B8=8B=E5=8D=888= :22=E5=86=99=E9=81=93=EF=BC=9A > > > > Hi Atish, Fu, > > > > On Fri, 27 Aug 2021 at 19:29, Fu Wei > wrote: > > > > > > Hi Atish, > > > > > > Great thanks for adding me the loop! > > > > > > I have tested this these whole patchset on Starlight board and > Allwinner D1 , > > > > > > > https://github.com/tekkamanninja/grub/tree/riscv_devel_Nikita_V2 > > > > > > > I would be nice If you can add my Tested-by for this patchset! > > > > > > Tested-by: Wei Fu > > > > > > Fu, thank you for the test and the patch regarding boot-hartid. > > I can send V3 with "Tested-by: Wei Fu >" > > appended to the patchset and add the 8'th patch to set boot-harti= d. > > Is it ok? > > Sure , NP :-) . > Please add my Tested-by :-) > > > > > > Atish Patra > =E4=BA=8E2021=E5=B9=B48=E6=9C=8828= =E6=97=A5=E5=91=A8=E5=85=AD =E4=B8=8A=E5=8D=8812:22=E5=86=99=E9=81=93=EF= =BC=9A > > > > > > > > On Wed, Jun 2, 2021 at 2:13 PM Nikita Ermakov > > wrote: > > > > > > > > > > Hello, > > > > > > > > > > This is the second version of the patch series. The patch > series is almost the > > > > > same as the previous one except that the Heinrich's > suggestions were > > > > > implemented. > > > > > > > > > > This series contains patches to add support for LoadFile2 > protocol to load > > > > > initrd on EFI systems. Also it contains patches to load > Linux kernel with EFI > > > > > stub on riscv platforms and unites arm and riscv codes > together into common > > > > > loader code for EFI systems. > > > > > > > > + Wei Fu who tested this series on Beagleboard. > > > > > > > > According to Wei we do another patch to add a boot-hartid > entry in the > > > > chosen node if DTB is > > > > loaded from grub instead of U-Boot [1]. > > > > > > > > [1] > https://github.com/tekkamanninja/grub/commit/99c5dc1ba897e506f185eb1= 9d4dadc6d41937214 > > > > > > > > > > > Ard Biesheuvel (3): > > > > >=C2=A0 =C2=A0efi: add definition of LoadFile2 protocol > > > > >=C2=A0 =C2=A0efi: implemented LoadFile2 initrd loading proto= col for Linux > > > > >=C2=A0 =C2=A0linux: ignore FDT unless we need to modify it > > > > > > > > > > Atish Patra (3): > > > > >=C2=A0 =C2=A0loader: Move arm64 linux loader to common code > > > > >=C2=A0 =C2=A0RISC-V: Update image header > > > > >=C2=A0 =C2=A0RISC-V: Use common linux loader > > > > > > > > > > Nikita Ermakov (1): > > > > >=C2=A0 =C2=A0loader: drop argv[] argument in grub_initrd_loa= d() > > > > > > > > > >=C2=A0 grub-core/Makefile.core.def=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A08 +- > > > > >=C2=A0 grub-core/commands/efi/lsefi.c=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A01 + > > > > >=C2=A0 grub-core/loader/arm/linux.c=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A02 +- > > > > >=C2=A0 grub-core/loader/efi/fdt.c=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A07 +- > > > > >=C2=A0 grub-core/loader/{arm64 =3D> efi}/linux.c=C2=A0 =C2= =A0| 143 > +++++++++++++++++++--- > > > > >=C2=A0 grub-core/loader/i386/linux.c=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A02 +- > > > > >=C2=A0 grub-core/loader/i386/pc/linux.c=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 |=C2=A0 =C2=A02 +- > > > > >=C2=A0 grub-core/loader/i386/xen.c=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A03 +- > > > > >=C2=A0 grub-core/loader/ia64/efi/linux.c=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0|=C2=A0 =C2=A02 +- > > > > >=C2=A0 grub-core/loader/linux.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A04 +- > > > > >=C2=A0 grub-core/loader/mips/linux.c=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A02 +- > > > > >=C2=A0 grub-core/loader/powerpc/ieee1275/linux.c |=C2=A0 =C2= =A02 +- > > > > >=C2=A0 grub-core/loader/riscv/linux.c=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 |=C2=A0 59 --------- > > > > >=C2=A0 grub-core/loader/sparc64/ieee1275/linux.c |=C2=A0 =C2= =A02 +- > > > > >=C2=A0 include/grub/arm/linux.h=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A02 +- > > > > >=C2=A0 include/grub/arm64/linux.h=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A02 +- > > > > >=C2=A0 include/grub/efi/api.h=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 15 +++ > > > > >=C2=A0 include/grub/linux.h=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A02 +- > > > > >=C2=A0 include/grub/riscv32/linux.h=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 16 +-- > > > > >=C2=A0 include/grub/riscv64/linux.h=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 16 +-- > > > > >=C2=A0 20 files changed, 185 insertions(+), 107 deletions(-) > > > > >=C2=A0 rename grub-core/loader/{arm64 =3D> efi}/linux.c (72%= ) > > > > >=C2=A0 delete mode 100644 grub-core/loader/riscv/linux.c > > > > > > > > > > -- > > > > > 2.29.3 > > > > > > > > > > > > > > > _______________________________________________ > > > > > Grub-devel mailing list > > > > > Grub-devel@gnu.org > > > > > https://lists.gnu.org/mailman/listinfo/grub-devel > > > > > > > > > > > > > > > > > -- > > > > Regards, > > > > Atish > > > > -- > > Thanks, > > Nikita > > B8 00 4C CD 21 >