From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, ard.biesheuvel@linaro.org
Cc: leif@nuviainc.com, pjones@redhat.com, mjg59@google.com,
agraf@csgraf.de, daniel.kiper@oracle.com,
michael.d.kinney@intel.com, jian.j.wang@intel.com,
hao.a.wu@intel.com, ray.ni@intel.com, zhichao.gao@intel.com
Subject: Re: [edk2-devel] [PATCH v2 2/6] OvmfPkg: add 'initrd' shell command to expose Linux initrd via device path
Date: Wed, 26 Feb 2020 02:25:38 +0100 [thread overview]
Message-ID: <8e0f8f74-46f3-eb56-819b-2894aa99e9a5@redhat.com> (raw)
In-Reply-To: <2192beca-d8af-beae-cf72-ba63ad0883f7@redhat.com>
On 02/26/20 00:43, Laszlo Ersek wrote:
> On 02/25/20 10:39, Ard Biesheuvel wrote:
>> +" 2. The initrd is not unloaded when the shell exits, and will remain active\r\n"
>> +" until it is unloaded again by a different invocation of the shell.\r\n"
>> +" Consumers of the LoadFile2 protocol on the LINUX_EFI_INITRD_MEDIA_GUID\r\n"
>> +" device path that are started via means other than the shell will be able\r\n"
>> +" to locate the protocol and invoke it.\r\n"
>>
>
> (16) So, I don't see how paragraph#2 works here. When the shell exits,
> all our global variables disappear. (LoadFile2 disappears too.) The next
> time the shell is launched (in the same "UEFI session", so to say), we
> won't know that we had loaded an initrd before. Is that right?
Sorry, I guess I missed the core idea behind dynamic shell commands :(
The dynamic shell command seems like a separate DXE driver, after all.
The shell can call into it (via EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL), but
its lifecycle is independent of the shell's. The shell can also unload
it (like the shell can unload any other driver).
So please ignore my point (16).
(But then, I do think we leak the initrd, if one has been loaded, in
LinuxInitrdDynamicShellCommandUnload()). I.e., pls see my point (15).)
Thanks
Laszlo
next prev parent reply other threads:[~2020-02-26 1:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-25 9:39 [PATCH v2 0/6] OvmfPkg: implement initrd shell command and mixed mode loader Ard Biesheuvel
2020-02-25 9:39 ` [PATCH v2 1/6] OvmfPkg: add definition of LINUX_EFI_INITRD_MEDIA_GUID Ard Biesheuvel
2020-02-25 22:14 ` [edk2-devel] " Laszlo Ersek
2020-02-25 9:39 ` [PATCH v2 2/6] OvmfPkg: add 'initrd' shell command to expose Linux initrd via device path Ard Biesheuvel
2020-02-25 23:43 ` [edk2-devel] " Laszlo Ersek
2020-02-26 0:00 ` Laszlo Ersek
2020-02-26 1:25 ` Laszlo Ersek [this message]
2020-02-25 9:39 ` [PATCH v2 3/6] ArmVirtPkg: add the 'initrd' dynamic shell command Ard Biesheuvel
2020-02-25 23:46 ` [edk2-devel] " Laszlo Ersek
2020-02-25 9:39 ` [PATCH v2 4/6] OvmfPkg: " Ard Biesheuvel
2020-02-25 23:48 ` [edk2-devel] " Laszlo Ersek
2020-02-25 9:39 ` [PATCH v2 5/6] MdeModulePkg/DxeCore: defer PE/COFF emulator registration to StartImage Ard Biesheuvel
2020-02-25 9:39 ` [PATCH v2 6/6] OvmfPkg IA32: add support for loading X64 images Ard Biesheuvel
2020-02-25 23:55 ` [edk2-devel] " Laszlo Ersek
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-list 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=8e0f8f74-46f3-eb56-819b-2894aa99e9a5@redhat.com \
--to=devel@edk2.groups.io \
/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