<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
In my opinion MdePkg is where this should be as it is meant to be used by multiple software entities (linux kernel, grub, edk2, coreboot w/ uefi binding) and probably should be documented in some spec (Although, I am not sure which one would make sense)</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I am fine with MdeModulePkg as well though.</div>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<p>Thanks,</p>
<p>Jeff</p>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Ard Biesheuvel <ardb@kernel.org><br>
<b>Sent:</b> Friday, July 16, 2021 9:56 AM<br>
<b>To:</b> Kinney, Michael D <michael.d.kinney@intel.com><br>
<b>Cc:</b> Jeff Brasen <jbrasen@nvidia.com>; devel@edk2.groups.io <devel@edk2.groups.io>; ardb+tianocore@kernel.org <ardb+tianocore@kernel.org>; Justen, Jordan L <jordan.l.justen@intel.com>; gaoliming@byosoft.com.cn <gaoliming@byosoft.com.cn>; Liu, Zhiguang
 <zhiguang.liu@intel.com>; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com><br>
<b>Subject:</b> Re: [edk2-devel] [PATCH 1/1] MdePkg: add definition of LINUX_EFI_INITRD_MEDIA_GUID</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">External email: Use caution opening links or attachments<br>
<br>
<br>
On Fri, 16 Jul 2021 at 17:00, Kinney, Michael D<br>
<michael.d.kinney@intel.com> wrote:<br>
><br>
> Hi Ard,<br>
><br>
> I see you were involved in the OS side changes.<br>
><br>
> Can you explain what is required for the FW <-> OS interface with respect to Load File Protocol and this media device path node.<br>
><br>
> What happens if this media device path node is not present?  What breaks?<br>
><br>
> Trying to figure out if this is a required interop feature (MdePkg candidate) or an EDK II specific extension (MdeModulePkg candidate).<br>
><br>
<br>
Let me give some context first:<br>
<br>
Linux distro boot generally relies on an initial ramdisk (initrd)<br>
which is provided by the loader, and which contains additional kernel<br>
modules (for storage and netwerk, for instance), and the initial user<br>
space startup code, ie., the code which brings up the user space side<br>
of the entire OS.<br>
<br>
Before we introduced this media path, the only way for a EFI pre-OS<br>
loader (such as GRUB) to provide this initrd was to copy it into DRAM<br>
somewhere, and use a arch-specific method of passing the DRAM address<br>
and size to the OS (x86 uses struct bootparam, whereas ARM uses device<br>
tree). It also requires knowledge on the part of GRUB regarding which<br>
parts of DRAM are suitable for holding an initrd image. For measured<br>
boot scenarios, it may be an advantage not to have the initrd linger<br>
in DRAM for longer that necessary, and we actually intend to measure<br>
the initrd loaded via the new method right after it has been loaded<br>
this way.<br>
<br>
To avoid extending this to other architectures such as RISC-V, I<br>
decided to introduce a special vendor media path for Linux initrd<br>
images, which GRUB et al can implement, which provides the initrd<br>
image when the OS loader that consumes it asks for it.<br>
<br>
So for Linux on x86 or ARM, this is optional, given that support for<br>
the old method is not going away any time soon. For RISC-V, I<br>
suggested that only the new method be implemented, but I am not sure<br>
what the status is there. Note that many embedded style systems don't<br>
use GRUB, and may not use initrds to begin with. OTOH, U-Boot also<br>
implements support for the Linux initrd vendor media path, and work is<br>
ongoing to add measured boot support as well.<br>
<br>
In any case, I don't have a strong preference where this should live,<br>
as long as it is in a generic place where all architectures can use<br>
it.<br>
<br>
--<br>
Ard.<br>
</div>
</span></font></div>
</body>
</html>


 <div width="1" style="color:white;clear:both">_._,_._,_</div> <hr>   Groups.io Links:<p>   You receive all messages sent to this group.    <p> <a target="_blank" href="https://edk2.groups.io/g/devel/message/77977">View/Reply Online (#77977)</a> |    |  <a target="_blank" href="https://groups.io/mt/84231808/1813853">Mute This Topic</a>  | <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>    <a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> | <a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |  <a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>  [edk2-devel-archive@redhat.com]<br> <div width="1" style="color:white;clear:both">_._,_._,_</div>