ipxe.git
7 years ago[efi] Add EFI time source
Michael Brown [Tue, 14 Apr 2015 10:55:08 +0000 (11:55 +0100)] 
[efi] Add EFI time source

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[efi] Add EFI entropy source
Michael Brown [Tue, 14 Apr 2015 09:56:20 +0000 (10:56 +0100)] 
[efi] Add EFI entropy source

Originally-implemented-by: Jarrod Johnson <jbjohnso@us.ibm.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[util] Add ability to dump PCI device ID list
Michael Brown [Mon, 13 Apr 2015 15:22:35 +0000 (16:22 +0100)] 
[util] Add ability to dump PCI device ID list

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[romprefix] Allow autoboot device filter to be disabled
Michael Brown [Mon, 13 Apr 2015 13:49:02 +0000 (14:49 +0100)] 
[romprefix] Allow autoboot device filter to be disabled

Our current behaviour when booting as a ROM is to autoboot only from
devices which are attached via the PCI bus:dev.fn address passed to
the ROM's initialisation vector.

Add a build configuration option AUTOBOOT_ROM_FILTER (enabled by
default) to control this behaviour.  This allows for ROMs to be built
which will attempt to boot from any detected device, even if not
attached via the original PCI bus:dev.fn address.  (This is
particularly useful when building combined EHCI/xHCI ROMs for USB
network boot, since the BIOS may request a boot via the EHCI
controller but the xHCI driver will reroute the root hub ports to the
xHCI controller.)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[xhci] Always reset root hub ports
Michael Brown [Mon, 13 Apr 2015 13:08:09 +0000 (14:08 +0100)] 
[xhci] Always reset root hub ports

In theory USB3 ports do not require a reset to enable the port.
Experimentation shows that this is sometimes required, particularly
when rerouting ports from EHCI to xHCI and switching speeds.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[build] Rewrite parserom.pl to support multiple source files
Robin Smidsrød [Mon, 6 Apr 2015 15:09:54 +0000 (17:09 +0200)] 
[build] Rewrite parserom.pl to support multiple source files

Running util/parserom.pl on all source files (637) one by one takes
approximately 35 seconds because of the startup cost of each invocation.
With the utility rewritten to support multiple source files it now takes
approximately 1 second to scan all source files for ROM declarations.

The --exclude-driver and --exclude-driver-class options have been added,
making it possible to skip certain source files from being scanned at all.

In addition --debug option has been added to more easily trace progress.

Finally --help option was added to show usage information.

Signed-off-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[peerdist] Add support for decoding PeerDist Content Information
Michael Brown [Mon, 13 Apr 2015 11:26:05 +0000 (12:26 +0100)] 
[peerdist] Add support for decoding PeerDist Content Information

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[efi] Ensure drivers are disconnected when ExitBootServices() is called
Michael Brown [Mon, 13 Apr 2015 11:06:59 +0000 (12:06 +0100)] 
[efi] Ensure drivers are disconnected when ExitBootServices() is called

We hook the UEFI ExitBootServices() event and use it to trigger a call
to shutdown_boot().  This does not automatically cause drivers to be
disconnected from their devices, since device enumeration is now
handled by the UEFI core rather than by iPXE.  (Under the old and
dubiously compatible device model, iPXE used to perform its own device
enumeration and so the call to shutdown_boot() would indeed have
caused drivers to be disconnected.)

Fix by replicating parts of the dummy "EFI root device" from
efiprefix.c to efidrvprefix.c, so that the call to shutdown_boot()
will call efi_driver_disconnect_all().

Originally-fixed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[crypto] Add SHA-512/224 algorithm
Michael Brown [Sun, 12 Apr 2015 15:57:25 +0000 (16:57 +0100)] 
[crypto] Add SHA-512/224 algorithm

SHA-512/224 is almost identical to SHA-512, with differing initial
hash values and a truncated output length.

This implementation has been verified using the NIST SHA-512/224 test
vectors.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[crypto] Add SHA-512/256 algorithm
Michael Brown [Sun, 12 Apr 2015 15:34:33 +0000 (16:34 +0100)] 
[crypto] Add SHA-512/256 algorithm

SHA-512/256 is almost identical to SHA-512, with differing initial
hash values and a truncated output length.

This implementation has been verified using the NIST SHA-512/256 test
vectors.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[crypto] Add SHA-384 algorithm
Michael Brown [Sun, 12 Apr 2015 14:53:39 +0000 (15:53 +0100)] 
[crypto] Add SHA-384 algorithm

SHA-384 is almost identical to SHA-512, with differing initial hash
values and a truncated output length.

This implementation has been verified using the NIST SHA-384 test
vectors.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[crypto] Add SHA-512 algorithm
Michael Brown [Sun, 12 Apr 2015 14:42:45 +0000 (15:42 +0100)] 
[crypto] Add SHA-512 algorithm

This implementation has been verified using the NIST SHA-512 test
vectors.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[crypto] Add SHA-224 algorithm
Michael Brown [Sun, 12 Apr 2015 13:50:18 +0000 (14:50 +0100)] 
[crypto] Add SHA-224 algorithm

SHA-224 is almost identical to SHA-256, with differing initial hash
values and a truncated output length.

This implementation has been verified using the NIST SHA-224 test
vectors.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[test] Simplify digest algorithm self-tests
Michael Brown [Sun, 12 Apr 2015 11:41:08 +0000 (12:41 +0100)] 
[test] Simplify digest algorithm self-tests

Update the digest self-tests to use okx(), and centralise concepts and
data shared between tests for multiple algorithms to reduce duplicated
code.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[virtio] Downgrade per-iobuf debug messages to DBGC2
Laszlo Ersek [Fri, 10 Apr 2015 19:53:21 +0000 (21:53 +0200)] 
[virtio] Downgrade per-iobuf debug messages to DBGC2

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[test] Add setjmp()/longjmp() self-tests
Michael Brown [Tue, 7 Apr 2015 05:40:46 +0000 (06:40 +0100)] 
[test] Add setjmp()/longjmp() self-tests

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[libc] Add x86_64 versions of setjmp() and longjmp()
Michael Brown [Tue, 7 Apr 2015 05:40:42 +0000 (06:40 +0100)] 
[libc] Add x86_64 versions of setjmp() and longjmp()

None of the x86_64 builds currently have any way of invoking these
functions.  They are included only to avoid introducing unnecessary
architecture-specific dependencies into the self-test suite.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[libc] Fix typo in longjmp()
Michael Brown [Tue, 7 Apr 2015 05:40:34 +0000 (06:40 +0100)] 
[libc] Fix typo in longjmp()

Commit 8ab4b00 ("[libc] Rewrite setjmp() and longjmp()") introduced a
regression in which the saved values of %ebx, %esi, and %edi were all
accidentally restored into %esp.  The result is that the second and
subsequent returns from setjmp() would effectively corrupt %ebx, %esi,
%edi, and the stack pointer %esp.

Use of setjmp() and longjmp() is generally discouraged: our only use
occurs as part of the implementation of PXENV_RESTART_TFTP, since the
PXE API effectively mandates its use here.  The call to setjmp()
occurs at the start of pxe_start_nbp(), where there are almost
certainly no values held in %ebx, %esi, or %edi.  The corruption of
these registers therefore had no visible effect on program execution.
The corruption of %esp would have been visible on return from
pxe_start_nbp(), but there are no known PXE NBPs which first call
PXENV_RESTART_TFTP and subsequently attempt to return to the PXE base
code.  The effect on program execution was therefore similar to that
of moving the stack to a pseudo-random location in the 32-bit address
space; this will often allow execution to complete successfully since
there is a high chance that the pseudo-random location will be unused.
The regression therefore went undetected for around one month.

Fix by restoring the correct registers from the saved jmp_buf
structure.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[xhci] Support USB1 devices attached via transaction translators
Michael Brown [Mon, 23 Mar 2015 20:24:20 +0000 (20:24 +0000)] 
[xhci] Support USB1 devices attached via transaction translators

xHCI provides a somewhat convoluted mechanism for specifying details
of a transaction translator.  Hubs must be marked as such in the
device slot context.  The only opportunity to do so is as part of a
Configure Endpoint command, which can be executed only when opening
the hub's interrupt endpoint.

We add a mechanism for host controllers to intercept the opening of
hub devices, providing xHCI with an opportunity to update the internal
device slot structure for the corresponding USB device to indicate
that the device is a hub.  We then include the hub-specific details in
the input context whenever any Configure Endpoint command is issued.

When a device is opened, we record the device slot and port for its
transaction translator (if any), and supply these as part of the
Address Device command.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[usb] Improve debug messages for failed control transactions
Michael Brown [Mon, 23 Mar 2015 20:18:02 +0000 (20:18 +0000)] 
[usb] Improve debug messages for failed control transactions

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[ehci] Support USB1 devices attached via transaction translators
Michael Brown [Mon, 23 Mar 2015 13:34:16 +0000 (13:34 +0000)] 
[ehci] Support USB1 devices attached via transaction translators

Support low-speed and full-speed devices attached to a USB2 hub.  Such
devices use a transaction translator (TT) within the USB2 hub, which
asynchronously initiates transactions on the lower-speed bus and
returns the result via a split completion on the high-speed bus.

We make the simplifying assumption that there will never be more than
sixteen active interrupt endpoints behind a single transaction
translator; this assumption allows us to schedule all periodic start
splits in microframe 0 and all periodic split completions in
microframes 2 and 3.  (We do not handle isochronous endpoints.)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[usb] Clear transaction translator buffers when applicable
Michael Brown [Mon, 23 Mar 2015 16:20:36 +0000 (16:20 +0000)] 
[usb] Clear transaction translator buffers when applicable

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[usb] Add clear_tt() hub method to clear transaction translator buffer
Michael Brown [Mon, 23 Mar 2015 15:59:51 +0000 (15:59 +0000)] 
[usb] Add clear_tt() hub method to clear transaction translator buffer

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[usb] Reset endpoints without waiting for a new transfer to be enqueued
Michael Brown [Mon, 23 Mar 2015 15:05:28 +0000 (15:05 +0000)] 
[usb] Reset endpoints without waiting for a new transfer to be enqueued

The current endpoint reset logic defers the reset until the caller
attempts to enqueue a new transfer to that endpoint.  This is
insufficient when dealing with endpoints behind a transaction
translator, since the transaction translator is a resource shared
between multiple endpoints.

We cannot reset the endpoint as part of the completion handling, since
that would introduce recursive calls to usb_poll().  Instead, we
add the endpoint to a list of halted endpoints, and perform the reset
on the next call to usb_step().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[xhci] Ring doorbell as part of endpoint reset
Michael Brown [Mon, 23 Mar 2015 14:22:23 +0000 (14:22 +0000)] 
[xhci] Ring doorbell as part of endpoint reset

The endpoint may already have enqueued TRBs at the time that
xhci_endpoint_reset() is called.  Ring the doorbell to resume
processing these TRBs immediately, rather than waiting until the next
call to xhci_endpoint_message() or xhci_endpoint_stream().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[libprefix] Fix building on 64-bit FreeBSD 8.4
Michael Brown [Mon, 23 Mar 2015 13:28:59 +0000 (13:28 +0000)] 
[libprefix] Fix building on 64-bit FreeBSD 8.4

Reported-by: Pavel Antonov <holly@istu.edu>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[usb] Fix USB timeouts to match specification
Michael Brown [Wed, 18 Mar 2015 16:43:18 +0000 (16:43 +0000)] 
[usb] Fix USB timeouts to match specification

Several of the USB timeouts were chosen on the principle of "pick an
arbitrary but ridiculously large value, just to be safe".  It turns
out that some of the timeouts permitted by the USB specification are
even larger: for example, control transactions are allowed to take up
to five seconds to complete.

Fix up these USB timeout values to match those found in the USB2
specification.

Debugged-by: Robin Smidsrød <robin@smidsrod.no>
Tested-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[netdevice] Add missing bus types to netdev_fetch_bustype()
Michael Brown [Wed, 18 Mar 2015 16:42:39 +0000 (16:42 +0000)] 
[netdevice] Add missing bus types to netdev_fetch_bustype()

Reported-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[ehci] Add support for EHCI host controllers
Michael Brown [Sun, 15 Mar 2015 01:01:08 +0000 (01:01 +0000)] 
[ehci] Add support for EHCI host controllers

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[xhci] Do not release ownership back to BIOS when booting an OS
Michael Brown [Wed, 18 Mar 2015 11:57:41 +0000 (11:57 +0000)] 
[xhci] Do not release ownership back to BIOS when booting an OS

xHCI (and EHCI) nominally provide a mechanism for releasing ownership
of the host controller back to the BIOS, which can then potentially
restore legacy USB keyboard functionality.

This is a rarely used code path, since most operating systems claim
ownership and never attempt to later return to the BIOS.  On some
systems (observed with a Lenovo X1 Carbon), this code path leads to
obscure and interesting bugs: if the xHCI and EHCI controllers are
both claimed and later released back to the BIOS, then a subsequent
call to INT 16,0305 to set the keyboard repeat rate to a non-default
value will lock the system.

Obscure though this sequence of operations may sound, it is exactly
what happens when using iPXE to boot a Linux kernel via a USB network
card.  There is old and probably unwanted code in Linux's
arch/x86/boot/main.c which sets the keyboard repeat rate (with the
accompanying comment "Set keyboard repeat rate (why?)").  When booting
Linux via a USB network card on a Lenovo X1 Carbon, the system
therefore locks up immediately after jumping to the kernel's entry
point.

Work around this problem by preventing the release of ownership back
to the BIOS if it is known that we are shutting down to boot an OS.
This should allow legacy USB keyboard functionality to be restored if
the user chooses to exit iPXE, while avoiding the rarely used code
paths (and corresponding BIOS bugs) if the user chooses instead to
boot an OS.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[usb] Add config/usb.h for USB configuration options
Michael Brown [Wed, 18 Mar 2015 11:37:51 +0000 (11:37 +0000)] 
[usb] Add config/usb.h for USB configuration options

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[autoboot] Match against parent devices when matching by bus type and location
Michael Brown [Tue, 17 Mar 2015 02:30:06 +0000 (02:30 +0000)] 
[autoboot] Match against parent devices when matching by bus type and location

When using iPXE as an option ROM for a PCI USB controller (e.g. via
qemu's "-device nec-usb-xhci,romfile=..." syntax), the ROM prefix will
set the PCI bus:dev.fn address of the USB controller as the PCI
autoboot device.  This will cause iPXE to fail to boot from any
detected USB network devices, since they will not match the autoboot
bus type (or location).

Fix by allowing the autoboot bus type and location to match against
the network device or any of its parent devices.  This allows the
match to succeed for USB network devices attached to the selected PCI
USB controller.

Reported-by: Dan Ellis <Dan.Ellis@displaylink.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[xhci] Forcibly disable SMIs if BIOS fails to release ownership
Michael Brown [Mon, 16 Mar 2015 20:32:33 +0000 (20:32 +0000)] 
[xhci] Forcibly disable SMIs if BIOS fails to release ownership

If the BIOS fails to gracefully release ownership of the xHCI
controller, we can forcibly claim it by disabling all SMIs via the
USB legacy support control/status register.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[usb] Add functions for manual device address assignment
Michael Brown [Mon, 16 Mar 2015 15:37:39 +0000 (15:37 +0000)] 
[usb] Add functions for manual device address assignment

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[ncm] Respect maximum transfer size of the bus
Michael Brown [Mon, 16 Mar 2015 05:39:41 +0000 (05:39 +0000)] 
[ncm] Respect maximum transfer size of the bus

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[usb] Add the concept of a USB bus maximum transfer size
Michael Brown [Mon, 16 Mar 2015 05:39:14 +0000 (05:39 +0000)] 
[usb] Add the concept of a USB bus maximum transfer size

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[libc] Add ffs(), ffsl(), and ffsll()
Michael Brown [Sun, 15 Mar 2015 19:28:05 +0000 (19:28 +0000)] 
[libc] Add ffs(), ffsl(), and ffsll()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[tcpip] Fix dubious calculation of min_port
Michael Brown [Fri, 13 Mar 2015 10:19:44 +0000 (10:19 +0000)] 
[tcpip] Fix dubious calculation of min_port

Detected using sparse.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[smsc75xx] Move RX FIFO overflow message to DBGLVL_EXTRA
Michael Brown [Wed, 11 Mar 2015 22:33:51 +0000 (22:33 +0000)] 
[smsc75xx] Move RX FIFO overflow message to DBGLVL_EXTRA

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>
7 years ago[tcp] Implement support for TCP Selective Acknowledgements (SACK)
Michael Brown [Wed, 11 Mar 2015 17:53:29 +0000 (17:53 +0000)] 
[tcp] Implement support for TCP Selective Acknowledgements (SACK)

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>
7 years ago[legal] Relicense files under GPL2_OR_LATER_OR_UBDL
Michael Brown [Wed, 11 Mar 2015 14:23:14 +0000 (14:23 +0000)] 
[legal] Relicense files under GPL2_OR_LATER_OR_UBDL

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>
7 years ago[smsc75xx] Add driver for SMSC/Microchip LAN75xx USB Ethernet NICs
Michael Brown [Tue, 10 Mar 2015 14:37:18 +0000 (14:37 +0000)] 
[smsc75xx] Add driver for SMSC/Microchip LAN75xx USB Ethernet NICs

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>
7 years ago[mii] Add generic mii_check_link() function
Michael Brown [Tue, 10 Mar 2015 21:23:51 +0000 (21:23 +0000)] 
[mii] Add generic mii_check_link() function

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>
7 years ago[legal] Relicense Davicom DM96xx drivers
Michael Brown [Tue, 10 Mar 2015 00:12:39 +0000 (00:12 +0000)] 
[legal] Relicense Davicom DM96xx drivers

Reported-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[dm96xx] Add driver for Davicom DM96xx USB Ethernet NICs
Michael Brown [Mon, 16 Feb 2015 15:22:44 +0000 (15:22 +0000)] 
[dm96xx] Add driver for Davicom DM96xx USB Ethernet NICs

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[intel] Add PCI ID for I218-LM
Thomas Miletich [Fri, 6 Mar 2015 20:39:42 +0000 (21:39 +0100)] 
[intel] Add PCI ID for I218-LM

Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[http] Support MD5-sess Digest authentication
Michael Brown [Mon, 9 Mar 2015 13:22:49 +0000 (13:22 +0000)] 
[http] Support MD5-sess Digest authentication

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>
7 years ago[http] Abstract out HTTP Digest hash algorithm operations
Michael Brown [Mon, 9 Mar 2015 12:35:17 +0000 (12:35 +0000)] 
[http] Abstract out HTTP Digest hash algorithm operations

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[xen] Set the "feature-rx-notify" flag for netfront devices
Michael Brown [Fri, 6 Mar 2015 17:19:09 +0000 (17:19 +0000)] 
[xen] Set the "feature-rx-notify" flag for netfront devices

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>
7 years ago[xhci] Undo PCH-specific quirk fixes when removing device
Michael Brown [Fri, 6 Mar 2015 17:15:29 +0000 (17:15 +0000)] 
[xhci] Undo PCH-specific quirk fixes when removing device

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>
7 years ago[xhci] Enable USB3 ports on Intel PCH8/PCH9 controllers
Michael Brown [Fri, 6 Mar 2015 11:41:37 +0000 (11:41 +0000)] 
[xhci] Enable USB3 ports on Intel PCH8/PCH9 controllers

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>
7 years ago[legal] Relicense files under GPL2_OR_LATER_OR_UBDL
Michael Brown [Thu, 5 Mar 2015 11:36:30 +0000 (11:36 +0000)] 
[legal] Relicense files under GPL2_OR_LATER_OR_UBDL

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>
7 years ago[retry] Colourise debug output
Michael Brown [Thu, 5 Mar 2015 11:25:54 +0000 (11:25 +0000)] 
[retry] Colourise debug output

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[retry] Rewrite unrelicensable portions of retry.c
Michael Brown [Thu, 5 Mar 2015 11:04:47 +0000 (11:04 +0000)] 
[retry] Rewrite unrelicensable portions of retry.c

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[linux] Rewrite headers included in all builds
Michael Brown [Thu, 5 Mar 2015 02:43:37 +0000 (02:43 +0000)] 
[linux] Rewrite headers included in all builds

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>
7 years ago[i386] Move real_to_user() to realmode.h
Michael Brown [Thu, 5 Mar 2015 02:30:58 +0000 (02:30 +0000)] 
[i386] Move real_to_user() to realmode.h

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[build] Fix the REQUIRE_SYMBOL mechanism
Michael Brown [Wed, 4 Mar 2015 18:48:19 +0000 (18:48 +0000)] 
[build] Fix the REQUIRE_SYMBOL mechanism

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>
7 years ago[build] Use REQUIRE_OBJECT() to drag in per-object configuration
Michael Brown [Wed, 4 Mar 2015 17:22:07 +0000 (17:22 +0000)] 
[build] Use REQUIRE_OBJECT() to drag in per-object configuration

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[build] Remove obsolete and unused portions of config.c
Michael Brown [Wed, 4 Mar 2015 14:49:43 +0000 (14:49 +0000)] 
[build] Remove obsolete and unused portions of config.c

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[pxe] Remove obsolete references to pxeparent_dhcp
Michael Brown [Tue, 3 Mar 2015 16:30:09 +0000 (16:30 +0000)] 
[pxe] Remove obsolete references to pxeparent_dhcp

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[build] Remove unused __keepme macro
Michael Brown [Tue, 3 Mar 2015 16:08:39 +0000 (16:08 +0000)] 
[build] Remove unused __keepme macro

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[build] Remove unused IMPORT_SYMBOL() and EXPORT_SYMBOL() macros
Michael Brown [Tue, 3 Mar 2015 15:51:33 +0000 (15:51 +0000)] 
[build] Remove unused IMPORT_SYMBOL() and EXPORT_SYMBOL() macros

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[malloc] Rewrite unrelicensable portions of malloc.c
Michael Brown [Tue, 3 Mar 2015 15:16:32 +0000 (15:16 +0000)] 
[malloc] Rewrite unrelicensable portions of malloc.c

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[malloc] Move valgrind headers out of arch/x86
Michael Brown [Tue, 3 Mar 2015 14:25:51 +0000 (14:25 +0000)] 
[malloc] Move valgrind headers out of arch/x86

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>
7 years ago[settings] Use generic jump scrolling abstraction
Michael Brown [Tue, 3 Mar 2015 03:51:08 +0000 (03:51 +0000)] 
[settings] Use generic jump scrolling abstraction

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[menu] Abstract out the generic concept of a jump scroller
Michael Brown [Tue, 3 Mar 2015 02:47:37 +0000 (02:47 +0000)] 
[menu] Abstract out the generic concept of a jump scroller

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[settings] Rewrite unrelicensable portions of settings.c
Michael Brown [Tue, 3 Mar 2015 00:41:39 +0000 (00:41 +0000)] 
[settings] Rewrite unrelicensable portions of settings.c

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[settings] Use list_first_entry() when unregistering child settings
Michael Brown [Tue, 3 Mar 2015 00:29:42 +0000 (00:29 +0000)] 
[settings] Use list_first_entry() when unregistering child settings

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>
7 years ago[pci] Rewrite unrelicensable portions of pci.h
Michael Brown [Tue, 3 Mar 2015 00:08:41 +0000 (00:08 +0000)] 
[pci] Rewrite unrelicensable portions of pci.h

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[pci] Remove outdated and mostly-unused pci_ids.h file
Michael Brown [Mon, 2 Mar 2015 21:37:45 +0000 (21:37 +0000)] 
[pci] Remove outdated and mostly-unused pci_ids.h file

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[iscsi] Rewrite unrelicensable portions of iscsi.c
Michael Brown [Mon, 2 Mar 2015 20:37:24 +0000 (20:37 +0000)] 
[iscsi] Rewrite unrelicensable portions of iscsi.c

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[list] Relicense list.h
Michael Brown [Mon, 2 Mar 2015 19:47:32 +0000 (19:47 +0000)] 
[list] Relicense list.h

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>
7 years ago[elf] Rewrite ELF header
Michael Brown [Mon, 2 Mar 2015 19:42:48 +0000 (19:42 +0000)] 
[elf] Rewrite ELF header

Rewrite the ELF header to include only the relevant portions from the
ELF specification.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[libc] Rewrite byte-swapping code
Michael Brown [Mon, 2 Mar 2015 16:25:53 +0000 (16:25 +0000)] 
[libc] Rewrite byte-swapping code

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[libc] Rewrite setjmp() and longjmp()
Michael Brown [Mon, 2 Mar 2015 15:21:38 +0000 (15:21 +0000)] 
[libc] Rewrite setjmp() and longjmp()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[libc] Rewrite unrelicensable portions of ctype.h
Michael Brown [Mon, 2 Mar 2015 14:41:49 +0000 (14:41 +0000)] 
[libc] Rewrite unrelicensable portions of ctype.h

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[libc] Rewrite unrelicensable portions of stddef.h
Michael Brown [Mon, 2 Mar 2015 14:10:21 +0000 (14:10 +0000)] 
[libc] Rewrite unrelicensable portions of stddef.h

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[legal] Relicense files under GPL2_OR_LATER_OR_UBDL
Michael Brown [Mon, 2 Mar 2015 13:29:46 +0000 (13:29 +0000)] 
[legal] Relicense files under GPL2_OR_LATER_OR_UBDL

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>
7 years ago[legal] Relicense files under GPL2_OR_LATER_OR_UBDL
Michael Brown [Mon, 2 Mar 2015 12:28:42 +0000 (12:28 +0000)] 
[legal] Relicense files under GPL2_OR_LATER_OR_UBDL

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>
7 years ago[legal] Relicense files under GPL2_OR_LATER_OR_UBDL
Michael Brown [Mon, 2 Mar 2015 12:04:57 +0000 (12:04 +0000)] 
[legal] Relicense files under GPL2_OR_LATER_OR_UBDL

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>
7 years ago[legal] Relicense files under GPL2_OR_LATER_OR_UBDL
Michael Brown [Mon, 2 Mar 2015 11:54:40 +0000 (11:54 +0000)] 
[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>
7 years ago[legal] Add UBDL relicensing tool
Michael Brown [Mon, 2 Mar 2015 11:42:29 +0000 (11:42 +0000)] 
[legal] Add UBDL relicensing tool

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>
7 years ago[legal] Add support for the Unmodified Binary Distribution Licence
Michael Brown [Thu, 26 Feb 2015 15:58:42 +0000 (15:58 +0000)] 
[legal] Add support for the Unmodified Binary Distribution Licence

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>
7 years ago[mucurses] Add missing FILE_LICENCE declarations
Michael Brown [Mon, 2 Mar 2015 12:02:11 +0000 (12:02 +0000)] 
[mucurses] Add missing FILE_LICENCE declarations

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[legal] Include full licence text for all GPL2_OR_LATER files
Michael Brown [Thu, 26 Feb 2015 17:49:38 +0000 (17:49 +0000)] 
[legal] Include full licence text for all GPL2_OR_LATER files

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>
7 years ago[legal] Update GPLv2 licence text
Michael Brown [Thu, 26 Feb 2015 15:43:40 +0000 (15:43 +0000)] 
[legal] Update GPLv2 licence text

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>
7 years ago[zbin] Remove now-unused unnrv2b.S decompressor
Michael Brown [Thu, 26 Feb 2015 17:41:38 +0000 (17:41 +0000)] 
[zbin] Remove now-unused unnrv2b.S decompressor

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[vbox] Enable some more features now that we have LZMA compression
Robin Smidsrød [Thu, 26 Feb 2015 13:58:21 +0000 (14:58 +0100)] 
[vbox] Enable some more features now that we have LZMA compression

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[zbin] Fix check for existence of most recent output byte
Michael Brown [Thu, 26 Feb 2015 13:01:55 +0000 (13:01 +0000)] 
[zbin] Fix check for existence of most recent output byte

The code in lzma_literal() checks to see if we are at the start of the
compressed input data in order to determine whether or not a most
recent output byte exists.  This check is incorrect, since
initialisation of the decompressor will always consume the first five
bytes of the compressed input data.

Fix by instead checking whether or not we are at the start of the
output data stream.  This is, in any case, a more logical check.

This issue was masked during development and testing since virtual
machines tend to zero the initial contents of RAM; the spuriously-read
"most recent output byte" is therefore likely to already be a zero
when running in a virtual machine.

Reported-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[zbin] Allow decompressor to generate debug output via BIOS console
Michael Brown [Thu, 26 Feb 2015 12:59:08 +0000 (12:59 +0000)] 
[zbin] Allow decompressor to generate debug output via BIOS console

The 0xe9 debug port exists only on virtual machines.  Provide an
option to print debug output on the BIOS console, to allow for
debugging on real hardware.

Note that this option can be used only if the decompressor is called
in flat real mode; the easiest way to achieve this is to build with
DEBUG=libprefix.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[prefix] Call decompressor in flat real mode when DEBUG=libprefix is enabled
Michael Brown [Thu, 26 Feb 2015 12:56:07 +0000 (12:56 +0000)] 
[prefix] Call decompressor in flat real mode when DEBUG=libprefix is enabled

Allow the decompressor the option of generating debugging output via
the BIOS console by calling it in flat real mode (rather than 16-bit
protected mode) when libprefix.S is built with debugging enabled.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[zbin] Perform extra normalisation after completing decompression
Michael Brown [Thu, 26 Feb 2015 09:46:59 +0000 (09:46 +0000)] 
[zbin] Perform extra normalisation after completing decompression

LZMA performs an extra normalisation after decompression is complete,
which does not affect the output but may consume an extra byte from
the input (and so may affect which byte is identified as being the
start of the next block).

Reported-by: Robin Smidsrød <robin@smidsrod.no>
Tested-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[dhcp] Extract timing parameters out to config/dhcp.h
Alex Williamson [Mon, 26 Jan 2015 17:54:29 +0000 (10:54 -0700)] 
[dhcp] Extract timing parameters out to config/dhcp.h

iPXE uses DHCP timeouts loosely based on values recommended by the
specification, but often abbreviated to reduce timeouts for reliable
and/or simple network topologies.  Extract the DHCP timing parameters
to config/dhcp.h and document them.  The resulting default iPXE
behavior is exactly the same, but downstreams are now afforded the
opportunity to implement spec-compliant behavior via config file
overrides.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[zbin] Use LZMA compression
Michael Brown [Sat, 21 Feb 2015 14:29:53 +0000 (14:29 +0000)] 
[zbin] Use LZMA compression

LZMA provides significantly better compression (by ~15%) than the
current NRV2B algorithm.

We use a raw LZMA stream (aka LZMA1) to avoid the need for code to
parse the LZMA2 block headers.  We use parameters {lc=2,lp=0,pb=0} to
reduce the stack space required by the decompressor to acceptable
levels (around 8kB).  Using lc=3 or pb=2 would give marginally better
compression, but at the cost of substantially increasing the required
stack space.

The build process now requires the liblzma headers to be present on
the build system, since we do not include a copy of an LZMA compressor
within the iPXE source tree.  The decompressor is written from scratch
(based on XZ Embedded) and is entirely self-contained within the
iPXE source.

The branch-call-jump (BCJ) filter used to improve the compressibility
is specific to iPXE.  We choose not to use liblzma's built-in BCJ
filter since the algorithm is complex and undocumented.  Our BCJ
filter achieves approximately the same results (on typical iPXE
binaries) with a substantially simpler algorithm.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[prefix] Use .bss16 as temporary stack space for calls to install_block
Michael Brown [Tue, 24 Feb 2015 16:13:55 +0000 (16:13 +0000)] 
[prefix] Use .bss16 as temporary stack space for calls to install_block

Some decompression algorithms (e.g. LZMA) require large amounts of
temporary stack space, which may not be made available by all
prefixes.  Use .bss16 as a temporary stack for the duration of the
calls to install_block (switching back to the external stack before we
start making calls into code which might access variables in .bss16),
and allow the decompressor to define a global symbol to force a
minimum value on the size of .bss16.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[hyperv] Check for required features
Michael Brown [Thu, 19 Feb 2015 14:47:07 +0000 (14:47 +0000)] 
[hyperv] Check for required features

Other hypervisors (e.g. KVM) may provide an unusable subset of the
Hyper-V features, and our attempts to use these non-existent features
cause the guest to reboot.

Fix by explicitly checking for the Hyper-V features that we use.

Reported-by: Ján ONDREJ (SAL) <ondrejj@salstar.sk>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[libc] Rewrite strtoul()
Michael Brown [Thu, 19 Feb 2015 16:00:01 +0000 (16:00 +0000)] 
[libc] Rewrite strtoul()

The implementation of strtoul() has a partially unknown provenance.
Rewrite this code to avoid potential licensing uncertainty.

Since we now use -ffunction-sections, there is no need to place
strtoull() in a separate file from strtoul().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[ipv4] Rewrite inet_aton()
Michael Brown [Thu, 19 Feb 2015 14:02:07 +0000 (14:02 +0000)] 
[ipv4] Rewrite inet_aton()

The implementation of inet_aton() has an unknown provenance.  Rewrite
this code to avoid potential licensing uncertainty.

Also move the code from core/misc.c to its logical home in net/ipv4.c,
and add a few extra test cases.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[legal] Add missing copyright header to net/ipv4.c
Michael Brown [Wed, 18 Feb 2015 14:16:59 +0000 (14:16 +0000)] 
[legal] Add missing copyright header to net/ipv4.c

Signed-off-by: Michael Brown <mcb30@ipxe.org>
7 years ago[test] Add IPv4 self-tests
Michael Brown [Wed, 18 Feb 2015 14:11:32 +0000 (14:11 +0000)] 
[test] Add IPv4 self-tests

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