<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<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);">
Does this look good for text to add</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);">
"<span style="font-family:Calibri, sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255);display:inline !important">Linux distro boot generally relies on an initial ramdisk (initrd)</span><br>
<span style="font-family:Calibri, sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255);display:inline !important">which is provided by the loader, and which contains additional kernel</span><br style="font-family:Calibri, sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255)">
<span style="font-family:Calibri, sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255);display:inline !important">modules (for storage and network, for instance), and the initial user</span><br style="font-family:Calibri, sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255)">
<span style="font-family:Calibri, sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255);display:inline !important">space startup code, i.e., the code which brings up the user space side</span><br style="font-family:Calibri, sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255)">
<span style="font-family:Calibri, sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255);display:inline !important">of the entire OS.<br>
</span><br>
In order to provide a standard method to locate this file,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
the GUID defined in this file is used to describe the device path</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
for a LoadFile2 Protocol instance that is responsible for loading the initrd file"</div>
<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);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Also, the patch does have</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color:rgb(32, 31, 30);font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255);display:inline !important"> {OvmfPkg
 => MdePkg}/Include/Guid/LinuxEfiInitrdMedia.h | 0</span><br>
<span style="color:rgb(32, 31, 30);font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255);display:inline !important"> 3
 files changed, 5 insertions(+), 1 deletion(-)</span><br style="color:rgb(32, 31, 30);font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255)">
<span style="color:rgb(32, 31, 30);font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255);display:inline !important"> rename
 {OvmfPkg => MdePkg}/Include/Guid/LinuxEfiInitrdMedia.h (100%)</span><br style="color:rgb(32, 31, 30);font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255)">
[snip]<br style="color:rgb(32, 31, 30);font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255)">
<span style="color:rgb(32, 31, 30);font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255);display:inline !important">diff
 --git a/OvmfPkg/Include/Guid/LinuxEfiInitrdMedia.h b/MdePkg/Include/Guid/LinuxEfiInitrdMedia.h</span><br style="color:rgb(32, 31, 30);font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255)">
<span style="color:rgb(32, 31, 30);font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255);display:inline !important">similarity
 index 100%</span><br style="color:rgb(32, 31, 30);font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255)">
<span style="color:rgb(32, 31, 30);font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255);display:inline !important">rename
 from OvmfPkg/Include/Guid/LinuxEfiInitrdMedia.h</span><br style="color:rgb(32, 31, 30);font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255)">
<span style="color:rgb(32, 31, 30);font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255);display:inline !important">rename
 to MdePkg/Include/Guid/LinuxEfiInitrdMedia.h</span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color:rgb(32, 31, 30);font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255);display:inline !important"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color:rgb(32, 31, 30);font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;font-size:14.6667px;background-color:rgb(255, 255, 255);display:inline !important"><br>
</span></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> Kinney, Michael D <michael.d.kinney@intel.com><br>
<b>Sent:</b> Wednesday, July 21, 2021 9:38 AM<br>
<b>To:</b> Jeff Brasen <jbrasen@nvidia.com>; Ard Biesheuvel <ardb@kernel.org>; Kinney, Michael D <michael.d.kinney@intel.com><br>
<b>Cc:</b> 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>
<style>
<!--
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
a:link, span.x_MsoHyperlink
        {color:#0563C1;
        text-decoration:underline}
a:visited, span.x_MsoHyperlinkFollowed
        {color:#954F72;
        text-decoration:underline}
p.x_msonormal0, li.x_msonormal0, div.x_msonormal0
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
span.x_EmailStyle20
        {font-family:"Calibri",sans-serif;
        color:windowtext}
span.x_SpellE
        {}
.x_MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
div.x_WordSection1
        {}
-->
</style>
<div lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<table bgcolor="#FFEB9C" border="1">
<tbody>
<tr>
<td><font face="verdana" color="black" size="1"><b>External email: Use caution opening links or attachments</b>
</font></td>
</tr>
</tbody>
</table>
<br>
<div>
<div class="x_WordSection1">
<p class="x_MsoNormal"><span style="">Hi Ard,</span></p>
<p class="x_MsoNormal"><span style=""> </span></p>
<p class="x_MsoNormal"><span style="">If this device path node is considered as part of the standard interface between the Linux kernel and
</span></p>
<p class="x_MsoNormal"><span style="">firmware, then it does make sense for it to be in the
<span class="x_SpellE">MdePkg</span>.<span style="">  </span>We usually try to reference a public</span></p>
<p class="x_MsoNormal"><span style="">specification in the include file that defines the interface.</span></p>
<p class="x_MsoNormal"><span style=""> </span></p>
<p class="x_MsoNormal"><span style="">In this case, since there is no public document, but it is part of the Linux kernel assumptions,</span></p>
<p class="x_MsoNormal"><span style="">can the include file for the GUID provide pointers to the Linux kernel that uses the GUID and</span></p>
<p class="x_MsoNormal"><span style="">describe how the GUID is produced by the FW and consumed by the Linux kernel?</span></p>
<p class="x_MsoNormal"><span style=""> </span></p>
<p class="x_MsoNormal"><span style="">I also see that this patch appears to be incomplete.<span style=""> 
</span>There is an <span class="x_SpellE">OvmfPkg</span>/Include/<span class="x_SpellE">Guid</span>/<span class="x_SpellE">LinuxEfiInitrdMedia.h</span></span></p>
<p class="x_MsoNormal"><span style="">file in the <span class="x_SpellE">OvmfPkg</span>.<span style=""> 
</span>Shouldn’t that file also be moved to the <span class="x_SpellE">MdePkg</span> as part of this patch?</span></p>
<p class="x_MsoNormal"><span style=""> </span></p>
<p class="x_MsoNormal"><span style="">Thanks,</span></p>
<p class="x_MsoNormal"><span style=""> </span></p>
<p class="x_MsoNormal"><span style="">Mike</span></p>
<p class="x_MsoNormal"><span style=""> </span></p>
<div style="border:none; border-left:solid blue 1.5pt; padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_MsoNormal"><b><span style="">From:</span></b><span style=""> Jeff Brasen <jbrasen@nvidia.com>
<br>
<b>Sent:</b> Tuesday, July 20, 2021 9:59 AM<br>
<b>To:</b> Ard Biesheuvel <ardb@kernel.org>; Kinney, Michael D <michael.d.kinney@intel.com><br>
<b>Cc:</b> devel@edk2.groups.io; ardb+tianocore@kernel.org; Justen, Jordan L <jordan.l.justen@intel.com>; 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</span></p>
</div>
</div>
<p class="x_MsoNormal"> </p>
<div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black">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)</span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black">I am fine with MdeModulePkg as well though.</span></p>
</div>
<div>
<div>
<p class="x_MsoNormal"><span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div id="x_Signature">
<div>
<p>Thanks,</p>
<p>Jeff</p>
</div>
</div>
</div>
<div class="x_MsoNormal" align="center" style="text-align:center"><span style="">
<hr size="2" width="98%" align="center">
</span></div>
<div id="x_divRplyFwdMsg">
<p class="x_MsoNormal" style=""><b><span style="color:black">From:</span></b><span style="color:black"> Ard Biesheuvel <<a href="mailto:ardb@kernel.org">ardb@kernel.org</a>><br>
<b>Sent:</b> Friday, July 16, 2021 9:56 AM<br>
<b>To:</b> Kinney, Michael D <<a href="mailto:michael.d.kinney@intel.com">michael.d.kinney@intel.com</a>><br>
<b>Cc:</b> Jeff Brasen <<a href="mailto:jbrasen@nvidia.com">jbrasen@nvidia.com</a>>;
<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a> <<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a>>;
<a href="mailto:ardb+tianocore@kernel.org">ardb+tianocore@kernel.org</a> <<a href="mailto:ardb+tianocore@kernel.org">ardb+tianocore@kernel.org</a>>; Justen, Jordan L <<a href="mailto:jordan.l.justen@intel.com">jordan.l.justen@intel.com</a>>;
<a href="mailto:gaoliming@byosoft.com.cn">gaoliming@byosoft.com.cn</a> <<a href="mailto:gaoliming@byosoft.com.cn">gaoliming@byosoft.com.cn</a>>; Liu, Zhiguang <<a href="mailto:zhiguang.liu@intel.com">zhiguang.liu@intel.com</a>>; Samer El-Haj-Mahmoud <<a href="mailto:Samer.El-Haj-Mahmoud@arm.com">Samer.El-Haj-Mahmoud@arm.com</a>><br>
<b>Subject:</b> Re: [edk2-devel] [PATCH 1/1] MdePkg: add definition of LINUX_EFI_INITRD_MEDIA_GUID</span><span style="">
</span></p>
<div>
<p class="x_MsoNormal"><span style=""> </span></p>
</div>
</div>
<div>
<div>
<p class="x_MsoNormal"><span style="">External email: Use caution opening links or attachments<br>
<br>
<br>
On Fri, 16 Jul 2021 at 17:00, Kinney, Michael D<br>
<<a href="mailto:michael.d.kinney@intel.com">michael.d.kinney@intel.com</a>> 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.</span></p>
</div>
</div>
</div>
</div>
</div>
</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/78037">View/Reply Online (#78037)</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>