[ipxe-devel] can snponly.efi run without NII protocol installed?
Michael Brown
mcb30 at ipxe.org
Mon Aug 24 10:52:45 UTC 2020
On 20/08/2020 10:28, 丰立波 wrote:
> I get a screenshot for debugging:
> I think iPxe tried to replace the SNP protocol of my UEFI land with its
> own SNP driver(the driver code is in the directory of
> ipxe/src/drivers/net/efi/), first ipxe disconnect the my uefi driver,
> then connect its own driver, but at this point, connection failed.
>
> There are two questions:
> 1. why the new connection failed?
> 2. Why iPXE try to replace my uefi driver, could iPxe just use the
> original driver? Thanks.
iPXE needs to disconnect other drivers (e.g. MnpDxe) from the SNP
handle, so that it can have exclusive access to the network device.
From the screenshot it looks as though your custom UEFI driver stack
has the incorrect hierarchy of handles. My guess is that you may have
some platform-specific driver providing the MAC(3C6A2CB0866A,0x1) handle
as though it were a hardware device, and that your SNP driver then binds
to this existing handle and installs EFI_SIMPLE_NETWORK_PROTOCOL as an
additional protocol.
This would be incorrect behaviour: the SNP driver should bind to a
hardware device handle and then install EFI_SIMPLE_NETWORK_PROTOCOL onto
a new handle. You can see this in action on a standard x86 UEFI system:
the hardware device handle will be e.g.
PciRoot(0x0)/Pci(0x3,0x0)
and the SNP device handle will then be e.g.
PciRoot(0x0)/Pci(0x3,0x0)/MAC(525400123456,0x1).
Try building with DEBUG=efi_driver:3 (which will dump additional
information about the handle before and after disconnection).
Michael
More information about the ipxe-devel
mailing list