Upstream
  1. Upstream

ipxe

Public
AuthorCommitMessageCommit dateIssues
Michael BrownMichael Brown
e7f67d5a4c6[http] Work around stateful authentication schemesAs 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 con...
Sylvie BarlowMichael BrownSylvie Barlow
960d1e36b09[icplus] Add driver for IC+ network cardSigned-off-by: Sylvie Barlow <sylvie.c.barlow@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Sylvie BarlowMichael BrownSylvie Barlow
c239f0bff24[mii] Add bit-bashing interfaceSigned-off-by: Sylvie Barlow <sylvie.c.barlow@gmail.com> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Sylvie BarlowMichael BrownSylvie Barlow
7ed1dc98c32[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>
Michael BrownMichael Brown
6047b7ca7a8[mii] Fix typo in parameter nameSigned-off-by: Michael Brown <mcb30@ipxe.org>
Michael BrownMichael Brown
e901e6b73b6[tcp] Add missing packed attribute on struct tcp_headerDebugged-by: Mark Rutland <mark.rutland@arm.com> Debugged-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Michael BrownMichael Brown
6804a8c89b8[mii] Separate concepts of MII interface and MII deviceWe 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 MI...
Michael BrownMichael Brown
285e3e52873[velocity] Fix usage of mii_read() and mii_write()Signed-off-by: Michael Brown <mcb30@ipxe.org>
Michael BrownMichael Brown
f71ba143c72[rhine] Fix usage of mii_read()Signed-off-by: Michael Brown <mcb30@ipxe.org>
Michael BrownMichael Brown
d6f02c72c98[undi] Include subsystem IDs in broken interrupt device checkAllow 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>
Rob TaglangMichael BrownRob Taglang
2eef77ecc0b[intelx] Add PCI_ROM entry for Intel X553 NICModified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Heinrich SchuchardtMichael BrownHeinrich Schuchardt
8c17ee115d1[efi] Add support for R_ARM_REL32 relocationsThe 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>
Michael BrownMichael Brown
4f362a032b2[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...
Michael BrownMichael Brown
331ac451e7b[efi] Release SNP devices before starting SAN boot imageRelease 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>
Michael BrownMichael Brown
baaf50017d1[tls] Ensure that window change is propagated to plainstream interfaceThe 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 win...
Michael BrownMichael Brown
4152aff1030[tls] Rename tls_session to tls_connectionIn 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. Sig...
Michael BrownMichael Brown
6be010d9199[list] Add list_is_first_entry() and list_is_last_entry()Signed-off-by: Michael Brown <mcb30@ipxe.org>
Michael BrownMichael Brown
ac4fbd47aea[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>
Robin SmidsrødMichael BrownRobin Smidsrød
eda9f4db612[util] Support reversed sort ordering when generating NIC listSigned-off-by: Michael Brown <mcb30@ipxe.org>
Michael BrownMichael Brown
bc85368cdd3[librm] Ensure that inline code symbols are uniqueCommit 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 ther...
Michael BrownMichael Brown
6149e0af3ca[librm] Provide symbols for inline code placed into other sectionsProvide 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 str...
Michael BrownMichael Brown
0600ffeb305[undi] Treat invalid IRQ numbers as non-fatal errorsIf 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>
Michael BrownMichael Brown
1df3b53051e[build] Prevent use of MMX and SSE registersThe 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 th...
Michael BrownMichael Brown
0d35411f88d[rng] Use fixed-point calculations for min-entropy quantitiesWe 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 ...
Ameer MahagnehMichael BrownAmeer Mahagneh
d5d4bf8870c[golan] Set log_max_qp to 1This 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>
Michael BrownMichael Brown
3ec2079ce20[time] Add support for the ACPI power management timerAllow 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>
Michael BrownMichael Brown
e8e9ca36130[efi] Provide Map_Mem() and associated UNDI callbacksSome 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...
Michael BrownMichael Brown
342ff967cc1[lacp] Check the partner's own state when checking for blocked linksThe 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>
Michael BrownMichael Brown
9759860ec0c[ocsp] Allow OCSP checks to be disabledSome 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>
Michael BrownMichael Brown
a0021a30dd8[ocsp] Centralise test for whether or not an OCSP check is requiredSigned-off-by: Michael Brown <mcb30@ipxe.org>
Michael BrownMichael Brown
ae930644962[profile] Prevent potential division by zeroLimit 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>
Michael BrownMichael Brown
b11ae1d91b3[tftp] Prevent potential division by zeroSigned-off-by: Michael Brown <mcb30@ipxe.org>
Michael BrownMichael Brown
c160c9dfc0d[lacp] Fix debug message to match documentationSigned-off-by: Michael Brown <mcb30@ipxe.org>
Michael BrownMichael Brown
33d79d5d2b6[lacp] Mark link as blocked if partner is not yet up and runningMark 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: Mi...
Michael BrownMichael Brown
0778418e29e[golan] Do not assume all devices are identicalRemove 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>
Michael BrownMichael Brown
89e31f84918[librm] Add facility to provide register and stack dump for CPU exceptionsWhen 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 t...
Rob TaglangMichael BrownRob Taglang
0c43bb934ab[intel] Add PCI_ROM entry for Intel i354 NICModified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Michael BrownMichael Brown
10d083ffa93[efi] Raise TPL within EFI_DRIVER_BINDING_PROTOCOL entry pointsDebugged-by: Rob Taglang <rob@privatemachines.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Michael BrownMichael Brown
d8c500b7945[efi] Drop to TPL_APPLICATION when gathering entropyCommit 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...
Hannes ReineckeMichael BrownHannes Reinecke
c84f9d67272[iscsi] Parse IPv6 address in root pathThe 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>
Michael BrownMichael Brown
47849be3a90[process] Include process name in debug messagesSigned-off-by: Michael Brown <mcb30@ipxe.org>
Michael BrownMichael Brown
f672a27b342[efi] Raise TPL within EFI_USB_IO_PROTOCOL entry pointsSigned-off-by: Michael Brown <mcb30@ipxe.org>
Michael BrownMichael Brown
a272b7ce578[efi] Raise TPL within EFI_SIMPLE_NETWORK_PROTOCOL entry pointsSigned-off-by: Michael Brown <mcb30@ipxe.org>
Michael BrownMichael Brown
c89a446cf09[efi] Run at TPL_CALLBACK to protect against UEFI timersAs 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 UsbAsyncInter...
Michael BrownMichael Brown
8dbb73a779e[xhci] Consume event TRB before reporting completion to USB coreReporting 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...
Michael BrownMichael Brown
6737a8795f2[http] Allow for domain names within NTLM user namesAllow 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>
Michael BrownMichael Brown
546dd51de84[intel] Work around broken reset mechanism in i219 devicesThe 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 contain...
Michael BrownMichael Brown
c900751fa65[xhci] Assume an invalid PSI table if any invalid PSI value is observedInvalid 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>
Michael BrownMichael Brown
fbe8c52d0d9[ena] Fix spurious uninitialised variable warning on older versions of gccSome 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>
Martin HabetsMichael BrownMartin Habets
70189a8e470[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 ...