Hi All,

environment : X86-64 , kernel 3.16.0(64-bit support),grub2.02

 

I compile the grub2.02 by default. And the grub boots the linux kernel with 
32-bit boot protocol.(Documents/X86/boot.txt)

 

I want to use the initrd as big as possible, but it is limited as follows.

But when I make a image-initrd that size is 1.75G(no compression), the grub can 
boot linux normal .

It seems good for initrd size between 0x37feffff-0x3fffffff.But the grub seems 
it is against that.

 

So I have some questions:

1、Why it is necessary to make sure that ADDR_MAX does not exceed 0x3fffffff ? 
Has it a relationship about the 32-bit kernel?

2、Can I  set addr_max=0x3fFFFFFF when (grub_le_to_cpu16 (linux_params.version) 
>= 0x0203?

 

 

include/grub/i386/linux.h

#define GRUB_LINUX_INITRD_MAX_ADDRESS   0x37FFFFFF

 

grub-core/loader/i386/linux.c

grub_cmd_initrd:

  /* Get the highest address available for the initrd.  */

  if (grub_le_to_cpu16 (linux_params.version) >= 0x0203)

    {

      addr_max = grub_cpu_to_le32 (linux_params.initrd_addr_max);

      /* XXX in reality, Linux specifies a bogus value, so

         it is necessary to make sure that ADDR_MAX does not exceed

         0x3fffffff.  */

     if (addr_max > GRUB_LINUX_INITRD_MAX_ADDRESS)

        addr_max = GRUB_LINUX_INITRD_MAX_ADDRESS;

    }

  else

    addr_max = GRUB_LINUX_INITRD_MAX_ADDRESS;
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to