lp:ipxe

Created by Peter J. Mello on 2020-01-06 and last modified on 2020-07-06
Get this branch:
bzr branch lp:ipxe

Related bugs

Related blueprints

Branch information

Owner:
Peter J. Mello
Project:
iPXE
Status:
Development

Import details

Import Status: Reviewed

This branch is an import of the HEAD branch of the Git repository at https://github.com/ipxe/ipxe.git.

The next import is scheduled to run in 5 hours.

Last successful import was 2 minutes ago.

Import started 3 minutes ago on alnitak and finished 2 minutes ago taking 20 seconds — see the log
Import started 6 hours ago on alnitak and finished 6 hours ago taking 30 seconds — see the log
Import started 12 hours ago on alnitak and finished 12 hours ago taking 20 seconds — see the log
Import started 20 hours ago on alnitak and finished 20 hours ago taking 20 seconds — see the log
Import started on 2020-07-06 on izar and finished on 2020-07-06 taking 20 seconds — see the log
Import started on 2020-07-05 on alnitak and finished on 2020-07-05 taking 20 seconds — see the log
Import started on 2020-07-05 on alnitak and finished on 2020-07-05 taking 20 seconds — see the log
Import started on 2020-07-05 on izar and finished on 2020-07-05 taking 20 seconds — see the log
Import started on 2020-07-05 on alnitak and finished on 2020-07-05 taking 25 seconds — see the log
Import started on 2020-07-04 on alnitak and finished on 2020-07-04 taking 20 seconds — see the log

Recent revisions

5684. By Michael Brown <email address hidden> 7 hours ago

[crypto] Avoid temporarily setting direction flag in bigint_is_geq()

The UEFI specification states that the calling convention for IA-32
and x64 includes "Direction flag in EFLAGS is clear". This
specification covers only the calling convention used at the point of
calling functions annotated with EFIAPI. The specification explicitly
states that other functions (such as private functions or static
library calls) are not required to follow the UEFI calling
conventions.

The reference EDK2 implementation follows this specification. In
particular, the EDK2 interrupt handlers will clear the direction flag
before calling any EFIAPI functions, and will restore the direction
flag when returning from the interrupt handler. Some EDK2 private
library functions (most notably InternalMemCopyMem) may set the
direction flag temporarily in order to make efficient use of CPU
string operations.

The current implementation of iPXE's bigint_is_geq() for i386 and
x86_64 will similarly set the direction flag temporarily in order to
make efficient use of CPU string operations.

On some UEFI implementations (observed with a Getac RX10 tablet), a
timer interrupt that happens to occur while the direction flag is set
will reboot the machine. This very strongly indicates that the UEFI
timer interrupt handler is failing to clear the direction flag before
performing an affected operation (such as copying a block of memory).

Work around such buggy UEFI implementations by rewriting
bigint_is_geq() to avoid the use of string operations and so obviate
the requirement to temporarily set the direction flag.

Signed-off-by: Michael Brown <email address hidden>

5683. By Michael Brown <email address hidden> on 2020-07-04

[usb] Leave port enabled after a failed device registration

A failure in device registration (e.g. due to a device with malformed
descriptors) will currently result in the port being disabled as part
of the error path. This in turn causes the hardware to detect the
device as newly connected, leading to an endless loop of failed device
registrations.

Fix by leaving the port enabled in the case of a registration failure.

Signed-off-by: Michael Brown <email address hidden>

5682. By Michael Brown <email address hidden> on 2020-07-03

[axge] Reapply USB device configuration when opening network device

When connected to a USB3 port, the AX88179 seems to have an
approximately 50% chance of producing a USB transaction error on each
of its three endpoints after being closed and reopened. The root
cause is unclear, but rewriting the USB device configuration value
seems to clear whatever internal error state has accumulated.

Signed-off-by: Michael Brown <email address hidden>

5681. By Michael Brown <email address hidden> on 2020-07-03

[xhci] Increase link state settling delay to 100ms

Experimentation shows that the existing 20ms delay is insufficient,
and often results in device detection being deferred until after iPXE
has completed startup.

Fix by increasing the delay to 100ms.

Signed-off-by: Michael Brown <email address hidden>

5680. By Michael Brown <email address hidden> on 2020-07-03

[usb] Avoid unnecessary calls to usb_hub_set_drvdata()

The driver-private data for root hubs is already set immediately after
allocating the USB bus. There seems to be no reason to set it again
when opening the root hub.

Signed-off-by: Michael Brown <email address hidden>

5679. By Michael Brown <email address hidden> on 2020-07-03

[xhci] Set link state to RxDetect after disabling USB3 root hub port

The "disabled" port states for USB2 and USB3 are not directly
equivalent. In particular, a disabled USB3 port will not detect new
device connections. The result is that a USB3 device disconnected
from and reconnected to an xHCI root hub port will end up reconnecting
as a USB2 device.

Fix by setting the link state to RxDetect after disabling the port, as
is already done during initialisation.

Signed-off-by: Michael Brown <email address hidden>

5678. By Michael Brown <email address hidden> on 2020-07-02

[usb] Do not attempt to disable USB3 hub ports

The USB3 specification removes PORT_ENABLE from the list of features
that may be cleared via a CLEAR_FEATURE request. Experimentation
shows that omitting the attempt to clear PORT_ENABLE seems to result
in the correct hotplug behaviour.

Signed-off-by: Michael Brown <email address hidden>

5677. By Michael Brown <email address hidden> on 2020-07-02

[usb] Add missing usb_recycle() for completed hub interrupt transfers

Signed-off-by: Michael Brown <email address hidden>

5676. By Michael Brown <email address hidden> on 2020-07-02

[usb] Clear device endpoint halt before resetting host endpoint

Resetting the host endpoint may immediately restart any pending
transfers for that endpoint. If the device endpoint halt has not yet
been cleared, then this will probably result in a second failed
transfer.

This second failure may be detected within usb_endpoint_reset() while
waiting for usb_clear_feature() to complete. The endpoint will
subsequently be removed from the list of halted endpoints, causing the
second failure to be effectively ignored and leaving the host endpoint
in a permanently halted state.

Fix by deferring the host endpoint reset until after the device
endpoint is ready to accept new transfers.

Signed-off-by: Michael Brown <email address hidden>

5675. By Michael Brown <email address hidden> on 2020-07-01

[axge] Handle non-gigabit link speeds

The ASIX USB NICs are capable of autodetecting the Ethernet link speed
and reporting it via PLSR but will not automatically update the
relevant GM and PS bits in MSR. The result is that a non-gigabit link
will fail to send or receive any packets.

The interrupt endpoint used to report link state includes the values
of the PHY BMSR and LPA registers. These are not sufficient to
differentiate between 100Mbps and 1000Mbps, since the LPA_NPAGE bit
does not necessarily indicate that the link partner is advertising
1000Mbps.

Extend axge_check_link() to write the MSR value based on the link
speed read from PLSR, and simplify the interrupt endpoint handler to
merely trigger a call to axge_check_link().

Signed-off-by: Michael Brown <email address hidden>

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers