]> git.ipfire.org Git - thirdparty/ipxe.git/log
thirdparty/ipxe.git
12 years ago[pcbios] Inhibit all calls to INT 15,e820 and INT 15,e801 during POST
Michael Brown [Mon, 11 Mar 2013 00:50:52 +0000 (00:50 +0000)] 
[pcbios] Inhibit all calls to INT 15,e820 and INT 15,e801 during POST

Many BIOSes do not construct the full system memory map until after
calling the option ROM initialisation entry points.  For several
years, we have added sanity checks and workarounds to accommodate
charming quirks such as BIOSes which report the entire 32-bit address
space (including all memory-mapped PCI BARs) as being usable RAM.

The IBM x3650 takes quirky behaviour to a new extreme.  Calling either
INT 15,e820 or INT 15,e801 during POST doesn't just get you invalid
data.  We could cope with invalid data.  Instead, these nominally
read-only API calls manage to trash some internal BIOS state, with the
result that the system memory map is _never_ constructed.  This tends
to confuse subsequent bootloaders and operating systems.

[ GRUB 0.97 fails in a particularly amusing way.  Someone thought it
would be a good idea for memcpy() to check that the destination memory
region is a valid part of the system memory map; if not, then memcpy()
will sulk, fail, and return NULL.  This breaks pretty much every use
of memcpy() including, for example, those inserted implicitly by gcc
to copy non-const initialisers.  Debugging is _fun_ when a simple call
to printf() manages to create an infinite recursion, exhaust the
available stack space, and shut down the CPU. ]

Fix by completely inhibiting calls to INT 15,e820 and INT 15,e801
during POST.

We do now allow relocation during POST up to the maximum address
returned by INT 15,88 (which seems so far to always be safe).  This
allows us to continue to have a reasonable size of external heap, even
if the PMM allocation is close to the 1MB mark.

The downside of allowing relocation during POST is that we may
overwrite PMM-allocated memory in use by other option ROMs.  However,
the downside of inhibiting relocation, when combined with also
inhibiting calls to INT 15,e820 and INT 15,e801, would be that we
might have no external heap available: this would make booting an OS
impossible and could prevent some devices from even completing
initialisation.

On balance, the lesser evil is probably to allow relocation during
POST (up to the limit provided by INT 15,88).  Entering iPXE during
POST is a rare operation; on the even rarer systems where doing so
happens to overwrite a PMM-allocated region, then there exists a
fairly simple workaround: if the user enters iPXE during POST and
wishes to exit iPXE, then the user must reboot.  This is an acceptable
cost, given the rarity of the situation and the simplicity of the
workaround.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[prefix] Use %cs as implicit parameter to uninstall()
Michael Brown [Fri, 8 Mar 2013 13:26:22 +0000 (13:26 +0000)] 
[prefix] Use %cs as implicit parameter to uninstall()

romprefix.S currently calls uninstall() with an invalid value in %ax.
Consequently, base memory is not freed after a ROM boot attempt (or
after entering iPXE during POST).

The uninstall() function is physically present in .text16, and so can
use %cs to determine the .text16 segment address.  The .data16 segment
address is not required, since uninstall() is called only by code
paths which set up .data16 to immediately follow .text16.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[nbiprefix] Set up real-mode stack before jumping to .text16
Michael Brown [Fri, 8 Mar 2013 13:23:58 +0000 (13:23 +0000)] 
[nbiprefix] Set up real-mode stack before jumping to .text16

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[pcbios] Add extra debugging messages when unhiding iPXE from memory
Michael Brown [Fri, 8 Mar 2013 12:22:56 +0000 (12:22 +0000)] 
[pcbios] Add extra debugging messages when unhiding iPXE from memory

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Add vmware build target
Brandon Penglase [Sun, 4 Nov 2012 18:48:08 +0000 (13:48 -0500)] 
[build] Add vmware build target

Add "make vmware" build target, to build all of the ROMs used with
VMware.

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[tftp] Allow TFTP block size to be controlled via the PXE TFTP API
Michael Brown [Wed, 6 Mar 2013 17:35:30 +0000 (17:35 +0000)] 
[tftp] Allow TFTP block size to be controlled via the PXE TFTP API

The PXE TFTP API allows the caller to request a particular TFTP block
size.  Since mid-2008, iPXE has appended a "?blksize=xxx" parameter to
the TFTP URI constructed internally; nothing has ever parsed this
parameter.  Nobody seems to have cared that this parameter has been
ignored for almost five years.

Fix by using xfer_window(), which provides a fairly natural way to
convey the block size information from the PXE TFTP API to the TFTP
protocol layer.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[menu] Prevent separators with shortcut keys from being selected
Michael Brown [Wed, 6 Mar 2013 15:05:30 +0000 (15:05 +0000)] 
[menu] Prevent separators with shortcut keys from being selected

Nothing currently prevents a menu separator from being assigned a
shortcut key, and then from being selected using that shortcut key.
This produces an inconsistency in the user interface, since separators
cannot be selected by other means of menu navigation (arrow keys, page
up/down, etc).

It would be trivial to prevent separators from being assigned shortcut
keys, but this would eliminate one potentially useful use case: having
a large menu and using shortcut keys to jump to a section within the
menu.

Fix by treating a shortcut key on a separator as equivalent to "select
the separator, then press the down arrow key".  This has the effect of
moving to the first non-separator menu item following the specified
separator, which is probably the most intuitive behaviour.  (The
existing logic for moving the selection already handles the various
nasty corner cases such as a menu ending with one or more separators.)

Reported-by: Ján ONDREJ (SAL) <ondrejj@salstar.sk>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[menu] Prevent character code zero from acting as a shortcut key
Michael Brown [Wed, 6 Mar 2013 14:41:46 +0000 (14:41 +0000)] 
[menu] Prevent character code zero from acting as a shortcut key

Unrecognised keys may be returned by getkey() as character code zero,
which currently matches against the first menu item with no shortcut
key defined.

Prevent this unintended behaviour by explicitly checking that the menu
item has a defined shortcut key.

Reported-by: Ján ONDREJ (SAL) <ondrejj@salstar.sk>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[zbin] Fix size used for memset in alloc_output_file
Daniel P. Berrange [Tue, 5 Mar 2013 15:18:20 +0000 (15:18 +0000)] 
[zbin] Fix size used for memset in alloc_output_file

The output->buf field is a pointer, not an array, so sizeof() is not
applicable.  We must use the allocated string length instead.

Identified by gcc:

  util/zbin.c: In function ‘alloc_output_file’:
  util/zbin.c:146:37: warning: argument to ‘sizeof’ in ‘memset’ call
    is the same expression as the destination; did you mean to
    dereference it? [-Wsizeof-pointer-memaccess]
  memset ( output->buf, 0xff, sizeof ( output->buf ) );

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[undi] Work around specific devices with known broken interrupt behaviour
Michael Brown [Tue, 5 Mar 2013 14:22:53 +0000 (14:22 +0000)] 
[undi] Work around specific devices with known broken interrupt behaviour

Some PXE stacks are known to claim that IRQs are supported, but then
never generate interrupts.  No satisfactory solution has been found to
this problem; the workaround is to add the PCI vendor and device IDs
to a list of devices which will be treated as simply not supporting
interrupts.

This is something of a hack, since it will generate false positives
for identical devices with a working PXE stack (e.g. those that have
been reflashed with iPXE), but it's an improvement on the current
situation.

Reported-by: Richard Moore <rich@richud.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[tg3] Fix various tg3 issues
Kevin Tran [Mon, 4 Mar 2013 21:56:24 +0000 (21:56 +0000)] 
[tg3] Fix various tg3 issues

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[netdevice] Separate VLAN support from presence of VLAN-supporting drivers
Michael Brown [Fri, 1 Mar 2013 16:32:29 +0000 (16:32 +0000)] 
[netdevice] Separate VLAN support from presence of VLAN-supporting drivers

Some NICs (e.g. Hermon) provide hardware support for stripping the
VLAN tag, but do not provide any way for this support to be disabled.
Drivers for this hardware must therefore call vlan_find() to identify
a suitable receiving network device.

Provide a weak version of vlan_find() which will always return NULL if
VLAN support has not been enabled (either directly, or by enabling
a feature such as FCoE which requires VLAN support).  This allows the
VLAN code to be omitted from builds where the user has not requested
support for VLANs.

Inspired-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[iscsi] Include 802.1Q VLAN identifier in iBFT
Stefan Hajnoczi [Fri, 1 Mar 2013 15:32:16 +0000 (16:32 +0100)] 
[iscsi] Include 802.1Q VLAN identifier in iBFT

The iBFT NIC section has a VLAN field which must be filled in so that
iSCSI booting works over VLANs.

Unfortunately it is unclear from the IBM specification linked in
ibft.c whether the VLAN field is just the 802.1Q VLAN Identifier or
the full 802.1Q TCI.  For now just fill in the VID, the Priority Code
Point and Drop Eligible Indicator could be set in the future if it
turns out they should be present too.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[netdevice] Add vlan_tag() to get the VLAN tag of a network device
Stefan Hajnoczi [Fri, 1 Mar 2013 15:32:15 +0000 (16:32 +0100)] 
[netdevice] Add vlan_tag() to get the VLAN tag of a network device

The iBFT has a VLAN field that should be filled in.  Add the
vlan_tag() function to extract the VLAN tag of a network device.

Since VLAN support is optional, define a weak function that returns 0
when iPXE is built without VLAN support.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Ensure EFI binaries comply with Authenticode requirements
Michael Brown [Mon, 25 Feb 2013 17:22:01 +0000 (17:22 +0000)] 
[efi] Ensure EFI binaries comply with Authenticode requirements

Authenticode requires that the size of the raw file must equal the
size of the OptionalHeader.SizeOfHeaders plus the sum of all sections'
SizeOfRawData.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[intel] Add Intel I210 Gigabit Ethernet PCI ID
Jens Rottmann [Wed, 6 Feb 2013 13:25:05 +0000 (14:25 +0100)] 
[intel] Add Intel I210 Gigabit Ethernet PCI ID

Signed-off-by: Jens Rottmann <JRottmann@LiPPERTembedded.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Include self-tests within "make everything"
Michael Brown [Thu, 31 Jan 2013 10:12:58 +0000 (10:12 +0000)] 
[build] Include self-tests within "make everything"

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[tls] Concatenate received non-data records before processing
Michael Brown [Wed, 30 Jan 2013 16:58:17 +0000 (16:58 +0000)] 
[tls] Concatenate received non-data records before processing

Allow non-data records to be split across multiple received I/O
buffers, to accommodate large certificate chains.

Reported-by: Nicola Volpini <Nicola.Volpini@kambi.com>
Tested-by: Nicola Volpini <Nicola.Volpini@kambi.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[src] Fix spelling in comments, debug messages and local variable names
Stefan Weil [Thu, 3 Jan 2013 15:12:32 +0000 (15:12 +0000)] 
[src] Fix spelling in comments, debug messages and local variable names

Fixes in comments and debug messages:

  existance -> existence
  unecessary -> unnecessary
  occured -> occurred
  decriptor -> descriptor
  neccessary -> necessary
  addres, adress -> address
  initilize -> initialize
  sucessfully -> successfully
  paramter -> parameter
  acess -> access
  upto -> up to
  likelyhood ->likelihood
  thru -> through
  substracting -> subtracting
  lenght -> length
  isnt -> isn't
  interupt -> interrupt
  publically -> publicly (this one was not wrong, but unusual)
  recieve -> receive
  accessable -> accessible
  seperately -> separately
  pacet -> packet
  controled -> controlled
  dectect -> detect
  indicies -> indices
  extremly -> extremely
  boundry -> boundary
  usefull -> useful
  unuseable -> unusable
  auxilliary -> auxiliary
  embeded -> embedded
  enviroment -> environment
  sturcture -> structure
  complier -> compiler
  constructes -> constructs
  supress -> suppress
  intruduced -> introduced
  compatability -> compatibility
  verfication -> verification
  ths -> the
  reponse -> response

Fixes in local variable names:

  retreive -> retrieve

Most of these fixes were made using codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Include product short name in EFI SNP device names
Michael Brown [Wed, 21 Nov 2012 03:36:07 +0000 (03:36 +0000)] 
[efi] Include product short name in EFI SNP device names

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Delegate to child device's EFI_COMPONENT_NAME2_PROTOCOL, if present
Michael Brown [Wed, 21 Nov 2012 02:37:55 +0000 (02:37 +0000)] 
[efi] Delegate to child device's EFI_COMPONENT_NAME2_PROTOCOL, if present

EFI's device naming model requires drivers to provide names for child
devices.  Allow the driver's GetControllerName() method to delegate to
an instance of EFI_COMPONENT_NAME2_PROTOCOL installed on the child
device itself (if present); this allows the SNP device to expose its
own device name via the PCI driver's GetControllerName() method.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[bzimage] Allow initrds to be rearranged in place
Michael Brown [Mon, 12 Nov 2012 16:16:31 +0000 (16:16 +0000)] 
[bzimage] Allow initrds to be rearranged in place

At present, loading a bzImage via iPXE requires enough RAM to hold two
copies of each initrd file.  Remove this constraint by rearranging the
initrds in place.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[initrd] Add ability to reshuffle initrds into image list order
Michael Brown [Mon, 12 Nov 2012 13:08:16 +0000 (13:08 +0000)] 
[initrd] Add ability to reshuffle initrds into image list order

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[libc] Relicense x86 string.h
Michael Brown [Mon, 5 Nov 2012 01:01:12 +0000 (01:01 +0000)] 
[libc] Relicense x86 string.h

No code from the original source remains within this file; relicense
under GPL2+ with a new copyright notice.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[libc] Fix and externalise memswap()
Michael Brown [Mon, 5 Nov 2012 00:58:20 +0000 (00:58 +0000)] 
[libc] Fix and externalise memswap()

Make memswap() behave correctly if called with a length of zero.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[libc] Reduce overall code size by externalising strlen()
Michael Brown [Mon, 5 Nov 2012 00:25:25 +0000 (00:25 +0000)] 
[libc] Reduce overall code size by externalising strlen()

Typical saving is 5-20 bytes in each file using strlen().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[libc] Reduce overall code size by externalising strncmp()
Michael Brown [Sun, 4 Nov 2012 23:53:59 +0000 (23:53 +0000)] 
[libc] Reduce overall code size by externalising strncmp()

Typical saving is 20-30 bytes in each file using strncmp().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[libc] Remove unnecessary "cld" instruction from memset()
Michael Brown [Sun, 4 Nov 2012 22:58:42 +0000 (22:58 +0000)] 
[libc] Remove unnecessary "cld" instruction from memset()

Saving is one byte per call to memset().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[libc] Convert memcpy() from a macro to an inline function
Michael Brown [Sun, 4 Nov 2012 22:50:27 +0000 (22:50 +0000)] 
[libc] Convert memcpy() from a macro to an inline function

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[libc] Reduce overall code size by externalising memmove()
Michael Brown [Sun, 4 Nov 2012 22:43:59 +0000 (22:43 +0000)] 
[libc] Reduce overall code size by externalising memmove()

Typical saving is 15-20 bytes in each file using memmove().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[libc] Remove obsolete implementation of memcpy()
Michael Brown [Sun, 4 Nov 2012 21:45:34 +0000 (21:45 +0000)] 
[libc] Remove obsolete implementation of memcpy()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[test] Add self-tests for string functions
Michael Brown [Mon, 12 Nov 2012 16:58:26 +0000 (16:58 +0000)] 
[test] Add self-tests for string functions

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[umalloc] Split largest_memblock() function out from init_eheap()
Michael Brown [Mon, 5 Nov 2012 23:19:16 +0000 (23:19 +0000)] 
[umalloc] Split largest_memblock() function out from init_eheap()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[uaccess] Add userptr_sub() to find the difference between two user pointers
Michael Brown [Mon, 5 Nov 2012 16:09:38 +0000 (16:09 +0000)] 
[uaccess] Add userptr_sub() to find the difference between two user pointers

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[list] Reduce overall code size by externalising many list functions
Michael Brown [Fri, 2 Nov 2012 16:12:56 +0000 (16:12 +0000)] 
[list] Reduce overall code size by externalising many list functions

Typical saving is 10-20 bytes in each file using list functions.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Make version.o depend on the git index
Thomas Miletich [Fri, 2 Nov 2012 15:00:09 +0000 (15:00 +0000)] 
[build] Make version.o depend on the git index

The version number string is currently updated only if version.o
happens to be rebuilt due to changes in its dependencies.  Add a
dependency upon the git index, so that the version number is updated
after any checkout.

Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Include version number within only a single object file
Michael Brown [Fri, 2 Nov 2012 14:46:39 +0000 (14:46 +0000)] 
[build] Include version number within only a single object file

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Inhibit .eh_frame on newer gcc versions
Michael Brown [Fri, 2 Nov 2012 12:15:36 +0000 (12:15 +0000)] 
[build] Inhibit .eh_frame on newer gcc versions

Using -fno-dwarf2-cfi-asm is not sufficient to prevent the .eh_frame
section from being generated on newer versions of gcc.  Add
-fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables;
this is sufficient to inhibit the .eh_frame section on gcc 4.7.1.

This does not affect the overall binary size, but does fix the numbers
reported by "size" for individual object files.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Use -maccumulate-outgoing-args if required by gcc
Michael Brown [Fri, 2 Nov 2012 13:21:52 +0000 (13:21 +0000)] 
[build] Use -maccumulate-outgoing-args if required by gcc

Current versions of gcc require -maccumulate-outgoing-args if any
sysv_abi functions call ms_abi functions.  This requirement is likely
to be lifted in future gcc versions, so test explicitly to see if the
current version of gcc requires -maccumulate-outgoing-args.

This problem is currently masked since the implied
-fasynchronous-unwind-tables (which is the default in current gcc
versions) implies -maccumulate-outgoing-args.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[forcedeth] Increase TX ring size to prevent dropped packets
Michael Brown [Mon, 29 Oct 2012 10:14:00 +0000 (10:14 +0000)] 
[forcedeth] Increase TX ring size to prevent dropped packets

Commit 947976d ("[netdevice] Do not force a poll on net_tx()")
requires network devices to have TX rings that are sufficiently large
to allow a transmitted response to all packets received during a
single poll.

Reported-by: Robin Smidsrød <robin@smidsrod.no>
Tested-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[intel] Poll RX queue if hardware reports RX overflow
Michael Brown [Thu, 25 Oct 2012 23:09:09 +0000 (16:09 -0700)] 
[intel] Poll RX queue if hardware reports RX overflow

The Intel NIC emulation in some versions of VMware seems to suffer
from a flaw whereby the Interrupt Cause Register (ICR) fails to assert
the usual "packet received" bit (ICR.RXT0) if a receive overflow
(ICR.RXO) has also occurred.

Work around this flaw by polling for completed descriptors whenever
either ICR.RXT0 or ICR.RXO is asserted.

Reported-by: Miroslav Halas <miroslav.halas@bankofamerica.com>
Debugged-by: Miroslav Halas <miroslav.halas@bankofamerica.com>
Tested-by: Miroslav Halas <miroslav.halas@bankofamerica.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[hermon] Use PCI VPD for non-volatile option storage
Michael Brown [Mon, 15 Oct 2012 12:04:31 +0000 (13:04 +0100)] 
[hermon] Use PCI VPD for non-volatile option storage

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[readline] Allow readline_history() to return a meaningful status
Michael Brown [Thu, 25 Oct 2012 06:21:49 +0000 (23:21 -0700)] 
[readline] Allow readline_history() to return a meaningful status

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[netdevice] Clear network device setting before unregistering
Michael Brown [Thu, 25 Oct 2012 05:44:00 +0000 (22:44 -0700)] 
[netdevice] Clear network device setting before unregistering

Avoid memory leaks by clearing any (non-child) settings immediately
before unregistering the network device settings block.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[settings] Prefill existing setting value in "read" command
Michael Brown [Thu, 25 Oct 2012 03:42:21 +0000 (20:42 -0700)] 
[settings] Prefill existing setting value in "read" command

When prompting the user to enter a setting value via the "read"
command, prefill the input buffer with the setting's current value.

Requested-by: Ján Ondrej (SAL) <ondrejj@salstar.ks>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[readline] Allow a prefilled input string to be provided
Michael Brown [Thu, 25 Oct 2012 03:16:15 +0000 (20:16 -0700)] 
[readline] Allow a prefilled input string to be provided

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[settings] Add fetchf_named_setting_copy()
Michael Brown [Thu, 25 Oct 2012 03:41:39 +0000 (20:41 -0700)] 
[settings] Add fetchf_named_setting_copy()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[netdevice] Do not force a poll on net_tx()
Michael Brown [Wed, 24 Oct 2012 20:26:51 +0000 (13:26 -0700)] 
[netdevice] Do not force a poll on net_tx()

Including a netdev_poll() within net_tx() can cause the net_step()
loop to end up processing hundreds or thousands of packets within a
single step, since each received packet being processed may trigger a
response which, in turn causes a poll for further received packets.

Network devices must now ensure that the TX ring is at least as large
as the RX ring, in order to avoid running out of TX descriptors.  This
should not cause any problems; unlike the RX ring, there is no
substantial memory cost incurred by increasing the TX ring size.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[intel] Report receive overruns via network device errors
Michael Brown [Wed, 24 Oct 2012 18:21:34 +0000 (11:21 -0700)] 
[intel] Report receive overruns via network device errors

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Add EFI_COMPONENT_NAME2_PROTOCOL instance for each SNP device
Michael Brown [Tue, 23 Oct 2012 21:05:03 +0000 (14:05 -0700)] 
[efi] Add EFI_COMPONENT_NAME2_PROTOCOL instance for each SNP device

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[autoboot] Avoid excess backspacing after displaying Ctrl-B prompt
Michael Brown [Sun, 21 Oct 2012 01:30:19 +0000 (18:30 -0700)] 
[autoboot] Avoid excess backspacing after displaying Ctrl-B prompt

Remove the newline from the "Press Ctrl-B..." prompt string, so that
prompt() does not attempt to backspace beyond the start of the line.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Add missing RC_TO_EFIRC() conversion
Michael Brown [Mon, 22 Oct 2012 15:42:53 +0000 (08:42 -0700)] 
[efi] Add missing RC_TO_EFIRC() conversion

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[util] Fix uninitialised-variable warning in einfo.c
Michael Brown [Mon, 22 Oct 2012 15:26:43 +0000 (08:26 -0700)] 
[util] Fix uninitialised-variable warning in einfo.c

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[test] Remove self-test for empty formatted setting value
Michael Brown [Sat, 20 Oct 2012 21:44:34 +0000 (14:44 -0700)] 
[test] Remove self-test for empty formatted setting value

Commit 5ad445f ("[settings] Treat an empty formatted value as meaning
"delete setting"") (re)defined the semantics of storing an empty
formatted setting as meaning "delete setting".

Remove the existing self-test using an empty formatted hex setting
value, since it no longer conforms to the defined semantics.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[arp] Increase robustness of ARP discarder
Michael Brown [Fri, 19 Oct 2012 22:03:38 +0000 (23:03 +0100)] 
[arp] Increase robustness of ARP discarder

Take ownership from the ARP cache at the start of arp_destroy(), to
ensure that no code path can lead to arp_destroy() being re-entered.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Expose net device non-volatile settings via HII
Michael Brown [Thu, 11 Oct 2012 14:02:50 +0000 (15:02 +0100)] 
[efi] Expose net device non-volatile settings via HII

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Split SNP HII functionality into a separate file
Michael Brown [Wed, 18 Jul 2012 17:14:04 +0000 (18:14 +0100)] 
[efi] Split SNP HII functionality into a separate file

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[nvo] Expose nvo_applies()
Michael Brown [Mon, 15 Oct 2012 11:41:51 +0000 (12:41 +0100)] 
[nvo] Expose nvo_applies()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[nvo] Expose non-volatile options block name
Michael Brown [Mon, 15 Oct 2012 02:08:41 +0000 (03:08 +0100)] 
[nvo] Expose non-volatile options block name

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[settings] Treat an empty formatted value as meaning "delete setting"
Michael Brown [Mon, 15 Oct 2012 11:41:04 +0000 (12:41 +0100)] 
[settings] Treat an empty formatted value as meaning "delete setting"

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[settings] Expose find_child_settings()
Michael Brown [Mon, 15 Oct 2012 02:08:12 +0000 (03:08 +0100)] 
[settings] Expose find_child_settings()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[libc] Add wcslen() function
Michael Brown [Sun, 14 Oct 2012 23:36:48 +0000 (00:36 +0100)] 
[libc] Add wcslen() function

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[serial] Don't enable serial console without serial support
Shao Miller [Fri, 5 Oct 2012 14:14:12 +0000 (15:14 +0100)] 
[serial] Don't enable serial console without serial support

serial_console_init() would enable serial console support without
knowing if the serial driver succeeded or not.  As a result, the
serial console would interfere with a normal keyboard on a system
lacking serial support.

Reported-by: Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
Signed-off-by: Shao Miller <sha0.miller@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[int13] Do not zero %edx when jumping to a boot sector
Michael Brown [Fri, 5 Oct 2012 14:02:30 +0000 (15:02 +0100)] 
[int13] Do not zero %edx when jumping to a boot sector

Commit 73eb3f1 ("[int13] Zero all possible registers when jumping to a
boot sector") introduced a regression preventing the SAN-booting of
boot sectors which rely upon %dl containing the correct drive number
(such as most CD-ROM boot sectors).

Fix by not zeroing %edx.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Mark SNP formset compliant with IBM's Unified Configuration Manager
Michael Brown [Tue, 17 Jul 2012 23:34:04 +0000 (00:34 +0100)] 
[efi] Mark SNP formset compliant with IBM's Unified Configuration Manager

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[contrib] Enable bochs debug port by default
Michael Brown [Fri, 5 Oct 2012 12:23:34 +0000 (13:23 +0100)] 
[contrib] Enable bochs debug port by default

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[contrib] Allow more space for Bochs option ROM
Michael Brown [Fri, 5 Oct 2012 12:23:05 +0000 (13:23 +0100)] 
[contrib] Allow more space for Bochs option ROM

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[tls] Fix potential memory leak
Michael Brown [Fri, 28 Sep 2012 09:54:07 +0000 (10:54 +0100)] 
[tls] Fix potential memory leak

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[tls] Fix uninitialised variable
Michael Brown [Fri, 28 Sep 2012 09:52:17 +0000 (10:52 +0100)] 
[tls] Fix uninitialised variable

Reported-by: Christian Hesse <list@eworm.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[tls] Split received records over multiple I/O buffers
Michael Brown [Wed, 26 Sep 2012 20:42:23 +0000 (21:42 +0100)] 
[tls] Split received records over multiple I/O buffers

TLS servers are not obliged to implement the RFC3546 maximum fragment
length extension, and many common servers (including OpenSSL, as used
in Apache's mod_ssl) do not do so.  iPXE may therefore have to cope
with TLS records of up to 16kB.  Allocations for 16kB have a
non-negligible chance of failing, causing the TLS connection to abort.

Fix by maintaining the received record as a linked list of I/O
buffers, rather than a single contiguous buffer.  To reduce memory
pressure, we also decrypt in situ, and deliver the decrypted data via
xfer_deliver_iob() rather than xfer_deliver_raw().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[crypto] Allow in-place CBC decryption
Michael Brown [Thu, 27 Sep 2012 00:37:06 +0000 (01:37 +0100)] 
[crypto] Allow in-place CBC decryption

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[test] Add speed tests for cipher algorithms
Michael Brown [Wed, 26 Sep 2012 14:27:33 +0000 (15:27 +0100)] 
[test] Add speed tests for cipher algorithms

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[test] Add speed tests for digest algorithms
Michael Brown [Wed, 26 Sep 2012 13:54:02 +0000 (14:54 +0100)] 
[test] Add speed tests for digest algorithms

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Provide guaranteed space in transmitted packets
Michael Brown [Fri, 14 Sep 2012 16:49:53 +0000 (17:49 +0100)] 
[efi] Provide guaranteed space in transmitted packets

eIPoIB requires space to expand a transmitted ARP packet.  This
guarantee is met by ensuring that a transmitted packet consists of at
least MAX_LL_HEADER_LEN bytes from the start of the I/O buffer up to
the end of the link-layer header, and at least IOB_ZLEN bytes
thereafter.

Adjust the I/O buffer allocation for SNP transmitted packets to ensure
that this guarantee is met.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[int13] Zero all possible registers when jumping to a boot sector
Michael Brown [Fri, 14 Sep 2012 14:42:54 +0000 (15:42 +0100)] 
[int13] Zero all possible registers when jumping to a boot sector

At least one boot sector (the DUET boot sector used for bootstrapping
EFI from a non-EFI system) fails to initialise the high words of
registers before using them in calculations, leading to undefined
behaviour.

Work around such broken boot sectors by explicitly zeroing the
contents of all registers apart from %cs:%ip and %ss:%sp.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[int13] Use correct size when estimating floppy disk geometry
Michael Brown [Fri, 14 Sep 2012 14:04:53 +0000 (15:04 +0100)] 
[int13] Use correct size when estimating floppy disk geometry

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[console] Add support for the bochs/qemu debug port console
Michael Brown [Mon, 10 Sep 2012 14:58:02 +0000 (15:58 +0100)] 
[console] Add support for the bochs/qemu debug port console

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[cmdline] Add standalone "nslookup" command
Patrick Plenefisch [Wed, 29 Aug 2012 23:21:33 +0000 (00:21 +0100)] 
[cmdline] Add standalone "nslookup" command

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[smbios] Default to "hex" type for non-string SMBIOS settings
Michael Brown [Mon, 10 Sep 2012 14:29:36 +0000 (15:29 +0100)] 
[smbios] Default to "hex" type for non-string SMBIOS settings

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[settings] Use a generic setting's own type as its default type
Michael Brown [Fri, 31 Aug 2012 02:52:06 +0000 (03:52 +0100)] 
[settings] Use a generic setting's own type as its default type

When fetching a named setting using a name that does not explicitly
specify a type, default to using the type stored when the setting was
created, rather than always defaulting to "string".  This allows the
behaviour of user-defined settings to match the behaviour of
predefined settings (which have a sensible default type).

For example:

  set server:ipv4 192.168.0.1
  echo ${server}

will now print "192.168.0.1", rather than trying to print out the raw
IPv4 address bytes as a string.

The downside of this change is that existing tricks for printing
special characters within scripts may require (backwards-compatible)
modification.  For example, the "clear screen" sequence:

  set esc:hex 1b
  set cls ${esc}[2J
  echo ${cls}

will now have to become

  set esc:hex 1b
  set cls ${esc:string}[2J  # Must now explicitly specify ":string"
  echo ${cls}

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[sdi] Add support for SDI images
Michael Brown [Tue, 4 Sep 2012 00:26:48 +0000 (01:26 +0100)] 
[sdi] Add support for SDI images

Add support (disabled by default) for booting .sdi images as used by
Windows XP Embedded.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[ipoib] Expose Ethernet-compatible eIPoIB link-layer addresses and headers
Michael Brown [Wed, 29 Aug 2012 22:34:14 +0000 (23:34 +0100)] 
[ipoib] Expose Ethernet-compatible eIPoIB link-layer addresses and headers

Almost all clients of the raw-packet interfaces (UNDI and SNP) can
handle only Ethernet link layers.  Expose an Ethernet-compatible link
layer to local clients, while remaining compatible with IPoIB on the
wire.  This requires manipulation of ARP (but not DHCP) packets within
the IPoIB driver.

This is ugly, but it's the only viable way to allow IPoIB devices to
be driven via the raw-packet interfaces.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[infiniband] Include destination address vector in ib_complete_recv()
Michael Brown [Fri, 31 Aug 2012 00:48:49 +0000 (01:48 +0100)] 
[infiniband] Include destination address vector in ib_complete_recv()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[infiniband] Use explicit "source" and "dest" address vector parameter names
Michael Brown [Thu, 30 Aug 2012 23:47:37 +0000 (00:47 +0100)] 
[infiniband] Use explicit "source" and "dest" address vector parameter names

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[infiniband] Allow queue pairs to have a custom allocator for receive iobufs
Michael Brown [Wed, 29 Aug 2012 21:11:58 +0000 (22:11 +0100)] 
[infiniband] Allow queue pairs to have a custom allocator for receive iobufs

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[iobuf] Allow allocation of I/O buffers with a specified alignment offset
Michael Brown [Wed, 29 Aug 2012 15:13:56 +0000 (16:13 +0100)] 
[iobuf] Allow allocation of I/O buffers with a specified alignment offset

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[malloc] Allow allocation of memory with a specified alignment offset
Michael Brown [Wed, 29 Aug 2012 14:35:46 +0000 (15:35 +0100)] 
[malloc] Allow allocation of memory with a specified alignment offset

Allow for allocation of memory blocks having a specified offset from a
specified physical alignment, such as being 12 bytes before a 2kB
boundary.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[retry] Expose retry_poll() to explicitly poll all running timers
Michael Brown [Fri, 31 Aug 2012 18:50:56 +0000 (19:50 +0100)] 
[retry] Expose retry_poll() to explicitly poll all running timers

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[ethernet] Expose eth_broadcast as a global constant
Michael Brown [Thu, 30 Aug 2012 14:58:58 +0000 (15:58 +0100)] 
[ethernet] Expose eth_broadcast as a global constant

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Add missing #include <config/local/sideband.h>
Anton D. Kachalov [Sun, 26 Aug 2012 23:28:49 +0000 (00:28 +0100)] 
[build] Add missing #include <config/local/sideband.h>

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Display commands for dependency generation when building with V=1
Anton D. Kachalov [Sun, 26 Aug 2012 23:24:23 +0000 (00:24 +0100)] 
[build] Display commands for dependency generation when building with V=1

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[tls] Disambiguate most error causes
Michael Brown [Sat, 25 Aug 2012 03:07:35 +0000 (04:07 +0100)] 
[tls] Disambiguate most error causes

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[realtek] Force EEPROM CS low before disabling EEPROM access mode
Michael Brown [Fri, 24 Aug 2012 15:44:29 +0000 (16:44 +0100)] 
[realtek] Force EEPROM CS low before disabling EEPROM access mode

Some RTL8169 cards seem to drive the EEPROM CS line high (i.e. active)
when 9346CR.EEM is set to "normal operating mode", with the result
that the CS line is never deasserted.  The symptom of this is that the
first read from the EEPROM will work, while all subsequent reads will
return garbage data.

Reported-by: Thomas Miletich <thomas.miletich@gmail.com>
Debugged-by: Thomas Miletich <thomas.miletich@gmail.com>
Tested-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[bitbash] Add optional open() and close() methods for bit-bashing interfaces
Michael Brown [Fri, 24 Aug 2012 16:25:14 +0000 (17:25 +0100)] 
[bitbash] Add optional open() and close() methods for bit-bashing interfaces

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[realtek] Forcibly enable advertisement of 1000Mbps speeds
Michael Brown [Thu, 23 Aug 2012 21:44:20 +0000 (22:44 +0100)] 
[realtek] Forcibly enable advertisement of 1000Mbps speeds

Some RTL8169 cards (observed with an RTL8169SC) power up advertising
only 100Mbps, despite being capable of 1000Mbps.  Forcibly enable
advertisement of 1000Mbps on any RTL8169-like card.

This change relies on the assumption that the CTRL1000 register will
not exist on 100Mbps-only RTL8169 cards such as the RTL8101.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[mii] Add separate mii_restart() function
Michael Brown [Thu, 23 Aug 2012 20:25:51 +0000 (21:25 +0100)] 
[mii] Add separate mii_restart() function

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[realtek] Enable DAC only when built as a 64-bit binary
Michael Brown [Thu, 23 Aug 2012 12:35:19 +0000 (13:35 +0100)] 
[realtek] Enable DAC only when built as a 64-bit binary

Some RTL8169 cards (observed with an RTL8169SC) crash and burn if DAC
is enabled, even if only 32-bit addresses are used.  Observed
behaviour includes system lockups and repeated transmission of garbage
data onto the wire.

This seems to be a known problem.  The Linux r8169 driver disables DAC
by default and provides a "use_dac" module parameter.

There appears to be no known test for determining whether or not DAC
will work.  As a workaround, enable DAC only if we are built as as
64-bit binary.  This at least eliminates the problem in the common
case of a 32-bit build, which will never use 64-bit addresses anyway.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[realtek] Use read-modify-write to check for C+ Command register
Michael Brown [Thu, 23 Aug 2012 11:38:37 +0000 (12:38 +0100)] 
[realtek] Use read-modify-write to check for C+ Command register

Some bits in the C+ Command register are always one.  Testing for the
presence of the register must allow for this.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[realtek] Use explicit value for TCR.MXDMA
Michael Brown [Thu, 23 Aug 2012 12:27:31 +0000 (13:27 +0100)] 
[realtek] Use explicit value for TCR.MXDMA

Some RTL8169 cards (observed with an RTL8169SC) power up with
TCR.MXDMA set to 16 bytes.  While this does not prevent proper
operation, it almost certainly degrades performance.

Fix by explicitly setting TCR.MXDMA to "unlimited".

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[realtek] Use explicit values for RCR.RXFTH and RCR.MXDMA
Michael Brown [Thu, 23 Aug 2012 11:25:08 +0000 (12:25 +0100)] 
[realtek] Use explicit values for RCR.RXFTH and RCR.MXDMA

Some RTL8169 cards (observed with an RTL8169SC) power up with invalid
values in RCR.RXFTH and RCR.MXDMA, causing receive DMA to fail.  Fix
by setting explicit values for both fields.

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