<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body vlink="purple" link="blue" lang="EN-US">
<div class="Section1">
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Hi,<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Currently, on EFI, the image loading capabilities are fairly
limited. In particular, once you load up an EFI image, there is no way for that
EFI image to call back into gPXE in order to use the existing network stack.
So, any bootloader would need to either implement its own network capabilities,
or not use the network at all.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">I would like to have an interface to allow EFI bootloaders
(such as elilo) to use gPXE’s network stack. In my opinion, this warrants
creating a new protocol because:<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">- None of the standard EFI protocols support HTTP or DNS,
both of which are important features to me<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">- An attempt to implement the standard TCPv4 protocol might
cause conflicts with the existing firmware, because the implementation has to
use global variables<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">- The EFI Load File Protocol is unsuitable, because it
requires the underlying network protocol to be able to determine the file size
in advance, which is not always possible, and it does not allow downloads to be
interrupted<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">A patch is attached that defines an interface that a
bootloader may use to call back into gPXE. There are only 3 operations
supported: one to start downloading a file from a URL, one to abort an
in-progress download, and one to pump data from the network interface. The
caller of the interface supplies callback functions that are executed as data
arrives and when each download finishes. The way it is implemented, I just
hooked into the xfer_* functions in gPXE, and basically exported something similar/simpler
as an EFI protocol.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">This particular patch has not been extensively tested yet
(especially the abort path), and I’m really just looking for comments and
suggestions at this point.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Thanks,<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Geoff<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
</div>
</body>
</html>