iPXE - Open Source Boot Firmware

ipxe.git
4 weeks ago[build] Handle R_X86_64_PLT32 from binutils 2.31 master github/coverity_scan github/master
Christian Hesse [Sat, 25 Aug 2018 11:53:08 +0000 (13:53 +0200)] 
[build] Handle R_X86_64_PLT32 from binutils 2.31

Starting from binutils 2.31.0 (commit bd7ab16b) x86-64 assembler
generates R_X86_64_PLT32 instead of R_X86_64_PC32.

Acked-by: John Jolly <jjolly@suse.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

7 weeks ago[sfc] Add support for X25xx adapters
Martin Habets [Mon, 18 Jun 2018 10:41:38 +0000 (11:41 +0100)] 
[sfc] Add support for X25xx adapters

The first adapters in this family are X2522-10, X2522-25, X2541 and
X2542.

These no longer use PCI BAR 0 for I/O, but use that for memory.  In
other words, BAR 2 on SFN8xxx adapters now becomes BAR 0.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

2 months ago[intelxl] Add driver for Intel 40 Gigabit Ethernet NICs
Michael Brown [Sun, 8 Jul 2018 15:41:12 +0000 (16:41 +0100)] 
[intelxl] Add driver for Intel 40 Gigabit Ethernet NICs

Signed-off-by: Michael Brown <mcb30@ipxe.org>

2 months ago[ethernet] Use standard 1500 byte MTU unless explicitly overridden
Michael Brown [Tue, 17 Jul 2018 11:01:30 +0000 (12:01 +0100)] 
[ethernet] Use standard 1500 byte MTU unless explicitly overridden

Devices that support jumbo frames will currently default to the
largest possible MTU.  This assumption is valid for virtual adapters
such as virtio-net, where the MTU must have been configured by a
system administrator, but is unsafe in the general case of a physical
adapter.

Default to the standard Ethernet MTU, unless explicitly overridden
either by the driver or via the ${netX/mtu} setting.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

3 months ago[rndis] Clean up error handling path in register_rndis()
Michael Brown [Mon, 9 Jul 2018 09:35:57 +0000 (10:35 +0100)] 
[rndis] Clean up error handling path in register_rndis()

Avoid calling rndis_halt() and rndis->op->close() twice if the call to
register_netdev() fails.

Reported-by: Roman Kagan <rkagan@virtuozzo.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

3 months ago[build] Use positive-form tests when checking for supported warnings
Michael Brown [Sun, 8 Jul 2018 17:12:43 +0000 (18:12 +0100)] 
[build] Use positive-form tests when checking for supported warnings

Some versions of gcc seem to silently accept an attempt to disable an
unrecognised warning (e.g. via -Wno-stringop-truncation) but will then
report the unrecognised warning if any other error occurs during the
build, resulting in a potentially misleading error message.

Avoid this potential confusion by using the positive-form tests in
order to determine the workaround CFLAGS.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

3 months ago[vmbus] Do not expect version in version_response
Roman Kagan [Sat, 9 Jun 2018 14:53:31 +0000 (17:53 +0300)] 
[vmbus] Do not expect version in version_response

The definition of version_response channel message in Linux doesn't
include version field, so the upcoming VMBus implementation in QEMU
doesn't set it either.  Neither Windows nor Linux had any problem with
this.

The check against this field is redundant because the message is the
response to initiate_contact message containing the specific version
requested, so the response with version_supported=true is unambiguous.

Drop this check and don't rely on the field to be present in the
message.

Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

3 months ago[rndis] Register netdev with MAC filled
Roman Kagan [Fri, 1 Jun 2018 06:59:01 +0000 (09:59 +0300)] 
[rndis] Register netdev with MAC filled

register_netdev expects ->hw_addr and ->ll_addr to be already filled,
so move it towards the end of register_rndis, after the respective
fields have been successfully queried from the underlying device.

Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

3 months ago[efi] Exclude link-layer header length from MaxPacketSize
Rob Taglang [Fri, 27 Apr 2018 18:19:07 +0000 (14:19 -0400)] 
[efi] Exclude link-layer header length from MaxPacketSize

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

3 months ago[intelx] Add support for Intel X552 NIC
Steven Haber [Thu, 10 May 2018 23:12:32 +0000 (16:12 -0700)] 
[intelx] Add support for Intel X552 NIC

Signed-off-by: Michael Brown <mcb30@ipxe.org>

3 months ago[build] Disable gcc stringop-truncation warnings
Bruce Rogers [Tue, 24 Apr 2018 14:47:32 +0000 (08:47 -0600)] 
[build] Disable gcc stringop-truncation warnings

The gcc 8 compiler introduces a warning for certain string
manipulation functions, flagging usages which _may_ not be intended.
An audit of the iPXE sources indicates all usages of strncat and
strncpy are as intended, so the warnings currently issued are not
helpful, especially if warnings are considered errors.

Fix by detecting gcc's support for -Wno-stringop-truncation and, if
detected, using that option to avoid the warning.

Signed-off-by: Bruce Rogers <brogers@suse.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Also-fixed-by: Christian Hesse <list@eworm.de>
Also-fixed-by: Roman Kagan <rkagan@virtuozzo.com>
Also-fixed-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
Also-fixed-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

4 months ago[http] Work around stateful authentication schemes
Michael Brown [Mon, 14 May 2018 10:16:34 +0000 (11:16 +0100)] 
[http] Work around stateful authentication schemes

As pointedly documented in RFC7230 section 2.3, HTTP is a stateless
protocol: each request message can be understood in isolation from any
other requests or responses.  Various authentication schemes such as
NTLM break this fundamental property of HTTP and rely on the same TCP
connection being reused.

Work around these broken authentication schemes by ensuring that the
most recently pooled connection is reused for the subsequent
authentication retry.

Reported-by: Andreas Hammarskjöld <junior@2PintSoftware.com>
Tested-by: Andreas Hammarskjöld <junior@2PintSoftware.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

5 months ago[icplus] Add driver for IC+ network card
Sylvie Barlow [Fri, 20 Apr 2018 13:10:26 +0000 (14:10 +0100)] 
[icplus] Add driver for IC+ network card

Signed-off-by: Sylvie Barlow <sylvie.c.barlow@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

5 months ago[mii] Add bit-bashing interface
Sylvie Barlow [Fri, 20 Apr 2018 12:58:40 +0000 (13:58 +0100)] 
[mii] Add bit-bashing interface

Signed-off-by: Sylvie Barlow <sylvie.c.barlow@gmail.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

5 months ago[mii] Add mii_find()
Sylvie Barlow [Fri, 20 Apr 2018 12:37:20 +0000 (13:37 +0100)] 
[mii] Add mii_find()

Add the function mii_find() in order to locate the PHY address.

Signed-off-by: Sylvie Barlow <sylvie.c.barlow@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

5 months ago[mii] Fix typo in parameter name
Michael Brown [Fri, 20 Apr 2018 12:25:46 +0000 (13:25 +0100)] 
[mii] Fix typo in parameter name

Signed-off-by: Michael Brown <mcb30@ipxe.org>

5 months ago[tcp] Add missing packed attribute on struct tcp_header
Michael Brown [Thu, 19 Apr 2018 16:32:07 +0000 (17:32 +0100)] 
[tcp] Add missing packed attribute on struct tcp_header

Debugged-by: Mark Rutland <mark.rutland@arm.com>
Debugged-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

5 months ago[mii] Separate concepts of MII interface and MII device
Michael Brown [Thu, 19 Apr 2018 11:38:55 +0000 (12:38 +0100)] 
[mii] Separate concepts of MII interface and MII device

We currently have no generic concept of a PHY address, since all
existing implementations simply hardcode the PHY address within the
MII access methods.

A bit-bashing MII interface will need to be provided with an explicit
PHY address in order to generate the correct waveform.  Allow for this
by separating out the concept of a MII device (i.e. a specific PHY
address attached to a particular MII interface).

Signed-off-by: Michael Brown <mcb30@ipxe.org>

5 months ago[velocity] Fix usage of mii_read() and mii_write()
Michael Brown [Thu, 19 Apr 2018 11:36:16 +0000 (12:36 +0100)] 
[velocity] Fix usage of mii_read() and mii_write()

Signed-off-by: Michael Brown <mcb30@ipxe.org>

5 months ago[rhine] Fix usage of mii_read()
Michael Brown [Thu, 19 Apr 2018 11:34:08 +0000 (12:34 +0100)] 
[rhine] Fix usage of mii_read()

Signed-off-by: Michael Brown <mcb30@ipxe.org>

5 months ago[undi] Include subsystem IDs in broken interrupt device check
Michael Brown [Wed, 18 Apr 2018 15:38:36 +0000 (16:38 +0100)] 
[undi] Include subsystem IDs in broken interrupt device check

Allow the subsystem IDs to be used when checking for PXE stacks with
broken interrupt support.

Suggested-by: Levi Hsieh <Levi.Hsieh@dell.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[intelx] Add PCI_ROM entry for Intel X553 NIC
Rob Taglang [Thu, 5 Apr 2018 18:47:23 +0000 (14:47 -0400)] 
[intelx] Add PCI_ROM entry for Intel X553 NIC

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[efi] Add support for R_ARM_REL32 relocations
Heinrich Schuchardt [Tue, 27 Mar 2018 17:07:38 +0000 (19:07 +0200)] 
[efi] Add support for R_ARM_REL32 relocations

The relocation type R_ARM_REL32 is generated when building
bin-arm32-efi/snp.efi using gcc 6.3 and ld 2.28.

R_ARM_REL32 is a program counter (PC) relative 32 bit relocation so we
can ignore it like all other PC relative relocations.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[efi] Do not raise TPL within EFI_DRIVER_BINDING_PROTOCOL.Supported()
Michael Brown [Mon, 26 Mar 2018 11:10:09 +0000 (12:10 +0100)] 
[efi] Do not raise TPL within EFI_DRIVER_BINDING_PROTOCOL.Supported()

When booting some versions of the UEFI shell, our driver binding
protocol's Supported() entry point is called at TPL_NOTIFY for no
discernible reason.  Attempting to raise to TPL_CALLBACK triggers an
immediate assertion failure in the firmware.

Since our Supported() method can run at any TPL, fix by simply not
attempting to raise the TPL within this method.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[efi] Release SNP devices before starting SAN boot image
Michael Brown [Mon, 26 Mar 2018 10:31:41 +0000 (11:31 +0100)] 
[efi] Release SNP devices before starting SAN boot image

Release SNP devices to allow the SAN booted image to use our
EFI_SIMPLE_NETWORK_PROTOCOL instance, and to ensure that the image is
started at TPL_APPLICATION.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[tls] Ensure that window change is propagated to plainstream interface
Michael Brown [Sat, 24 Mar 2018 21:44:09 +0000 (21:44 +0000)] 
[tls] Ensure that window change is propagated to plainstream interface

The cipherstream xfer_window_changed() message is used to retrigger
the TLS transmit state machine.  If the transmit state machine is
idle, then the window change message will not be propagated to the
plainstream interface.  This can potentially cause the plainstream
interface peer (e.g. httpcore) to block waiting for a window change
message that will never arrive.

Fix by ensuring that the window change message is propagated to the
plainstream interface if the transmit state machine is idle.  (If the
transmit state machine is not idle then the plainstream window will be
zero anyway.)

Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[tls] Rename tls_session to tls_connection
Michael Brown [Thu, 22 Mar 2018 16:10:46 +0000 (18:10 +0200)] 
[tls] Rename tls_session to tls_connection

In TLS terminology a session conceptually spans multiple individual
connections, and essentially represents the stored cryptographic state
(master secret and cipher suite) required to establish communication
without going through the certificate and key exchange handshakes.

Rename tls_session to tls_connection in order to make the name
tls_session available to represent the session state.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[list] Add list_is_first_entry() and list_is_last_entry()
Michael Brown [Sat, 24 Mar 2018 21:26:19 +0000 (21:26 +0000)] 
[list] Add list_is_first_entry() and list_is_last_entry()

Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[tls] Ensure received data list is initialised before calling tls_free()
Michael Brown [Fri, 23 Mar 2018 11:07:29 +0000 (11:07 +0000)] 
[tls] Ensure received data list is initialised before calling tls_free()

A failure in tls_generate_random() will result in a call to ref_put()
before the received data list has been initialised, which will cause
free_tls() to attempt to traverse an uninitialised list.

Fix by ensuring that all fields referenced by free_tls() are
initialised before any of the potential failure paths.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[util] Support reversed sort ordering when generating NIC list
Robin Smidsrød [Wed, 21 Mar 2018 15:08:58 +0000 (17:08 +0200)] 
[util] Support reversed sort ordering when generating NIC list

Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[librm] Ensure that inline code symbols are unique
Michael Brown [Wed, 21 Mar 2018 14:47:33 +0000 (16:47 +0200)] 
[librm] Ensure that inline code symbols are unique

Commit 6149e0a ("[librm] Provide symbols for inline code placed into
other sections") may cause build failures due to duplicate label names
if the compiler chooses to duplicate inline assembly code.

Fix by using the "%=" special format string to include a
guaranteed-unique number within the label name.

The "%=" will be expanded only if constraints exist for the inline
assembly.  This fix therefore requires that all REAL_CODE() fragments
use a (possibly empty) constraint list.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[librm] Provide symbols for inline code placed into other sections
Michael Brown [Wed, 21 Mar 2018 12:39:18 +0000 (14:39 +0200)] 
[librm] Provide symbols for inline code placed into other sections

Provide symbols constructed from the object name and line number for
code fragments placed into alternative sections, such as inline
REAL_CODE() assembly placed into .text16.  This simplifies the
debugging task of finding the source code corresponding to a given
instruction pointer.

Note that we cannot use __FUNCTION__ since it is not a preprocessor
macro and so cannot be concatenated with string literals.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[undi] Treat invalid IRQ numbers as non-fatal errors
Michael Brown [Wed, 21 Mar 2018 08:28:05 +0000 (10:28 +0200)] 
[undi] Treat invalid IRQ numbers as non-fatal errors

If the underlying PXE stack reports an invalid IRQ number (above
IRQ_MAX), treat this as equivalent to an empty IRQ number and fall
back to using polling mode.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[build] Prevent use of MMX and SSE registers
Michael Brown [Tue, 20 Mar 2018 19:34:46 +0000 (21:34 +0200)] 
[build] Prevent use of MMX and SSE registers

The existence of MMX and SSE is required by the System V x86_64 ABI
and so is assumed by gcc, but these registers are not preserved by our
own interrupt handlers and are unlikely to be preserved by other
context switch handlers in a boot firmware environment.

Explicitly prevent gcc from using MMX or SSE registers to avoid
potential problems due to silent register corruption.

We must remove the %xmm0-%xmm5 clobbers from the x86_64 version of
hv_call() since otherwise gcc will complain about unknown register
names.  Theoretically, we should probably add code to explicitly
preserve the %xmm0-%xmm5 registers across a hypercall, in order to
guarantee to external code that these registers remain unchanged.  In
practice this is difficult since SSE registers are disabled by
default: for background information see commits 71560d1 ("[librm]
Preserve FPU, MMX and SSE state across calls to virt_call()") and
dd9a14d ("[librm] Conditionalize the workaround for the Tivoli VMM's
SSE garbling").

Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[rng] Use fixed-point calculations for min-entropy quantities
Michael Brown [Tue, 20 Mar 2018 18:42:39 +0000 (20:42 +0200)] 
[rng] Use fixed-point calculations for min-entropy quantities

We currently perform various min-entropy calculations using build-time
floating-point arithmetic.  No floating-point code ends up in the
final binary, since the results are eventually converted to integers
and asserted to be compile-time constants.

Though this mechanism is undoubtedly cute, it inhibits us from using
"-mno-sse" to prevent the use of SSE registers by the compiler.

Fix by using fixed-point arithmetic instead.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[golan] Set log_max_qp to 1
Ameer Mahagneh [Tue, 20 Mar 2018 15:55:04 +0000 (17:55 +0200)] 
[golan] Set log_max_qp to 1

This is required to work around a bug in some firmware versions.

Signed-off-by: Ameer Mahagneh <ameerm@mellanox.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[time] Add support for the ACPI power management timer
Michael Brown [Tue, 20 Mar 2018 15:26:49 +0000 (17:26 +0200)] 
[time] Add support for the ACPI power management timer

Allow the ACPI power management timer to be used if enabled via
TIMER_ACPI in config/timer.h.  This provides an alternative timer on
systems where the standard 8254 PIT is unavailable or unreliable.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[efi] Provide Map_Mem() and associated UNDI callbacks
Michael Brown [Tue, 20 Mar 2018 11:22:30 +0000 (13:22 +0200)] 
[efi] Provide Map_Mem() and associated UNDI callbacks

Some drivers are known to call the optional Map_Mem() callback without
first checking that the callback exists.  Provide a usable basic
implementation of Map_Mem() along with the other callbacks that become
mandatory if Map_Mem() is provided.

Note that in theory the PCI I/O protocol is allowed to require
multiple calls to Map(), with each call handling only a subset of the
overall mapped range.  However, the reference implementation in EDK2
assumes that a single Map() will always suffice, so we can probably
make the same simplifying assumption here.

Tested with the Intel E3522X2.EFI driver (which, incidentally, fails
to cleanly remove one of its mappings).

Originally-implemented-by: Maor Dickman <maord@mellanox.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[lacp] Check the partner's own state when checking for blocked links
Michael Brown [Mon, 19 Mar 2018 13:47:39 +0000 (15:47 +0200)] 
[lacp] Check the partner's own state when checking for blocked links

The blocked link test in eth_slow_lacp_rx() is performed before the
actor TLV is copied to the partner TLV, and so must test the actor
state field rather than the partner state field.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[ocsp] Allow OCSP checks to be disabled
Michael Brown [Sun, 18 Mar 2018 20:27:49 +0000 (22:27 +0200)] 
[ocsp] Allow OCSP checks to be disabled

Some CAs provide non-functional OCSP servers, and some clients are
forced to operate on networks without access to the OCSP servers.
Allow the user to explicitly disable the use of OCSP checks by
undefining OCSP_CHECK in config/crypto.h.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[ocsp] Centralise test for whether or not an OCSP check is required
Michael Brown [Sun, 18 Mar 2018 20:21:49 +0000 (22:21 +0200)] 
[ocsp] Centralise test for whether or not an OCSP check is required

Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[profile] Prevent potential division by zero
Michael Brown [Sun, 18 Mar 2018 16:36:58 +0000 (18:36 +0200)] 
[profile] Prevent potential division by zero

Limit the profile sample count to INT_MAX to avoid both signed
overflow and a potential division by zero when updating the stored
mean value.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[tftp] Prevent potential division by zero
Michael Brown [Sun, 18 Mar 2018 15:43:11 +0000 (17:43 +0200)] 
[tftp] Prevent potential division by zero

Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[lacp] Fix debug message to match documentation
Michael Brown [Sun, 18 Mar 2018 15:20:04 +0000 (17:20 +0200)] 
[lacp] Fix debug message to match documentation

Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[lacp] Mark link as blocked if partner is not yet up and running
Michael Brown [Sun, 18 Mar 2018 15:11:16 +0000 (17:11 +0200)] 
[lacp] Mark link as blocked if partner is not yet up and running

Mark the link as blocked if the LACP partner is not reporting itself
as being in sync, collecting, and distributing.

This matches the behaviour for STP: we mark the link as blocked if we
detect that the switch is actively blocking traffic, in order to
extend the DHCP discovery period and so prevent boot failures on
switches that take an excessively long time to enable ports.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[golan] Do not assume all devices are identical
Michael Brown [Sun, 18 Mar 2018 13:40:23 +0000 (15:40 +0200)] 
[golan] Do not assume all devices are identical

Remove the global variable shomron_nodnic_supported, since it may have
different values for different PCI devices.

Originally-fixed-by: Mohammed Taha <mohammedt@mellanox.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

6 months ago[librm] Add facility to provide register and stack dump for CPU exceptions
Michael Brown [Sun, 18 Mar 2018 12:54:57 +0000 (14:54 +0200)] 
[librm] Add facility to provide register and stack dump for CPU exceptions

When DEBUG=librm_mgmt is enabled, intercept CPU exceptions and provide
a register and stack dump, then drop to an emergency shell.  Exiting
from the shell will almost certainly not work, but this provides an
opportunity to view the register and stack dump and carry out some
basic debugging.

Note that we can intercept only the first 8 CPU exceptions, since a
PXE ROM is not permitted to rebase the PIC.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

7 months ago[intel] Add PCI_ROM entry for Intel i354 NIC
Rob Taglang [Wed, 14 Mar 2018 20:09:20 +0000 (16:09 -0400)] 
[intel] Add PCI_ROM entry for Intel i354 NIC

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

7 months ago[efi] Raise TPL within EFI_DRIVER_BINDING_PROTOCOL entry points
Michael Brown [Wed, 14 Mar 2018 23:55:28 +0000 (23:55 +0000)] 
[efi] Raise TPL within EFI_DRIVER_BINDING_PROTOCOL entry points

Debugged-by: Rob Taglang <rob@privatemachines.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

7 months ago[efi] Drop to TPL_APPLICATION when gathering entropy
Michael Brown [Mon, 12 Mar 2018 10:55:28 +0000 (10:55 +0000)] 
[efi] Drop to TPL_APPLICATION when gathering entropy

Commit c89a446 ("[efi] Run at TPL_CALLBACK to protect against UEFI
timers") introduced a regression in the EFI entropy gathering code.
When the EFI_RNG_PROTOCOL is not present, we fall back to using timer
interrupts (as for the BIOS build).  Since timer interrupts are
disabled at TPL_CALLBACK, WaitForEvent() fails and no entropy can be
gathered.

Fix by dropping to TPL_APPLICATION while entropy gathering is enabled.

Reported-by: Andreas Hammarskjöld <junior@2PintSoftware.com>
Tested-by: Andreas Hammarskjöld <junior@2PintSoftware.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

7 months ago[iscsi] Parse IPv6 address in root path
Hannes Reinecke [Thu, 1 Mar 2018 13:30:41 +0000 (13:30 +0000)] 
[iscsi] Parse IPv6 address in root path

The iSCSI root path may contain a literal IPv6 address.  Update the
parser to handle this address format correctly.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

7 months ago[process] Include process name in debug messages
Michael Brown [Tue, 20 Feb 2018 18:02:25 +0000 (18:02 +0000)] 
[process] Include process name in debug messages

Signed-off-by: Michael Brown <mcb30@ipxe.org>

7 months ago[efi] Raise TPL within EFI_USB_IO_PROTOCOL entry points
Michael Brown [Tue, 20 Feb 2018 11:19:39 +0000 (11:19 +0000)] 
[efi] Raise TPL within EFI_USB_IO_PROTOCOL entry points

Signed-off-by: Michael Brown <mcb30@ipxe.org>

7 months ago[efi] Raise TPL within EFI_SIMPLE_NETWORK_PROTOCOL entry points
Michael Brown [Tue, 20 Feb 2018 11:08:25 +0000 (11:08 +0000)] 
[efi] Raise TPL within EFI_SIMPLE_NETWORK_PROTOCOL entry points

Signed-off-by: Michael Brown <mcb30@ipxe.org>

7 months ago[efi] Run at TPL_CALLBACK to protect against UEFI timers
Michael Brown [Tue, 20 Feb 2018 10:56:31 +0000 (10:56 +0000)] 
[efi] Run at TPL_CALLBACK to protect against UEFI timers

As noted in the comments, UEFI manages to combines the all of the
worst aspects of both a polling design (inefficiency and inability to
sleep until something interesting happens) and of an interrupt-driven
design (the complexity of code that could be preempted at any time,
thanks to UEFI timers).

This causes problems in particular for UEFI USB keyboards: the
keyboard driver calls UsbAsyncInterruptTransfer() to set up a periodic
timer which is used to poll the USB bus.  This poll may interrupt a
critical section within iPXE, typically resulting in list corruption
and either a hang or reboot.

Work around this problem by mirroring the BIOS design, in which we run
with interrupts disabled almost all of the time.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

7 months ago[xhci] Consume event TRB before reporting completion to USB core
Michael Brown [Mon, 19 Feb 2018 18:59:45 +0000 (18:59 +0000)] 
[xhci] Consume event TRB before reporting completion to USB core

Reporting a completion via usb_complete() will pass control outside
the scope of xhci.c, and could potentially result in a further call to
xhci_event_poll() before returning from usb_complete().  Since we
currently update the event consumer counter only after calling
usb_complete(), this can result in duplicate completions and
consequent corruption of the submission TRB ring structures.

Fix by updating the event ring consumer counter before passing control
to usb_complete().

Reported-by: Andreas Hammarskjöld <junior@2PintSoftware.com>
Tested-by: Andreas Hammarskjöld <junior@2PintSoftware.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

7 months ago[http] Allow for domain names within NTLM user names
Michael Brown [Mon, 19 Feb 2018 11:58:28 +0000 (11:58 +0000)] 
[http] Allow for domain names within NTLM user names

Allow a NetBIOS domain name to be specified within a URL using a
syntax such as:

  http://domain%5Cusername:password@server/path

Signed-off-by: Michael Brown <mcb30@ipxe.org>

8 months ago[intel] Work around broken reset mechanism in i219 devices
Michael Brown [Sat, 3 Feb 2018 19:21:54 +0000 (19:21 +0000)] 
[intel] Work around broken reset mechanism in i219 devices

The i219 appears to have a seriously broken reset mechanism.  After
any transmit or receive activity, resetting the card will break both
the transmit and receive datapaths until the next PCI bus reset.

The Linux and BSD drivers include a convoluted workaround authored by
Intel which involves setting a bit in the undocumented FEXTNVM11
register, then transmitting a dummy 512-byte packet containing garbage
data, then reconfiguring the receive descriptor prefetch thresholds
and temporarily reenabling the receive datapath.  The comments in the
Intel fix do not even remotely match what the code actually does, and
the code accidentally leaves the transmitter enabled after use.

Experimentation suggests that an equivalent fix is to simply set the
undocumented bit in FEXTNVM11 before enabling the transmit or receive
descriptor rings.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

8 months ago[xhci] Assume an invalid PSI table if any invalid PSI value is observed
Michael Brown [Mon, 29 Jan 2018 21:25:11 +0000 (21:25 +0000)] 
[xhci] Assume an invalid PSI table if any invalid PSI value is observed

Invalid protocol speed ID tables appear to be increasingly common in
the wild, to the point that it is infeasible to apply an explicit
XHCI_BAD_PSIV flag for each offending PCI device ID.

Fix by assuming an invalid PSI table as soon as any invalid value is
reported by the hardware.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

8 months ago[ena] Fix spurious uninitialised variable warning on older versions of gcc
Michael Brown [Wed, 17 Jan 2018 14:09:56 +0000 (14:09 +0000)] 
[ena] Fix spurious uninitialised variable warning on older versions of gcc

Some older versions of gcc (observed with gcc 4.7.2) report a spurious
uninitialised variable warning in ena_get_device_attributes().  Work
around this warning by manually inlining the relevant code (which has
only a single call site).

Reported-by: xbgmsharp <xbgmsharp@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

9 months ago[netdevice] Make netdev_irq_enabled() independent of netdev_irq_supported()
Martin Habets [Wed, 10 Jan 2018 15:32:34 +0000 (15:32 +0000)] 
[netdevice] Make netdev_irq_enabled() independent of netdev_irq_supported()

The UNDI layer uses the NETDEV_IRQ_ENABLED flag to choose whether to
return PXENV_UNDI_ISR_OUT_OURS or PXENV_UNDI_ISR_OUT_NOT_OURS for a
given interrupt.  For a network device that does not support
interrupts, the flag will never be set and so pxenv_undi_isr() will
always return PXENV_UNDI_ISR_OUT_NOT_OURS.  This causes some NBPs
(such as lpxelinux.0) to hang.

Redefine NETDEV_IRQ_ENABLED as a simple administrative flag which can
be set even on network devices that do not support interrupts.  This
allows pxenv_undi_isr() (which is the sole user of NETDEV_IRQ_ENABLED)
to function as expected by lpxelinux.0.

Signed-off-by: Martin Habets <mhabets@solarflare.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

9 months ago[tg3] Add support for SerDes PHY initialization
Joseph Wong [Sun, 14 Jan 2018 21:26:36 +0000 (21:26 +0000)] 
[tg3] Add support for SerDes PHY initialization

Signed-off-by: Michael Brown <mcb30@ipxe.org>

9 months ago[skel] Remove MII interface
Michael Brown [Sun, 14 Jan 2018 21:16:36 +0000 (21:16 +0000)] 
[skel] Remove MII interface

Most drivers do not utilise an MII interface, since the link state is
typically available directly from a memory-mapped register.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

9 months ago[ena] Add driver for Amazon ENA virtual function NIC
Michael Brown [Mon, 8 Jan 2018 13:21:40 +0000 (13:21 +0000)] 
[ena] Add driver for Amazon ENA virtual function NIC

Signed-off-by: Michael Brown <mcb30@ipxe.org>

9 months ago[build] Avoid use of "ld --oformat binary"
Michael Brown [Tue, 2 Jan 2018 20:26:40 +0000 (21:26 +0100)] 
[build] Avoid use of "ld --oformat binary"

Using "ld --oformat binary" for mbr.bin and usbdisk.bin seems to cause
segmentation faults on some versions of binutils (observed on Fedora
27).  Work around this problem by using ld to create an intermediate
ELF object, followed by objcopy (via the existing %.tmp -> %.bin rule)
to create the final binary.

Note that we cannot simply use a single-stage "objcopy -O binary"
since this will not process the relocation records for x86_64: see
commit 1afcccd ("[build] Do not use "objcopy -O binary" for objects
with relocation records").

Reported-by: Brent S <bts@square-r00t.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

9 months ago[legal] Add missing FILE_LICENCE declarations
Michael Brown [Fri, 29 Dec 2017 11:57:00 +0000 (11:57 +0000)] 
[legal] Add missing FILE_LICENCE declarations

Add missing FILE_LICENCE declarations to x86_64 headers based on the
corresponding i386 headers (from which the x86_64 headers were
originally derived).

Signed-off-by: Michael Brown <mcb30@ipxe.org>

9 months ago[legal] Add missing FILE_LICENCE declarations
Michael Brown [Fri, 29 Dec 2017 11:53:46 +0000 (11:53 +0000)] 
[legal] Add missing FILE_LICENCE declarations

Add missing FILE_LICENCE declarations to EFI headers based on the
corresponding source file.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

9 months ago[image] Omit URI query string and fragment from download progress messages
Michael Brown [Thu, 28 Dec 2017 13:38:50 +0000 (13:38 +0000)] 
[image] Omit URI query string and fragment from download progress messages

The URIs printed as part of download progress messages are intended to
provide a quick visual progress indication to the user.  Very long
query strings can render this visual indication useless in practice,
since the most important information (generally the URI host and path)
is drowned out by multiple lines of human-illegible URI-encoded data.

Omit the query string entirely from the download progress message.
For consistency and brevity, also omit the URI fragment along with the
username and password (which was previously redacted anyway).

Signed-off-by: Michael Brown <mcb30@ipxe.org>

9 months ago[http] Report unsuccessful response status lines at DBGVL_LOG
Michael Brown [Thu, 28 Dec 2017 13:04:59 +0000 (13:04 +0000)] 
[http] Report unsuccessful response status lines at DBGVL_LOG

The precise HTTP response status code is currently visible only at
DBGLVL_EXTRA.  Allow for easier debugging by reporting the whole
status line at DBGLVL_LOG for any unsuccessful responses.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

9 months ago[http] Include error messages for 4xx and 5xx response codes
Michael Brown [Thu, 28 Dec 2017 12:34:07 +0000 (12:34 +0000)] 
[http] Include error messages for 4xx and 5xx response codes

Signed-off-by: Michael Brown <mcb30@ipxe.org>

9 months ago[xen] Skip probing of any unsupported device types
Michael Brown [Thu, 28 Dec 2017 12:09:27 +0000 (12:09 +0000)] 
[xen] Skip probing of any unsupported device types

Xen 4.4 includes the device "device/suspend/event-channel" which does
not have a "backend" key.  This currently causes the entire XenBus
device tree probe to fail.

Fix by skipping probe attempts for device types for which there is no
iPXE driver.

Debugged-by: Eytan Heidingsfeld <eytanh@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

9 months ago[intel] Add PCI device ID for X550-T2
Janos Mattyasovszky [Wed, 20 Dec 2017 12:20:43 +0000 (12:20 +0000)] 
[intel] Add PCI device ID for X550-T2

Signed-off-by: Michael Brown <mcb30@ipxe.org>

11 months ago[http] Add support for NTLM authentication
Michael Brown [Sat, 11 Nov 2017 22:43:03 +0000 (22:43 +0000)] 
[http] Add support for NTLM authentication

Signed-off-by: Michael Brown <mcb30@ipxe.org>

11 months ago[http] Handle parsing of WWW-Authenticate header within authentication scheme
Michael Brown [Sat, 11 Nov 2017 22:05:53 +0000 (22:05 +0000)] 
[http] Handle parsing of WWW-Authenticate header within authentication scheme

Allow individual authentication schemes to parse WWW-Authenticate
headers that do not comply with RFC2617.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

11 months ago[http] Gracefully handle offers of multiple authentication schemes
Michael Brown [Tue, 7 Nov 2017 11:33:13 +0000 (11:33 +0000)] 
[http] Gracefully handle offers of multiple authentication schemes

Servers may provide multiple WWW-Authenticate headers, each offering a
different authentication scheme.  We currently fail the request as
soon as we encounter an unrecognised scheme, which prevents subsequent
offers from succeeding.

Fix by silently ignoring headers for schemes that we do not recognise.
If no schemes are recognised then the request will eventually fail
anyway due to the 401 response code.

If multiple schemes are supported, arbitrarily choose the scheme
appearing first within the response headers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

11 months ago[ntlm] Add support for NTLM authentication mechanism
Michael Brown [Wed, 8 Nov 2017 19:08:54 +0000 (19:08 +0000)] 
[ntlm] Add support for NTLM authentication mechanism

Signed-off-by: Michael Brown <mcb30@ipxe.org>

11 months ago[crypto] Add MD4 message digest algorithm
Michael Brown [Tue, 7 Nov 2017 23:20:10 +0000 (23:20 +0000)] 
[crypto] Add MD4 message digest algorithm

Signed-off-by: Michael Brown <mcb30@ipxe.org>

11 months ago[crypto] Eliminate repetitions in MD5 round constant table
Michael Brown [Sun, 12 Nov 2017 18:30:08 +0000 (18:30 +0000)] 
[crypto] Eliminate repetitions in MD5 round constant table

Signed-off-by: Michael Brown <mcb30@ipxe.org>

11 months ago[crypto] Fix endianness typo in comment
Michael Brown [Sat, 11 Nov 2017 23:44:50 +0000 (23:44 +0000)] 
[crypto] Fix endianness typo in comment

Signed-off-by: Michael Brown <mcb30@ipxe.org>

12 months ago[efi] Allow for building with older versions of elf.h system header
Michael Brown [Sun, 24 Sep 2017 18:26:58 +0000 (19:26 +0100)] 
[efi] Allow for building with older versions of elf.h system header

Signed-off-by: Michael Brown <mcb30@ipxe.org>

12 months ago[efi] Accept (and ignore) R_ARM_V4BX relocations
Heinrich Schuchardt [Sun, 10 Sep 2017 15:12:16 +0000 (17:12 +0200)] 
[efi] Accept (and ignore) R_ARM_V4BX relocations

Relocation type R_ARM_V4BX requires no computation.  It marks the
location of an ARMv4 branch exchange instruction.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

12 months ago[crypto] Fail fast if cross-certificate source is empty
Ladi Prosek [Wed, 20 Sep 2017 09:52:16 +0000 (11:52 +0200)] 
[crypto] Fail fast if cross-certificate source is empty

In fully self-contained deployments it may be desirable to build iPXE
with an empty CROSSCERT source to avoid talking to external services.

Add an explicit check for this case and make validator_start_download
fail immediately if the base URI is empty.

Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

12 months ago[efi] Inhibit our driver Start() method during disconnection attempts
Michael Brown [Fri, 22 Sep 2017 13:02:40 +0000 (14:02 +0100)] 
[efi] Inhibit our driver Start() method during disconnection attempts

Some HP BIOSes (observed with a Z840) seem to attempt to connect our
drivers in the middle of our call to DisconnectController().  The
precise chain of events is unclear, but the symptom is that we see
several calls to our Supported() and Start() methods, followed by a
system lock-up.

Work around this dubious BIOS behaviour by explicitly failing calls to
our Start() method while we are in the middle of attempting to
disconnect drivers.

Reported-by: Jordan Wright <jordan.m.wright@disney.com>
Debugged-by: Adrian Lucrèce Céleste <adrianlucrececeleste@airmail.cc>
Debugged-by: Christian Nilsson <nikize@gmail.com>
Tested-by: Jordan Wright <jordan.m.wright@disney.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

12 months ago[build] Exclude selected directories from Secure Boot builds
Michael Brown [Mon, 18 Sep 2017 12:32:39 +0000 (13:32 +0100)] 
[build] Exclude selected directories from Secure Boot builds

When submitting binaries for UEFI Secure Boot signing, certain
known-dubious subsystems (such as 802.11 and NFS) must be excluded
from the build.  Mark the directories containing these subsystems as
insecure, and allow the build target to include an explicit "security
flag" (a literal "-sb" appended to the build platform) to exclude
these source directories from the build process.

For example:

  make bin-x86_64-efi-sb/ipxe.efi

will build iPXE with all code from the 802.11 and NFS subsystems
excluded from the build.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

13 months ago[efi] Continue to connect remaining handles after connection errors
Michael Brown [Wed, 13 Sep 2017 07:07:55 +0000 (10:07 +0300)] 
[efi] Continue to connect remaining handles after connection errors

Some UEFI BIOSes will deliberately break the implementation of
ConnectController() to return errors for devices that have been
"disabled" via the BIOS setup screen.  (As an added bonus, such BIOSes
may return garbage EFI_STATUS values such as 0xff.)

Work around these broken UEFI BIOSes by ignoring failures and
continuing to attempt to connect any remaining handles.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

13 months ago[exanic] Add PCI device ID for another X40 variant
Peter von Konigsmark [Thu, 7 Sep 2017 11:37:09 +0000 (12:37 +0100)] 
[exanic] Add PCI device ID for another X40 variant

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

13 months ago[exanic] Power up optical PHYs (if present)
Peter von Konigsmark [Tue, 5 Sep 2017 23:06:42 +0000 (00:06 +0100)] 
[exanic] Power up optical PHYs (if present)

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

13 months ago[dns] Ensure DNS names are NUL-terminated when used as diagnostic strings
Michael Brown [Thu, 7 Sep 2017 11:17:18 +0000 (12:17 +0100)] 
[dns] Ensure DNS names are NUL-terminated when used as diagnostic strings

Signed-off-by: Michael Brown <mcb30@ipxe.org>

13 months ago[efi] Match behaviour of SnpDxe for truncated received packets
Michael Brown [Wed, 6 Sep 2017 22:56:22 +0000 (23:56 +0100)] 
[efi] Match behaviour of SnpDxe for truncated received packets

The UEFI specification does not state whether or not a return value of
EFI_BUFFER_TOO_SMALL from the SNP Receive() method should follow the
usual EFI API behaviour of allowing the caller to retry the request
with an increased buffer size.

Examination of the SnpDxe driver in EDK2 suggests that Receive() will
just return the truncated packet (complete with any requested
link-layer header fields), so match this behaviour.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

13 months ago[efi] Check buffer length for packets retrieved via our SNP protocol
Michael Brown [Wed, 6 Sep 2017 22:18:29 +0000 (23:18 +0100)] 
[efi] Check buffer length for packets retrieved via our SNP protocol

We do not currently check the length of the caller's buffer for
received packets.  This creates a potential buffer overrun when iPXE
is being used via the SNP or UNDI protocols.

Fix by checking the buffer length and correctly returning the required
length and an EFI_BUFFER_TOO_SMALL error.

Reported-by: Paul McMillan <paul.mcmillan@oracle.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

13 months ago[dns] Report current DNS query as job progress status message
Michael Brown [Wed, 6 Sep 2017 10:46:13 +0000 (11:46 +0100)] 
[dns] Report current DNS query as job progress status message

Signed-off-by: Michael Brown <mcb30@ipxe.org>

13 months ago[resolv] Use pass-through interfaces for name resolution multiplexer
Michael Brown [Wed, 6 Sep 2017 10:43:22 +0000 (11:43 +0100)] 
[resolv] Use pass-through interfaces for name resolution multiplexer

Signed-off-by: Michael Brown <mcb30@ipxe.org>

13 months ago[netdevice] Add "hwaddr" setting
Michael Brown [Wed, 6 Sep 2017 09:49:22 +0000 (10:49 +0100)] 
[netdevice] Add "hwaddr" setting

Expose the underlying hardware address as a setting.  For IPoIB
devices, this provides scripts with access to the Infiniband GUID.

Requested-by: Allen, Benjamin S. <bsallen@alcf.anl.gov>
Signed-off-by: Michael Brown <mcb30@ipxe.org>

13 months ago[peerdist] Gather and report peer statistics during download
Michael Brown [Tue, 5 Sep 2017 21:55:05 +0000 (22:55 +0100)] 
[peerdist] Gather and report peer statistics during download

Record and report the number of peers (calculated as the maximum
number of peers discovered for a block's segment at the time that the
block download is complete), and the percentage of blocks retrieved
from peers rather than from the origin server.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

13 months ago[monojob] Display job status message, if present
Michael Brown [Tue, 5 Sep 2017 21:53:10 +0000 (22:53 +0100)] 
[monojob] Display job status message, if present

Signed-off-by: Michael Brown <mcb30@ipxe.org>

13 months ago[downloader] Allow underlying downloads to provide detailed job progress
Michael Brown [Tue, 5 Sep 2017 21:53:49 +0000 (22:53 +0100)] 
[downloader] Allow underlying downloads to provide detailed job progress

Signed-off-by: Michael Brown <mcb30@ipxe.org>

13 months ago[job] Allow jobs to report an arbitrary status message
Michael Brown [Tue, 5 Sep 2017 21:52:35 +0000 (22:52 +0100)] 
[job] Allow jobs to report an arbitrary status message

Signed-off-by: Michael Brown <mcb30@ipxe.org>

13 months ago[monojob] Check for job progress only once per timer tick
Michael Brown [Tue, 5 Sep 2017 22:21:34 +0000 (23:21 +0100)] 
[monojob] Check for job progress only once per timer tick

Checking for job progress is essentially a user interface activity,
and can safely be performed only once per timer tick (as is already
done with checking for keypresses).

Signed-off-by: Michael Brown <mcb30@ipxe.org>

13 months ago[netdevice] Cancel all pending transmissions on any transmit error
Michael Brown [Tue, 5 Sep 2017 11:21:11 +0000 (12:21 +0100)] 
[netdevice] Cancel all pending transmissions on any transmit error

Some external code (such as the UEFI UNDI driver for the Realtek USB
NIC on a Microsoft Surface Book) will block during transmission
attempts and can take several seconds to report a transmit error.  If
there is a large queue of pending transmissions, then the accumulated
time from a series of such failures can easily exceed the EFI watchdog
timeout, resulting in what appears to be a system lockup followed by a
reboot.

Work around this problem by immediately cancelling any pending
transmissions as soon as any transmit error occurs.

The only expected transmit error under normal operation is ENOBUFS
arising when the hardware transmit queue is full.  By definition, this
can happen only for drivers that do not utilise deferred
transmissions, and so this new behaviour will not affect these
drivers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>

13 months ago[efi] Raise TPL when calling UNDI entry point
Michael Brown [Tue, 5 Sep 2017 09:48:41 +0000 (10:48 +0100)] 
[efi] Raise TPL when calling UNDI entry point

The SnpDxe driver raises the task priority level to TPL_CALLBACK when
calling the UNDI entry point.  This does not appear to be a documented
requirement, but we should probably match the behaviour of SnpDxe to
minimise surprises to third party code.

Signed-off-by: Michael Brown <mcb30@ipxe.org>