On 8/18/22 16:51, Ard Biesheuvel wrote:
Recent Linux kernels will invoke the LoadFile2 protocol installed on
a well-known vendor media path to load the initrd if it is exposed by
the firmware. Using this method is preferred for two reasons:
- the Linux kernel is in charge of allocating the memory, and so it can
   implement any placement policy it wants (given that these tend to
   change between kernel versions),
- it is no longer necessary to modify the device tree provided by the
   firmware.

So let's install this protocol when handling the 'initrd' command if
such a recent kernel was detected (based on the PE/COFF image version),
and defer loading the initrd contents until the point where the kernel
invokes the LoadFile2 protocol.

Signed-off-by: Ard Biesheuvel <a...@kernel.org>

Reviewed-by: Heinrich Schuchardt <heinrich.schucha...@canonical.com>

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

Reply via email to