<div>Hi <span style="background-color: rgb(239, 239, 239); font-size: 12px; line-height: 18px; ">Alexandre</span><span style="background-color: rgb(239, 239, 239); font-size: 12px; line-height: 18px; "> ,</span></div><div><span style="font-family: 'lucida Grande', Verdana; line-height: 23px; ">Thanks for your greate helpful reply,could you help me answer the following questions?</span></div><div><span style="font-family: 'lucida Grande', Verdana; line-height: 23px; "><br></span></div><div><includetail><div class="moz-cite-prefix">
I think the answers to your first three points should interest
you, in particular the 3rd.<br>
<br>
Alexandre<br>
<br>
On 15/09/12 16:46, Daniel Li wrote:<br>
</div>
<blockquote cite="mid:tencent_3F77E4BB5F2541B922E66C1C@qq.com" type="cite">
<div>Hi Alexandre,</div>
<div>Thanks for your helpful reply,After review your attach file,I
am very very exicted,and then has some questions,could you help
to answer again?</div>
<div>1.I can't found the file sfc9000.c in the ipxe project,what
is the use of this document?Is a new driver and could you tell
me the driver support machine,if you can send the file to me
will best?</div>
</blockquote>
sfc9000 and similar files are code files for our NIC, equivalent to
other NIC specific files in src/drivers/net. You can totally ignore
that.<br> <b> daniel reply:I still can't detect network device Although i built special file like make -C src bin-x86_64-efi/82545em.efidrv,so i want to know what your have fixed ipxe code?did you fix the file efi_pci.c code?</b><br>
<blockquote cite="mid:tencent_3F77E4BB5F2541B922E66C1C@qq.com" type="cite">
<div>2.You said you can successfully PXE boot On a real UEFI
machine,did you used the ipxe project?Did you run under uefi
enviroment?could you tell me the machine and your made
script?which command has been run?what method do you use to
create image?as i know,if you run "chain" or "sanboot" command
under uefi shell,you should create a uefi image format?</div>
</blockquote>
I used the iPXE based UEFI driver for my NIC. The PXE utility is
part of the host machine's software, accessible through the boot
manager (F1 menu on boot on my machine).<br>
So it seems this differs from the way you are trying to pxe boot.
Have you checked if your machine provides such a utility via the
boot manager? Note that if it does you need to make sure the driver
is loaded before starting it.</includetail></div><div><includetail><br> <b> daniel reply:You said you use "</b></includetail><b>The PXE utility is part of the host machine's software",I think the pxe utility is supported by legacy bios?Why did you still need built a ipxe based uefi?Did you netwok boot via ipxe based uefi enviroment?Could you share your step to me?example how config pxe server or how config pxe client.</b></div><div><includetail>
<blockquote cite="mid:tencent_3F77E4BB5F2541B922E66C1C@qq.com" type="cite">
<div>3.Your attach show that the *.efi which your built can
detected the network device,but after
my bin-x86_64-efi/82579lm.efidrv can't detect network device,as
i know,the network device of my Thinkpad T420 machine is intel.</div>
</blockquote>
I detailed in my first email a procedure which I think can be used
to spot which uefi driver to use with your card.<br>
I mentioned 82579lm.efidrv because you listed a device with "<span style="font-family: Verdana,sans-serif;">computer vendor is
8086,device id is 1502".<br>
I can't see a matching device in the output of 'pci' you attached,
so 82579lm.efidrv is probably not what you need.<br>
<br>
From the output of your 'pci' command attached, I found (following
the procedure in my first email):<br>
ipxe/src/drivers/net $ grep -RHIin "8086" . | grep -i "100f"<br>
./intel.c:844: PCI_ROM ( 0x8086, 0x100f, "82545em", "82545EM
(Copper)", 0 ),<br>
<br>
<b>So you probably need to build this one:</b><b><br>
</b><b>$ make -C src bin-x86_64-efi/</b><span style="font-family:
Verdana,sans-serif;"><b>82545em.efidrv</b><br>
<br>
<b>And then do check from your uefi that the driver is loaded
and is managing a device.</b><b><br>
</b><b>See my first email and (in your uefi shell) 'drivers
-?'</b><b> and 'devices -?'</b><b>. (</b>The 'drivers'
command has a column listing the number of devices managed by
the drivers.)</span></span></includetail></div><div><includetail><span style="font-family: Verdana,sans-serif;"><span style="font-family:
Verdana,sans-serif;"><br></span></span></includetail></div><div><includetail><b><br class="Apple-interchange-newline"> daniel reply:I still can't detected network device although i built the file like "
<span style="font-family: Verdana, sans-serif; ">$ make -C src bin-x86_64-efi/</span><span style="font-family: Verdana, sans-serif; ">82545em.efidrv</span> ",could you help to built a general built like "
<span style="font-family: Verdana, sans-serif; ">$ make -C src bin-x86_64-efi/</span><span style="font-family: Verdana, sans-serif; ">ipxe.efidrv</span> " and then test on your machine and send the log to me?I guess it succeed too.</b><span style="font-family: Verdana,sans-serif;"><span style="font-family:
Verdana,sans-serif;"><br>
</span></span>
<blockquote cite="mid:tencent_3F77E4BB5F2541B922E66C1C@qq.com" type="cite">
<div>4.As i know ,the return error code EFI_UNSUPPORTED was showed
when call efi_create->openprotocol?(), because the controller
handle is not in the pci hand list.</div>
</blockquote>
I don't really understand what you mean by . Anyway if your device
is not managed by your driver it seems normal that the procedure
stops at one point. I'd be concerned about that only if it persists
after your driver successfully manages your device.</includetail></div><div><b><includetail><includetail> daniel reply:I think you are right,"</includetail></includetail>I'd be concerned about that only if it persists after your driver successfully manages your device."?Do you know how i can debug it. </b></div><div><includetail><br>
<blockquote cite="mid:tencent_3F77E4BB5F2541B922E66C1C@qq.com" type="cite">
<div>5.PCI_vm_windows7_x64_under_uefishell.txt was created when i
run command "pci" under uefi shell.</div>
</blockquote>
See answer to 3).<br>
<blockquote cite="mid:tencent_3F77E4BB5F2541B922E66C1C@qq.com" type="cite">
<div>6.snponly_boot_failed_under_uefishell.jpg when I run under
command: </div>
<div>fs0:snponly.efi</div>
<div> ipxe:chain <a class="moz-txt-link-freetext" href="http://boot.ipxe.org/demo/boot.php">http://boot.ipxe.org/demo/boot.php</a></div>
</blockquote>
I guess you need to load the correct driver before trying to start
snponly.efi<br>
<blockquote cite="mid:tencent_3F77E4BB5F2541B922E66C1C@qq.com" type="cite">
<div> <b><includetail><includetail>daniel reply:If i used the snponly.efi under uefi enviroment,i can download the image,but i can't boot into the image ,because the image is not uefi format?Did you remote boot </includetail></includetail></b><b><includetail><includetail>succeed via </includetail></includetail></b><b><includetail><includetail>pxe network boot under uefi?</includetail></includetail></b></div></blockquote><blockquote cite="mid:tencent_3F77E4BB5F2541B922E66C1C@qq.com" type="cite"><div>
</div>
<div><br>
</div>
<div>5.Could you help to review two attach documents and point out
my mistakes?</div>
<div>Thanks for your great greate support.</div>
</blockquote>
As pointed before try in order:<br>
- building the correct driver<br>
- load it from the uefi shell and CHECK that it manages your device.<br>
- then try pxe booting or other snp utilities.<br>
<blockquote cite="mid:tencent_3F77E4BB5F2541B922E66C1C@qq.com" type="cite">
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div style="color:#909090;font-family:Arial
Narrow;font-size:12px">------------------</div>
<div style="font-size:14px;font-family:Verdana;color:#000;">Best
Regards,
<div>Daniel Li <br>
</div>
</div>
</div>
</blockquote>
<br>
Alexandre<br>
<blockquote cite="mid:tencent_3F77E4BB5F2541B922E66C1C@qq.com" type="cite">
<div>
<div style="font-size:14px;font-family:Verdana;color:#000;"> </div>
</div>
<div> </div>
<div>
<div><br>
</div>
<div><br>
</div>
<div style="font-size: 12px;font-family: Arial
Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div>
<div style="font-size: 12px;background:#efefef;padding:8px;">
<div><b>From: </b> "Alexandre Rames"<a class="moz-txt-link-rfc2396E" href="mailto:arames@solarflare.com"><arames@solarflare.com></a>;</div>
<div><b>Date: </b> Fri, Sep 14, 2012 05:04 PM</div>
<div><b>To: </b> "Daniel Li"<a class="moz-txt-link-rfc2396E" href="mailto:354225989@qq.com"><354225989@qq.com></a>;
<wbr></div>
<div><b>Cc: </b> "ipxe-devel"<a class="moz-txt-link-rfc2396E" href="mailto:ipxe-devel@lists.ipxe.org"><ipxe-devel@lists.ipxe.org></a>;
<wbr></div>
<div><b>Subject: </b> Re: [ipxe-devel] UEFI SCT patch</div>
</div>
<div><br>
</div>
<div class="moz-cite-prefix">For info I attached a screenshot
of the driver loading. It was compiled with<br>
DEBUG=efi_init,efi_snp,efi_pci,efi_driver_health,netdevice,sfc9000<br>
<br>
On 14/09/12 09:59, Alexandre Rames wrote:<br>
</div>
<blockquote cite="mid:5052F20C.70304@solarflare.com" type="cite">
<div class="moz-cite-prefix">Hello Daniel,<br>
<br>
<br>
<br>
On 13/09/12 14:48, Daniel Li wrote:<br>
</div>
<blockquote cite="mid:tencent_71F736237160EB45749F6506@qq.com" type="cite">
<div>
<div style="font-family: 'lucida Grande', Verdana;
line-height: 23px; ">Hi Alexandre,</div>
<div style="font-family: 'lucida Grande', Verdana;
line-height: 23px; ">Thanks for your quickly reply.Did
you built a *.efi and detected device under uefi
enviroment?Did you network boot succeed?</div>
</div>
</blockquote>
<br>
Yes. I can detect my pci device (UEFI 'pci' command), and
load the driver. On a real UEFI machine I can successfully
PXE boot.<br>
<br>
I am not sure if that makes a difference with your command I
see in the screenshot, but I use a command like <br>
fs0:\> load <driver name>.efidrv<br>
to load the driver. Not a simple invocation of a *.efi file.<br>
From what I mentioned in my previous email yours may be:<br>
ipxe/src $ ls bin-x86_64-efi/*.efidrv<br>
bin-x86_64-efi/82579lm.efidrv<br>
Check the output of 'pci' in your UEFI shell (see previous
email).<br>
<br>
<blockquote cite="mid:tencent_71F736237160EB45749F6506@qq.com" type="cite">
<div>
<div style="font-family: 'lucida Grande', Verdana;
line-height: 23px; ">I have debug this issue more than
one week,but i can't find the root cause,my deubg
information like following figure.</div>
<div style="font-family: 'lucida Grande', Verdana;
line-height: 23px; ">The call flow is
efipci_supported()->efipci_create()->OpenProtocol(),unfortunately,OpenProtocol
return EFI_UNSUPPORTED error code and the log is
"EFIPCI device 0x3dbf5398 is not a PCI device",I think
ipxe can't enum the pci device.Could you tell me the
right step or ut pass machine. I get the faile result
after boot ipxe via uefi shell on Thinkpad T420 and
VMare 8.0,it's network device is intel.</div>
</div>
</blockquote>
If the steps I described previously don't work you may try
to better undestrand why EFI_UNSUPPORTED is returned. Check
the parameters provided to OpenProtocol; maybe list the
protocols available on your handle.<br>
<blockquote cite="mid:tencent_71F736237160EB45749F6506@qq.com" type="cite">
<div>
<div style="font-family: 'lucida Grande', Verdana;
line-height: 23px; "><font color="#ff0000">BTW,Could
you tell me whether ipxe is supported in uefi
enviroment,if not,could you tell me your plan.</font></div>
</div>
</blockquote>
I don't really understand the question here. You can compile
a UEFI driver for you card if it is supported in iPXE.<br>
<blockquote cite="mid:tencent_71F736237160EB45749F6506@qq.com" type="cite">
<div>
<div style="font-family: 'lucida Grande', Verdana;
line-height: 23px; "><br>
</div>
<div style="font-family: 'lucida Grande', Verdana;
line-height: 23px; "><img moz-do-not-send="true" style="border-top-style: none; border-right-style:
none; border-bottom-style: none; border-left-style:
none; border-width: initial; border-color: initial;
vertical-align: middle; "></div>
<div style="font-family: 'lucida Grande', Verdana;
line-height: 23px; ">
<div style="color: rgb(144, 144, 144); font-family:
'Arial Narrow'; font-size: 12px; ">------------------</div>
</div>
</div>
<div><br>
</div>
<div>
<div style="color:#909090;font-family:Arial
Narrow;font-size:12px">------------------</div>
<div style="font-size:14px;font-family:Verdana;color:#000;">Best
Regards,
<div>Daniel Li </div>
</div>
</div>
<div> </div>
</blockquote>
Alexandre<br>
<blockquote cite="mid:tencent_71F736237160EB45749F6506@qq.com" type="cite">
<div>
<div><br>
</div>
<div><br>
</div>
<div style="font-size: 12px;font-family: Arial
Narrow;padding:2px 0 2px 0;">------------------
Original ------------------</div>
<div style="font-size:
12px;background:#efefef;padding:8px;">
<div><b>From: </b> "Alexandre Rames"<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:arames@solarflare.com"><arames@solarflare.com></a>;</div>
<div><b>Date: </b> Thu, Sep 13, 2012 08:39 PM</div>
<div><b>To: </b> "Daniel Li"<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:354225989@qq.com"><354225989@qq.com></a>;
<wbr></div>
<div><b>Cc: </b> "ipxe-devel"<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:ipxe-devel@lists.ipxe.org"><ipxe-devel@lists.ipxe.org></a>;
<wbr></div>
<div><b>Subject: </b> Re: [ipxe-devel] UEFI SCT patch</div>
</div>
<div><br>
</div>
<div class="moz-cite-prefix">My patch will potentially
fix some errors reported by <a moz-do-not-send="true" href="http://www.uefi.org/specs/">SCT</a>. It
probably won't fix your problem.<br>
<br>
I have little experience with UEFI or iPXE, but here
are a few suggestions:<br>
<br>
The commands you listed don't work for me, and I could
not find matching vendor / device id for the first 3
devices you mention:<br>
$ cd <ipxe_repo>/src/<br>
$ grep -RHIin 8086 drivers/net/ | grep -i 2000<br>
$ grep -RHIin 8086 drivers/net/ | grep -i 2001<br>
$ grep -RHIin 8086 drivers/net/ | grep -i 2625<br>
<br>
I could build a efi-driver for the last device your
mention:<br>
<br>
Commands:<br>
$ cd <ipxe_repo>/src/<br>
$ grep -RHIin 8086 drivers/net/ | grep -i 1502<br>
gives me:<br>
./intel.c:926: PCI_ROM ( 0x8086, 0x1502, "82579lm",
"82579LM", 0 )<br>
<br>
So I could build your UEFI driver with the command:<br>
$ make bin-x86_64-efi/82579lm.efidrv -j6<br>
(replace efidrv with efirom to build a rom)<br>
<br>
<br>
I am wondering if your other devices are supported.
Maybe the way I am looking for devices is not
appropriate though.<br>
<br>
Here is an example procedure to load the driver built
previously (very verbose).<br>
<br>
cd to the filesystem<br>
> fs0:<br>
Check that your device exist. Here look for your
device 0x8086, 0x1502<br>
> pci<br>
Check what drivers are loaded. Write down the index of
the last driver loaded.<br>
> drivers<br>
List devices. Write down the index of the last device<br>
> devices<br>
Load your driver manually (this is the file compiled
previously)<br>
> load driver\82579lm.efidrv<br>
Now check if your driver is loaded<br>
> drivers<br>
and if your device is present.<br>
> devices<br>
<br>
If that does not work maybe try to enable debug in
some iPXE files.<br>
For example:<br>
make bin-x86_64-efi/82579lm.efidrv -j6
DEBUG=intel,efi_snp,efi_init<br>
Enabling debug in files related to your device may
give you some useful info.<br>
<br>
Hope this helps,<br>
<br>
Alexandre<br>
<br>
On 13/09/12 12:54, Daniel Li wrote:<br>
</div>
<blockquote cite="mid:tencent_49A6ED8A6B8AE85A6386FC46@qq.com" type="cite">
<div>Hi Alexandre,</div>
<div>Could you tell me which issue was be fixed by
your patch?</div>
<div><br>
</div>
<div>I have some issue like following about ipxe with
uefi,I think you are good well with uefi.</div>
<div><br>
</div>
<div>
<div style="font-family: 'lucida Grande', Verdana;
line-height: 23px; ">
<p class="MsoNormal" style="line-height: 17.25pt;
margin-top: 0in; margin-right: 0in; margin-left:
0in; margin-bottom: 0.0001pt; font-size: 12pt;
font-family: 'Times New Roman', serif; "><span style="font-family: Verdana, sans-serif; ">Our
product will import ipxe,but efi file can't
found network device,I built efi file
according to the below steps.<o:p></o:p></span></p>
</div>
<div style="font-family: 'lucida Grande', Verdana;
line-height: 23px; ">
<p class="MsoNormal" style="line-height: 17.25pt;
margin-top: 0in; margin-right: 0in; margin-left:
0in; margin-bottom: 0.0001pt; font-size: 12pt;
font-family: 'Times New Roman', serif; "><span style="font-family: Verdana, sans-serif;
color: red; ">1.I have undef PXE_STACK and
PXE_MENU in src\config\general.h.</span><span style="font-family: Verdana, sans-serif; "><o:p></o:p></span></p>
</div>
<div style="font-family: 'lucida Grande', Verdana;
line-height: 23px; ">
<p class="MsoNormal" style="line-height: 17.25pt;
margin-top: 0in; margin-right: 0in; margin-left:
0in; margin-bottom: 0.0001pt; font-size: 12pt;
font-family: 'Times New Roman', serif; "><span style="font-family: Verdana, sans-serif;
color: red; ">2.Built EFI version as
vendor/product specific:</span><span style="font-family: Verdana, sans-serif; "><o:p></o:p></span></p>
</div>
<div style="font-family: 'lucida Grande', Verdana;
line-height: 23px; ">
<p class="MsoNormal" style="line-height: 17.25pt;
margin-top: 0in; margin-right: 0in; margin-left:
0in; margin-bottom: 0.0001pt; font-size: 12pt;
font-family: 'Times New Roman', serif; "><span style="font-family: Verdana, sans-serif;
color: red; ">$ make bin-x86-64/10222000.efi
bin-x86-64/10222001.efi
bin-x86-64/10222625.efi.(computer vendor is
1022 ,device id is 2001).</span><span style="font-family: Verdana, sans-serif; "><o:p></o:p></span></p>
</div>
<div style="font-family: 'lucida Grande', Verdana;
line-height: 23px; ">
<p class="MsoNormal" style="line-height: 17.25pt;
margin-top: 0in; margin-right: 0in; margin-left:
0in; margin-bottom: 0.0001pt; font-size: 12pt;
font-family: 'Times New Roman', serif; "><span style="font-family: Verdana, sans-serif;
color: red; ">$make
bin-x86-64-efi/80861502(computer vendor is
8086,device id is 1502).</span><span style="font-family: Verdana, sans-serif; "><o:p></o:p></span></p>
</div>
<div style="font-family: 'lucida Grande', Verdana;
line-height: 23px; ">
<p class="MsoNormal" style="line-height: 17.25pt;
margin-top: 0in; margin-right: 0in; margin-left:
0in; margin-bottom: 0.0001pt; font-size: 12pt;
font-family: 'Times New Roman', serif; "><span style="font-family: Verdana, sans-serif;
color: red; ">3.insert usb drive and enter
uefi shell.</span><span style="font-family:
Verdana, sans-serif; "><o:p></o:p></span></p>
</div>
<div style="font-family: 'lucida Grande', Verdana;
line-height: 23px; ">
<p class="MsoNormal" style="line-height: 17.25pt;
margin-top: 0in; margin-right: 0in; margin-left:
0in; margin-bottom: 0.0001pt; font-size: 12pt;
font-family: 'Times New Roman', serif; "><span style="font-family: Verdana, sans-serif;
color: red; ">4.fs0:</span><span style="font-family: Verdana, sans-serif; "><o:p></o:p></span></p>
</div>
<div style="font-family: 'lucida Grande', Verdana;
line-height: 23px; ">
<p class="MsoNormal" style="line-height: 17.25pt;
margin-top: 0in; margin-right: 0in; margin-left:
0in; margin-bottom: 0.0001pt; font-size: 12pt;
font-family: 'Times New Roman', serif; "><span style="font-family: Verdana, sans-serif;
color: red; ">5.run above efi file.</span><span style="font-family: Verdana, sans-serif; "><o:p></o:p></span></p>
</div>
<div style="font-family: 'lucida Grande', Verdana;
line-height: 23px; ">
<p class="MsoNormal" style="line-height: 17.25pt;
margin-top: 0in; margin-right: 0in; margin-left:
0in; margin-bottom: 0.0001pt; font-size: 12pt;
font-family: 'Times New Roman', serif; "><span style="font-family: Verdana, sans-serif;
color: red; ">6.All commands are Show the tip
</span><span style="font-size: 14.5pt;
font-family: Tahoma, sans-serif; color: red; ">"No
more network devices".</span></p>
</div>
</div>
<div><br>
</div>
<div>
<div style="color:#909090;font-family:Arial
Narrow;font-size:12px">------------------</div>
<div style="font-size:14px;font-family:Verdana;color:#000;">Best
Regards,
<div>Daniel Li </div>
</div>
</div>
<div> </div>
<div>
<div><br>
</div>
<div><br>
</div>
<div style="font-size: 12px;font-family: Arial
Narrow;padding:2px 0 2px 0;">------------------
Original ------------------</div>
<div style="font-size:
12px;background:#efefef;padding:8px;">
<div><b>From: </b> "Alexandre Rames"<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:arames@solarflare.com"><arames@solarflare.com></a>;</div>
<div><b>Date: </b> Thu, Sep 13, 2012 06:15 PM</div>
<div><b>To: </b> "ipxe-devel"<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:ipxe-devel@lists.ipxe.org"><ipxe-devel@lists.ipxe.org></a>;
<wbr></div>
<div><b>Subject: </b> [ipxe-devel] UEFI SCT patch</div>
</div>
<div><br>
</div>
Hello,<br>
<br>
I recently started working on our UEFI driver, and
some of my changes <br>
may be useful for iPXE upstream.<br>
<br>
So here is a first patch dealing with NIC
independent code. Can you have <br>
a look and let me know if it needs some
modifications.<br>
It includes:<br>
- changes to be more UEFI compliant and pass SCT
tests (most changes <br>
in efi_snp.c)<br>
- initial support for the driver health protocol<br>
- initial support for the firmware management
protocol<br>
<br>
You'll probably want to verify the additional checks
for UEFI versions:<br>
- I added the DRIVER_EFI_SUPPORTED_VERSION
protocol, as required by <br>
the UEFI spec.<br>
" Provides information about the version of the EFI
specification that a <br>
driver is following. This<br>
protocol is required for EFI drivers that are on PCI
and other plug in <br>
cards. "<br>
- In efi_init.c I added a check for a minimal
version of UEFI required <br>
to use the driver. I am not sure you want to keep
that.<br>
<br>
<br>
Alexandre<br>
<br>
</div>
</blockquote>
<br>
</div>
</blockquote>
<br>
</blockquote>
<br>
</div>
</blockquote>
<br>
<br></includetail></div>