bug-grub
[Top][All Lists]
Advanced

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

Can the grub2.02 improve the limit of initrd size in 64-bit system?


From: 电子科技大学-张旭霞
Subject: Can the grub2.02 improve the limit of initrd size in 64-bit system?
Date: Tue, 30 Jul 2019 14:44:39 +0800 (CST)

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:

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

2Can 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;



 



 


reply via email to

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