[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aMEUUkVQv2tqpO2L@archie.me>
Date: Wed, 10 Sep 2025 13:01:54 +0700
From: Bagas Sanjaya <bagasdotme@...il.com>
To: Randy Dunlap <rdunlap@...radead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Documentation <linux-doc@...r.kernel.org>,
Linux EFI <linux-efi@...r.kernel.org>
Cc: Ard Biesheuvel <ardb@...nel.org>, Jonathan Corbet <corbet@....net>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
Hugo Osvaldo Barrera <hugo@...nothugo.nl>
Subject: Re: [PATCH] x86/Documentation: explain LINUX_EFI_INITRD_MEDIA_GUID
On Tue, Sep 09, 2025 at 08:25:34PM -0700, Randy Dunlap wrote:
> On 9/9/25 6:57 PM, Bagas Sanjaya wrote:
> > +.. _pe-coff-entry-point:
> > +
> > +PE/COFF entry point
> > +===================
> > +
> > +When compiled with ``CONFIG_EFI_STUB=y``, the kernel can be executed as a
> > +regular PE/COFF binary. See Documentation/admin-guide/efi-stub.rst for
> > +implementation details.
> > +
> > +The stub loader can request the initrd via a UEFI protocol. For this to work,
> > +the firmware or bootloader needs to register a handle which implements the
> > +``EFI_LOAD_FILE2`` protocol with the ``LINUX_EFI_INITRD_MEDIA_GUID`` device
> > +path. In this case, a kernel booting via the EFI stub will use the ``LoadFile``
> > +function on the registered handle to obtain a reference to the initrd.
>
> drivers/firmware/efi/libstub/efi-stub-helper.c (line 509) says LoadFile2
> protocol. Is that the same as the LoadFile function?
>
> https://github.com/u-boot/u-boot/commit/ec80b4735a593961fe701cc3a5d717d4739b0fd0
> (the link below) also says LoadFile2() 4 times (and LoadFile 0 times).
From UEFI spec [1], both LoadFile and LoadFile2 protocol versions of LoadFile()
function has same prototype but somewhat different in behavior. To answer
your question, however, I think so.
EFI folks, what are your opinions?
Thanks.
[1]: https://uefi.org/specs/UEFI/2.10/13_Protocols_Media_Access.html
--
An old man doll... just what I always wanted! - Clara
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists