summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [smsc75xx] Move RX FIFO overflow message to DBGLVL_EXTRAMichael Brown2015-03-121-1/+2
| | | | | | | | | | | | | | RX FIFO overflow is almost inevitable since the (usable) USB2 bus bandwidth is approximately one quarter of the Ethernet bandwidth. Avoid flooding the console with RX FIFO overflow messages in a standard debug build. With TCP SACK implemented, the RX FIFO overflow no longer causes a catastrophic drop in throughput. Experimentation shows that HTTP downloads now progress at a fairly smooth 250Mbps, which is around the maximum speed attainable for a USB2 NIC. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tcp] Implement support for TCP Selective Acknowledgements (SACK)Michael Brown2015-03-122-4/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TCP Selective Acknowledgement option (specified in RFC2018) provides a mechanism for the receiver to indicate packets that have been received out of order (e.g. due to earlier dropped packets). iPXE often operates in environments in which there is a high probability of packet loss. For example, the legacy USB keyboard emulation in some BIOSes involves polling the USB bus from within a system management interrupt: this introduces an invisible delay of around 500us which is long enough for around 40 full-length packets to be dropped. Similarly, almost all 1Gbps USB2 devices will eventually end up dropping packets because the USB2 bus does not provide enough bandwidth to sustain a 1Gbps stream, and most devices will not provide enough internal buffering to hold a full TCP window's worth of received packets. Add support for sending TCP Selective Acknowledgements. This provides the sender with more detailed information about which packets have been lost, and so allows for a more efficient retransmission strategy. We include a SACK-permitted option in our SYN packet, since experimentation shows that at least Linux peers will not include a SACK-permitted option in the SYN-ACK packet if one was not present in the initial SYN. (RFC2018 does not seem to mandate this behaviour, but it is consistent with the approach taken in RFC1323.) We ignore any received SACK options; this is safe to do since SACK is only ever advisory and we never have to send non-trivial amounts of data. Since our TCP receive queue is a candidate for cache discarding under low memory conditions, we may end up discarding data that has been reported as received via a SACK option. This is permitted by RFC2018. We follow the stricture that SACK blocks must not report data which is no longer held by the receiver: previously-reported blocks are validated against the current receive queue before being included within the current SACK block list. Experiments in a qemu VM using forced packet drops (by setting NETDEV_DISCARD_RATE to 32) show that implementing SACK improves throughput by around 400%. Experiments with a USB2 NIC (an SMSC7500) show that implementing SACK improves throughput by around 700%, increasing the download rate from 35Mbps up to 250Mbps (which is approximately the usable bandwidth limit for USB2). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-117-3/+11
| | | | | | | | | Several of the assembly files in arch/i386/prefix were missed by the automated relicensing tool due to missing licence declarations, code dating back to the initial git revision, etc. Manual review shows that these files may be relicensed. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [smsc75xx] Add driver for SMSC/Microchip LAN75xx USB Ethernet NICsMichael Brown2015-03-113-0/+1366
| | | | | | | | | | | | | | | | | | | This driver is functional but any downloads via a TCP-based protocol tend to perform poorly. The 1Gbps Ethernet line rate is substantially higher than the 480Mbps (in practice around 280Mbps) provided by USB2, and the device has only 32kB of internal buffer memory. Our 256kB TCP receive window therefore rapidly overflows the RX FIFO, leading to multiple dropped packets (usually within the same TCP window) and hence a low overall throughput. Reducing the TCP window size so that the RX FIFO does not overflow greatly increases throughput, but is not a general-purpose solution. Further investigation is required to determine how other OSes (e.g. Linux) cope with this scenario. It is possible that implementing TCP SACK would provide some benefit. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [mii] Add generic mii_check_link() functionMichael Brown2015-03-102-0/+34
| | | | | | | | | | | | Most devices expose at least the link up/down status via a bit in a MAC register, since the MAC generally already needs to know whether or not the link is up. Some devices (e.g. the SMSC75xx USB NIC) expose this information to software only via the MII registers. Provide a generic mii_check_link() implementation to check the BMSR and report the link status via netdev_link_{up,down}(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Relicense Davicom DM96xx driversMichael Brown2015-03-102-2/+6
| | | | | Reported-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [dm96xx] Add driver for Davicom DM96xx USB Ethernet NICsMichael Brown2015-03-094-1/+865
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [intel] Add PCI ID for I218-LMThomas Miletich2015-03-091-0/+1
| | | | | Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [http] Support MD5-sess Digest authenticationMichael Brown2015-03-091-2/+42
| | | | | | | Microsoft IIS supports only MD5-sess for Digest authentication. Requested-by: Andreas Hammarskjöld <junior@2PintSoftware.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [http] Abstract out HTTP Digest hash algorithm operationsMichael Brown2015-03-091-28/+56
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [xen] Set the "feature-rx-notify" flag for netfront devicesMichael Brown2015-03-091-0/+8
| | | | | | | | | | | | iPXE already sends RX notifications to the backend when needed, but does not set the "feature-rx-notify" flag. As of XenServer 6.5, this flag is mandatory and omitting it will cause the backend to fail. Fix by setting the "feature-rx-notify" flag, to inform the backend that we will send notifications. Reported-by: Shalom Bhooshi <shalom.bhooshi@citrix.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [xhci] Undo PCH-specific quirk fixes when removing deviceMichael Brown2015-03-062-17/+51
| | | | | | | | Restore the original values of XUSB2PR and USB3PSSEN, in case we are booting an OS with no support for xHCI. Suggested-by: Dan Ellis <Dan.Ellis@displaylink.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [xhci] Enable USB3 ports on Intel PCH8/PCH9 controllersMichael Brown2015-03-062-0/+55
| | | | | | | | | | Intel PCH controllers default to routing USB2 ports to EHCI rather than xHCI, and default to disabling SuperSpeed connections. Manipulate the PCI configuration space registers as necessary to reroute ports and enable SuperSpeed. Originally-fixed-by: Dan Ellis <Dan.Ellis@displaylink.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-0515-15/+47
| | | | | | | | | | | Relicense files with kind permission from Stefan Hajnoczi <stefanha@redhat.com> alongside the contributors who have already granted such relicensing permission. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [retry] Colourise debug outputMichael Brown2015-03-051-10/+10
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [retry] Rewrite unrelicensable portions of retry.cMichael Brown2015-03-054-41/+72
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [linux] Rewrite headers included in all buildsMichael Brown2015-03-057-80/+73Star
| | | | | | | Rewrite (and relicense) the header files which are included in all builds of iPXE (including non-Linux builds). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [i386] Move real_to_user() to realmode.hMichael Brown2015-03-054-12/+14
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Fix the REQUIRE_SYMBOL mechanismMichael Brown2015-03-0537-43/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | At some point in the past few years, binutils became more aggressive at removing unused symbols. To function as a symbol requirement, a relocation record must now be in a section marked with @progbits and must not be in a section which gets discarded during the link (either via --gc-sections or via /DISCARD/). Update REQUIRE_SYMBOL() to generate relocation records meeting these criteria. To minimise the impact upon the final binary size, we use existing symbols (specified via the REQUIRING_SYMBOL() macro) as the relocation targets where possible. We use R_386_NONE or R_X86_64_NONE relocation types to prevent any actual unwanted relocation taking place. Where no suitable symbol exists for REQUIRING_SYMBOL() (such as in config.c), the macro PROVIDE_REQUIRING_SYMBOL() can be used to generate a one-byte-long symbol to act as the relocation target. If there are versions of binutils for which this approach fails, then the fallback will probably involve killing off REQUEST_SYMBOL(), redefining REQUIRE_SYMBOL() to use the current definition of REQUEST_SYMBOL(), and postprocessing the linked ELF file with something along the lines of "nm -u | wc -l" to check that there are no undefined symbols remaining. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Use REQUIRE_OBJECT() to drag in per-object configurationMichael Brown2015-03-0511-77/+21Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Remove obsolete and unused portions of config.cMichael Brown2015-03-044-55/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pxe] Remove obsolete references to pxeparent_dhcpMichael Brown2015-03-032-6/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Remove unused __keepme macroMichael Brown2015-03-031-8/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Remove unused IMPORT_SYMBOL() and EXPORT_SYMBOL() macrosMichael Brown2015-03-031-48/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [malloc] Rewrite unrelicensable portions of malloc.cMichael Brown2015-03-032-24/+43
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [malloc] Move valgrind headers out of arch/x86Michael Brown2015-03-032-0/+0
| | | | | | | The valgrind headers are not x86-specific; they detect the CPU architecture and contain inline assembly for multiple architectures. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Use generic jump scrolling abstractionMichael Brown2015-03-031-196/+155Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [menu] Abstract out the generic concept of a jump scrollerMichael Brown2015-03-033-65/+221
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Rewrite unrelicensable portions of settings.cMichael Brown2015-03-031-6/+13
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Use list_first_entry() when unregistering child settingsMichael Brown2015-03-031-2/+2
| | | | | | | | | Unregistering a child settings block can have almost arbitrary effects, due to the call to apply_settings(). Avoid potentially dereferencing a stale pointer by using list_first_entry() rather than list_for_each_entry_safe() to iterate over the list of child settings. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Rewrite unrelicensable portions of pci.hMichael Brown2015-03-0311-321/+124Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pci] Remove outdated and mostly-unused pci_ids.h fileMichael Brown2015-03-025-289/+57Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [iscsi] Rewrite unrelicensable portions of iscsi.cMichael Brown2015-03-021-36/+28Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [list] Relicense list.hMichael Brown2015-03-021-1/+1
| | | | | | | | | | | The code in list.h was originally taken from the Linux kernel many years ago, but has been rewritten to the point that no original code remains, and may therefore be relicensed. The functions and data structures remain largely API-compatible, to facilitate the conversion of Linux network drivers to iPXE. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [elf] Rewrite ELF headerMichael Brown2015-03-021-215/+62Star
| | | | | | | Rewrite the ELF header to include only the relevant portions from the ELF specification. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Rewrite byte-swapping codeMichael Brown2015-03-029-158/+160
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Rewrite setjmp() and longjmp()Michael Brown2015-03-022-49/+81
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Rewrite unrelicensable portions of ctype.hMichael Brown2015-03-022-20/+105
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Rewrite unrelicensable portions of stddef.hMichael Brown2015-03-021-11/+29
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-02106-114/+302
| | | | | | | | | | These files cannot be automatically relicensed by util/relicense.pl since they either contain unusual but trivial contributions (such as the addition of __nonnull function attributes), or contain lines dating back to the initial git revision (and so require manual knowledge of the code's origin). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-0226-26/+94
| | | | | | | | | | | | | | | Relicence files with kind permission from the following contributors: Alex Williamson <alex.williamson@redhat.com> Eduardo Habkost <ehabkost@redhat.com> Greg Jednaszewski <jednaszewski@gmail.com> H. Peter Anvin <hpa@zytor.com> Marin Hannache <git@mareo.fr> Robin Smidsrød <robin@smidsrod.no> Shao Miller <sha0.miller@gmail.com> Thomas Horsten <thomas@horsten.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-0215-15/+15
| | | | | | | Relicense files authored by Dan Lynch while working as an employee of Fen Systems Ltd., with permission from Fen Systems Ltd. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-02627-627/+1871
| | | | | | | Relicense files for which I am the sole author (as identified by util/relicense.pl). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Add UBDL relicensing toolMichael Brown2015-03-021-0/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | The UBDL relicensing tool (util/relicense.pl) is designed to identify files which may be relicensed under a dual GPL+UBDL licence. It uses git-blame to identify the author of each line (using the -M and -C options to track lines moved or copied between files), and relicenses files for which all authors have given permission. The relicensing tool will ignore certain types of lines identified by git-blame: - empty lines - comments - standalone opening or closing braces - "#include ..." - "return 0;" - "return rc;" - "PCI_ROM(...)" - "FILE_LICENCE(...)" These lines either contain no meaningful content (e.g. empty lines), contain only non-copyrightable facts (e.g. PCI ROM IDs) or are sufficiently common within the codebase that git-blame is likely to misattribute their origin (e.g. "return 0"). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Add support for the Unmodified Binary Distribution LicenceMichael Brown2015-03-023-0/+83
| | | | | | | | | | | | | | | Add the text for the Unmodified Binary Distribution Licence. This Licence allows for the distribution of unmodified binaries built from publicly available source code, without imposing the obligations of the GNU General Public License upon anyone who chooses to distribute only the unmodified binaries built from that source code. See the licence text for the precise terms and conditions. Add the licence GPL2_OR_LATER_OR_UBDL to the set of licences which can be declared using FILE_LICENCE(), and add the corresponding support to licence.pl. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [mucurses] Add missing FILE_LICENCE declarationsMichael Brown2015-03-026-0/+12
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Include full licence text for all GPL2_OR_LATER filesMichael Brown2015-02-2617-35/+205
| | | | | | | | Add the standard warranty disclaimer and Free Software Foundation address paragraphs to the licence text where these are not currently present. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Update GPLv2 licence textMichael Brown2015-02-263-348/+348
| | | | | | | | | | | | Update the GPLv2 licence text to the current version (with the current address of the Free Software Foundation, and without the Y2k compatibility issue). Rename the GPLv2 licence text to COPYING.GPLv2 (to hopefully make it clearer that the licence does not apply to all files within the source tree) and rename COPYRIGHTS to COPYING. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [zbin] Remove now-unused unnrv2b.S decompressorMichael Brown2015-02-262-193/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vbox] Enable some more features now that we have LZMA compressionRobin Smidsrød2015-02-261-8/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>