david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
Commit Graph

12 Commits

Author SHA1 Message Date
Michael Brown 9ccd8fe569 [efi] Enumerate PCI BARs in same order as SnpDxe
The UEFI specification has an implicit and demonstrably incorrect
requirement (in the Mem_IO() calling convention) that any UNDI network
device has at most one memory BAR and one I/O BAR.

Some UEFI platforms have been observed to report the existence of
non-existent additional I/O BARs, causing iPXE to select the wrong
BAR.  This problem does not affect the SnpDxe driver, since that
driver will always choose the lowest numbered existent BAR of each
type.

Adjust iPXE's behaviour to match that of SnpDxe, i.e. to always select
the lowest numbered BAR(s).

Debugged-by: Andreas Hammarskjöld <junior@2PintSoftware.com>
Debugged-by: Adklei <adklei@realtek.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2017-07-21 15:00:17 +01:00
Michael Brown 6324227dca [efi] Skip cable detection at initialisation where possible
We currently request cable detection in PXE_OPCODE_INITIALIZE to work
around buggy Emulex drivers (see commit c0b61ba ("[efi] Work around
bugs in Emulex NII driver")).

This causes problems with some other NII drivers (e.g. Mellanox),
which may time out if the underlying link is intrinsically slow to
come up.

Attempt to work around both problems simultaneously by requesting
cable detection only if the underlying NII driver does not support
link status reporting via PXE_OPCODE_GET_STATUS.  (This is based on a
potentially incorrect assumption that the buggy Emulex drivers do not
claim to report link status via PXE_OPCODE_GET_STATUS.)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2017-03-19 13:30:27 +00:00
Michael Brown 9501eaf68d [efi] Remove raw EFI_HANDLE values from debug messages
The raw EFI_HANDLE value is almost never useful to know, and simply
adds noise to the already verbose debug messages.  Improve the
legibility of debug messages by using only the name generated by
efi_handle_name().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-08-27 15:40:44 +01:00
Fabrice Bacchella c0b61bad99 [efi] Work around bugs in Emulex NII driver
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-08-17 15:57:05 +01:00
Fabrice Bacchella b71037989d [efi] Improve NII driver logging
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-08-17 15:55:48 +01:00
Michael Brown c6c7e78c42 [efi] Poll for TX completions only when there is an outstanding TX buffer
At least one NII implementation (in a Microsoft Surface tablet) seems
to fail to report the absence (sic) of TX completions properly.  Work
around this by checking for TX completions only when we expect to see
one.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-14 17:02:00 +01:00
Michael Brown 729c16ad5b [efi] Poll media status only if advertised as supported
Some NII implementations will fail the GET_STATUS operation if we
request the media status.  Fix by doing so only if GET_INIT_INFO
reported that media status is supported.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-14 16:44:37 +01:00
Michael Brown 914dd539b0 [efi] Provide a dummy data block in nii_initialise()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-14 16:21:37 +01:00
Michael Brown b6ee89ffb5 [legal] Relicense files under GPL2_OR_LATER_OR_UBDL
Relicense files for which I am the sole author (as identified by
util/relicense.pl).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-02 14:17:31 +00:00
Michael Brown af17abf67f [efi] Include NII driver within "snp" and "snponly" build targets
End users almost certainly don't care whether the underlying interface
is SNP or NII/UNDI.  Try to minimise surprise and unnecessary
documentation by including the NII driver whenever the SNP driver is
requested.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-10-17 16:52:31 +01:00
Michael Brown feb3a0f7d5 [efi] Check for presence of UNDI in NII protocol
iPXE itself exposes a dummy NII protocol with no UNDI.  Avoid
potentially dereferencing a NULL pointer by checking for a non-zero
UNDI address.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-10-17 16:52:31 +01:00
Michael Brown 047baaba38 [efi] Add NII / UNDI driver
Some UEFI network drivers provide a software UNDI interface which is
exposed via the Network Interface Identifier Protocol (NII), rather
than providing a Simple Network Protocol (SNP).

The UEFI platform firmware will usually include the SnpDxe driver,
which attaches to NII and provides an SNP interface.  The SNP
interface is usually provided on the same handle as the underlying NII
device.  This causes problems for our EFI driver model: when
efi_driver_connect() detaches existing drivers from the handle it will
cause the SNP interface to be uninstalled, and so our SNP driver will
not be able to attach to the handle.  The platform firmware will
eventually reattach the SnpDxe driver and may attach us to the SNP
handle, but we have no way to prevent other drivers from attaching
first.

Fix by providing a driver which can attach directly to the NII
protocol, using the software UNDI interface to drive the network
device.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-10-16 14:13:20 +01:00