linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Randy Dunlap <rdunlap@infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Documentation <linux-doc@vger.kernel.org>,
	Linux EFI <linux-efi@vger.kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Hugo Osvaldo Barrera <hugo@whynothugo.nl>
Subject: Re: [PATCH] x86/Documentation: explain LINUX_EFI_INITRD_MEDIA_GUID
Date: Wed, 10 Sep 2025 13:01:54 +0700	[thread overview]
Message-ID: <aMEUUkVQv2tqpO2L@archie.me> (raw)
In-Reply-To: <0b61b6f3-f11a-494c-9d4e-94ca19fd1eb6@infradead.org>

[-- Attachment #1: Type: text/plain, Size: 1483 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2025-09-10  6:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-10  1:57 [PATCH] x86/Documentation: explain LINUX_EFI_INITRD_MEDIA_GUID Bagas Sanjaya
2025-09-10  3:25 ` Randy Dunlap
2025-09-10  6:01   ` Bagas Sanjaya [this message]
2025-09-10 20:09     ` H. Peter Anvin
2025-09-11  6:35       ` Ard Biesheuvel
2025-09-11  6:46 ` Ard Biesheuvel
2025-09-11 11:22   ` Hugo Osvaldo Barrera
2025-09-11 11:50     ` Bagas Sanjaya
2025-09-11 12:16       ` Hugo Osvaldo Barrera
2025-09-11 21:22         ` Randy Dunlap
2025-09-11 12:49     ` Ard Biesheuvel
2025-09-11 14:07       ` Hugo Osvaldo Barrera
2025-09-11 17:06         ` Ard Biesheuvel
2025-09-11 11:36   ` Bagas Sanjaya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aMEUUkVQv2tqpO2L@archie.me \
    --to=bagasdotme@gmail.com \
    --cc=ardb@kernel.org \
    --cc=bp@alien8.de \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=hugo@whynothugo.nl \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rdunlap@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).