grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH V2] i386: Using 64-bit boot protocol for 64-bit linux kernel


From: Daniel Kiper
Subject: Re: [PATCH V2] i386: Using 64-bit boot protocol for 64-bit linux kernel
Date: Thu, 11 Aug 2022 19:18:28 +0200
User-agent: NeoMutt/20170113 (1.7.2)

On Thu, Aug 04, 2022 at 11:07:30PM +0800, Wei Zhang wrote:
> On Wed, Aug 3, 2022 at 11:33 PM Daniel Kiper <dkiper@net-space.pl> wrote:
> >
> > On Sat, Jul 23, 2022 at 07:20:43PM +0800, Wei Zhang wrote:
> > > From: Wei Zhang <zhangweilst@gmail.com>
> > >
> > > Currently GRUB boots linux with 32-bit protocol for 64 bit kernel.
> > > Thus if both GRUB and linux kernel are in 64-bit, we'll have to go
> > > through 64-bit grub -> 32-bit boot protocol -> 64-bit kernel
> > > transitions, and extra instructions have to be executed in the kernel.
> > >
> > > Since linux has long ago supported 64-bit boot protocol, we can take
> > > advantage of that to directly boot to 64-bit kernel.
> > >
> > > To do this, first we determine whether the kernel is 64-bit by
> > > xloadflags (since linux boot protocol 2.12), then we build the
> > > identity-mapped page table required by the 64-bit kernel, and that's
> > > it. The memory needed by the page table is allocated after the
> > > protected kernel image proper.
> > >
> > > So if we're in 32-bit GRUB to boot a 64-bit kernel, the transition
> > > will happen before handing over to the kernel, and if we're in 64-bit
> > > GRUB, we don't have to go down to 32-bit and back to 64-bit. The
> > > 32-bit kernel boot process will not be affected.
> > >
> > > Tested on my 64-bit machine and QEMU.
> >
> > Could you tell us what target and platform you configure for the GRUB?
> > Or send us full GRUB configure command you use?
>
> Sure, I mainly focused on x86, and my configure command is:
> ./configure --target=x86_64 --with-platform=efi

This is what I expected. I appreciate your work. Sadly this is not
a direction which we are heading. So, I have to NAK your patch. However,
if you want to improve the EFI boot protocol in the GRUB please take
a look at [1] and my comments starting at [2]. I would really want to
see the patch set at [1] updated and at some point merged into the GRUB
upstream.

If you have any questions please drop us a line.

Daniel

[1] https://lists.gnu.org/archive/html/grub-devel/2021-10/msg00209.html
[2] https://lists.gnu.org/archive/html/grub-devel/2021-11/msg00084.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]