[ipxe-devel] UEFI SCT patch
Alexandre Rames
arames at solarflare.com
Fri Sep 14 09:04:38 UTC 2012
For info I attached a screenshot of the driver loading. It was compiled with
DEBUG=efi_init,efi_snp,efi_pci,efi_driver_health,netdevice,sfc9000
On 14/09/12 09:59, Alexandre Rames wrote:
> Hello Daniel,
>
>
>
> On 13/09/12 14:48, Daniel Li wrote:
>> Hi Alexandre,
>> Thanks for your quickly reply.Did you built a *.efi and detected
>> device under uefi enviroment?Did you network boot succeed?
>
> Yes. I can detect my pci device (UEFI 'pci' command), and load the
> driver. On a real UEFI machine I can successfully PXE boot.
>
> I am not sure if that makes a difference with your command I see in
> the screenshot, but I use a command like
> fs0:\> load <driver name>.efidrv
> to load the driver. Not a simple invocation of a *.efi file.
> From what I mentioned in my previous email yours may be:
> ipxe/src $ ls bin-x86_64-efi/*.efidrv
> bin-x86_64-efi/82579lm.efidrv
> Check the output of 'pci' in your UEFI shell (see previous email).
>
>> I have debug this issue more than one week,but i can't find the root
>> cause,my deubg information like following figure.
>> 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.
> 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.
>> BTW,Could you tell me whether ipxe is supported in uefi enviroment,if
>> not,could you tell me your plan.
> I don't really understand the question here. You can compile a UEFI
> driver for you card if it is supported in iPXE.
>>
>> ------------------
>>
>> ------------------
>> Best Regards,
>> Daniel Li
> Alexandre
>>
>>
>> ------------------ Original ------------------
>> *From: * "Alexandre Rames"<arames at solarflare.com>;
>> *Date: * Thu, Sep 13, 2012 08:39 PM
>> *To: * "Daniel Li"<354225989 at qq.com>;
>> *Cc: * "ipxe-devel"<ipxe-devel at lists.ipxe.org>;
>> *Subject: * Re: [ipxe-devel] UEFI SCT patch
>>
>> My patch will potentially fix some errors reported by SCT
>> <http://www.uefi.org/specs/>. It probably won't fix your problem.
>>
>> I have little experience with UEFI or iPXE, but here are a few
>> suggestions:
>>
>> 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:
>> $ cd <ipxe_repo>/src/
>> $ grep -RHIin 8086 drivers/net/ | grep -i 2000
>> $ grep -RHIin 8086 drivers/net/ | grep -i 2001
>> $ grep -RHIin 8086 drivers/net/ | grep -i 2625
>>
>> I could build a efi-driver for the last device your mention:
>>
>> Commands:
>> $ cd <ipxe_repo>/src/
>> $ grep -RHIin 8086 drivers/net/ | grep -i 1502
>> gives me:
>> ./intel.c:926: PCI_ROM ( 0x8086, 0x1502, "82579lm", "82579LM", 0 )
>>
>> So I could build your UEFI driver with the command:
>> $ make bin-x86_64-efi/82579lm.efidrv -j6
>> (replace efidrv with efirom to build a rom)
>>
>>
>> I am wondering if your other devices are supported. Maybe the way I
>> am looking for devices is not appropriate though.
>>
>> Here is an example procedure to load the driver built previously
>> (very verbose).
>>
>> cd to the filesystem
>> > fs0:
>> Check that your device exist. Here look for your device 0x8086, 0x1502
>> > pci
>> Check what drivers are loaded. Write down the index of the last
>> driver loaded.
>> > drivers
>> List devices. Write down the index of the last device
>> > devices
>> Load your driver manually (this is the file compiled previously)
>> > load driver\82579lm.efidrv
>> Now check if your driver is loaded
>> > drivers
>> and if your device is present.
>> > devices
>>
>> If that does not work maybe try to enable debug in some iPXE files.
>> For example:
>> make bin-x86_64-efi/82579lm.efidrv -j6 DEBUG=intel,efi_snp,efi_init
>> Enabling debug in files related to your device may give you some
>> useful info.
>>
>> Hope this helps,
>>
>> Alexandre
>>
>> On 13/09/12 12:54, Daniel Li wrote:
>>> Hi Alexandre,
>>> Could you tell me which issue was be fixed by your patch?
>>>
>>> I have some issue like following about ipxe with uefi,I think you
>>> are good well with uefi.
>>>
>>> Our product will import ipxe,but efi file can't found network
>>> device,I built efi file according to the below steps.
>>>
>>> 1.I have undef PXE_STACK and PXE_MENU in src\config\general.h.
>>>
>>> 2.Built EFI version as vendor/product specific:
>>>
>>> $ make bin-x86-64/10222000.efi bin-x86-64/10222001.efi
>>> bin-x86-64/10222625.efi.(computer vendor is 1022 ,device id is 2001).
>>>
>>> $make bin-x86-64-efi/80861502(computer vendor is 8086,device id is
>>> 1502).
>>>
>>> 3.insert usb drive and enter uefi shell.
>>>
>>> 4.fs0:
>>>
>>> 5.run above efi file.
>>>
>>> 6.All commands are Show the tip "No more network devices".
>>>
>>>
>>> ------------------
>>> Best Regards,
>>> Daniel Li
>>>
>>>
>>> ------------------ Original ------------------
>>> *From: * "Alexandre Rames"<arames at solarflare.com>;
>>> *Date: * Thu, Sep 13, 2012 06:15 PM
>>> *To: * "ipxe-devel"<ipxe-devel at lists.ipxe.org>;
>>> *Subject: * [ipxe-devel] UEFI SCT patch
>>>
>>> Hello,
>>>
>>> I recently started working on our UEFI driver, and some of my changes
>>> may be useful for iPXE upstream.
>>>
>>> So here is a first patch dealing with NIC independent code. Can you
>>> have
>>> a look and let me know if it needs some modifications.
>>> It includes:
>>> - changes to be more UEFI compliant and pass SCT tests (most changes
>>> in efi_snp.c)
>>> - initial support for the driver health protocol
>>> - initial support for the firmware management protocol
>>>
>>> You'll probably want to verify the additional checks for UEFI versions:
>>> - I added the DRIVER_EFI_SUPPORTED_VERSION protocol, as required by
>>> the UEFI spec.
>>> " Provides information about the version of the EFI specification
>>> that a
>>> driver is following. This
>>> protocol is required for EFI drivers that are on PCI and other plug in
>>> cards. "
>>> - In efi_init.c I added a check for a minimal version of UEFI required
>>> to use the driver. I am not sure you want to keep that.
>>>
>>>
>>> Alexandre
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20120914/a73ba975/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 29159 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20120914/a73ba975/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2012-09-14 09:53:38.png
Type: image/png
Size: 16198 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20120914/a73ba975/attachment-0001.png>
More information about the ipxe-devel
mailing list