Hi Paul,

I installed VMWare ESXi, but realized that it's not booted by GRUB.

I have tested on a KabyLake NUC, using Multiboot2 to load ACRN hypervisor, and 
confirmed that either the OS kernel is an ELF or raw binary, with this patch, 
grub_cmd_module () calculates the lowest_addr correctly and allocates higher 
address for modules as expected:

    err = grub_relocator_alloc_chunk_align (GRUB_MULTIBOOT (relocator), &ch,
                                            lowest_addr, (0xffffffff - size) + 
1,
                                            size, MULTIBOOT_MOD_ALIGN,
                                            GRUB_RELOCATOR_PREFERENCE_NONE, 1);

This patch is supposed to have no impact to existing Multiboot, and I have 
played on Multiboot for sanity tests as well.

Best Regards,
Zide

> -----Original Message-----
> From: Grub-devel <grub-devel-bounces+zide.chen=intel....@gnu.org> On Behalf 
> Of Chen, Zide
> Sent: Monday, April 6, 2020 5:41 PM
> To: Paul Menzel <pmen...@molgen.mpg.de>
> Cc: The development of GNU GRUB <grub-devel@gnu.org>
> Subject: RE: [PATCHv2] multiboot2: enable quirk-modules-after-kernel
> 
> Hi Paul,
> 
> Thank you very much for your comments! Will revise the commit messages base 
> on your comments.
> I have tested on VirtualBox but will test on VMWare before sending out V3.
> 
> Best Regards,
> Zide
> 
> > -----Original Message-----
> > From: Paul Menzel <pmen...@molgen.mpg.de>
> > Sent: Monday, April 6, 2020 1:57 PM
> > To: Chen, Zide <zide.c...@intel.com>
> > Cc: The development of GNU GRUB <grub-devel@gnu.org>
> > Subject: Re: [PATCHv2] multiboot2: enable quirk-modules-after-kernel
> >
> > Dear Zide,
> >
> >
> > Thank you for posting version 2 of your patch. (Please add v2 to the
> > patch tag next time.)
> >
> > Maybe use the commit message summary below.
> >
> > > multiboot2: Implement quirk-modules-after-kernel
> >
> > Am 03.04.20 um 09:35 schrieb Zide Chen:
> > > In multiboot2, currently there is no way to control where to load the
> >
> > Maybe start with: In contrast to Mulitboot (v1), in Mulitboot 2, there
> > is currently …
> >
> > > modules. In case of user wants to reserve low address for particular
> > > usage, this quirk is useful to load the modules to higher address.
> > >
> > > This patch makes the quirk to multiboot2 by:
> >
> > So, implement the quirk quirk-modules-after-kernel to load modules after
> > the kernel for Multiboot 2 by reusing the implementation for Multiboot (v1).
> >
> > > - remove "ifndef GRUB_USE_MULTIBOOT2" that is related to this logic.
> > > - define separate variables for both multiboot and multiboot2, e.g.
> > >    grub_multiboot_quirks, highest_load, etc.
> > > - in grub_multiboot2_load(): calculate the highest load address of raw
> > >    image and assign it to grub_multiboot2_highest_load.
> > > - the existing code in multiboot_elfxx.c is able to calculate the
> > >    highest_load for mutiboot2 already.
> > >
> > > At the end, the adjusted GRUB_MULTIBOOT(highest_load) is used as the
> > > lowest address to allocate memory for loading modules.
> >
> > Tested with VMware. ;-)
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to