]> git.ipfire.org Git - thirdparty/ipxe.git/log
thirdparty/ipxe.git
14 years ago[build] Eliminate unused sections at link-time
Michael Brown [Tue, 22 Feb 2011 19:36:24 +0000 (19:36 +0000)] 
[build] Eliminate unused sections at link-time

Use -ffunction-sections, -fdata-sections, and --gc-sections to
automatically prune out any unreferenced sections.

This saves around 744 bytes (uncompressed) from the rtl8139.rom build.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[int13] Add missing "static" modifier
Michael Brown [Tue, 22 Feb 2011 19:26:33 +0000 (19:26 +0000)] 
[int13] Add missing "static" modifier

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[efi] Provide space for storing the EFI driver name
Michael Brown [Tue, 22 Feb 2011 17:11:37 +0000 (17:11 +0000)] 
[efi] Provide space for storing the EFI driver name

Commit d7736fb ("[efi] Allow EFI to control PCI bus enumeration")
introduced a bug in which the EFI driver name became an
(uninitialised) pointer rather than an array.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[efi] Allow EFI to control PCI bus enumeration
Michael Brown [Thu, 17 Feb 2011 00:27:51 +0000 (00:27 +0000)] 
[efi] Allow EFI to control PCI bus enumeration

EFI performs its own PCI bus enumeration.  Respect this, and start
controlling devices only when instructed to do so by EFI.

As a side benefit, we should now correctly create multiple SNP
instances for multi-port devices.

This should also fix the problem of failing to enumerate devices
because the PCI bridges have not yet been enabled at the time the iPXE
driver is loaded.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[efi] Rename efi_pci.h to efi_pci_api.h
Michael Brown [Mon, 14 Feb 2011 01:37:44 +0000 (01:37 +0000)] 
[efi] Rename efi_pci.h to efi_pci_api.h

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pci] Modularise PCI device support
Michael Brown [Thu, 10 Feb 2011 13:43:58 +0000 (13:43 +0000)] 
[pci] Modularise PCI device support

Some operating environments require (or at least prefer) that we do
not perform our own PCI bus scan, but deal only with specified
devices.  Modularise the PCI core to allow for this.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pci] Make driver PCI ID a property of the PCI device
Michael Brown [Sat, 12 Feb 2011 01:11:57 +0000 (01:11 +0000)] 
[pci] Make driver PCI ID a property of the PCI device

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pci] Replace pci_max_bus() with pci_num_bus()
Michael Brown [Sat, 12 Feb 2011 02:08:28 +0000 (02:08 +0000)] 
[pci] Replace pci_max_bus() with pci_num_bus()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pci] Use single "busdevfn" field in struct pci_device
Michael Brown [Wed, 9 Feb 2011 00:32:58 +0000 (00:32 +0000)] 
[pci] Use single "busdevfn" field in struct pci_device

Merge the "bus" and "devfn" fields into a single "busdevfn" field, to
match the format used by the majority of external code.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[bitops] Add missing __attribute__ (( packed ))
Michael Brown [Wed, 16 Feb 2011 18:42:26 +0000 (18:42 +0000)] 
[bitops] Add missing __attribute__ (( packed ))

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[hermon] Add missing __attribute__ (( packed ))
Michael Brown [Wed, 16 Feb 2011 18:38:26 +0000 (18:38 +0000)] 
[hermon] Add missing __attribute__ (( packed ))

On 64-bit builds, MLX_DECLARE_STRUCT() produces a structure that is
always a multiple of 64 bits long, causing the HCR structure to be
over-length by one dword.  This in turn causes hermon_cmd() to write
beyond the end of the HCR, which causes commands to fail.

Reported-by: Itay Gazit <itayg@mellanox.co.il>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[hermon] Force link speed to SDR
Itay Gazit [Tue, 8 Feb 2011 13:06:30 +0000 (15:06 +0200)] 
[hermon] Force link speed to SDR

SDR link comes up much faster than other speeds.

Signed-off-by: Itay Gazit <itaygazit@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[hermon] Use circular event queue
Itay Gazit [Mon, 7 Feb 2011 07:39:59 +0000 (09:39 +0200)] 
[hermon] Use circular event queue

Avoid memory leak of untreated events by having circular event queue
operation.

Signed-off-by: Itay Gazit <itaygazit@gmail.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[hermon] Update PRM file with latest changes
Itay Gazit [Mon, 7 Feb 2011 06:58:17 +0000 (08:58 +0200)] 
[hermon] Update PRM file with latest changes

Signed-off-by: Itay Gazit <itaygazit@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[hermon] Fix hermon_cmd_sense_port() to use inline output
Itay Gazit [Thu, 28 Oct 2010 13:53:53 +0000 (15:53 +0200)] 
[hermon] Fix hermon_cmd_sense_port() to use inline output

Signed-off-by: Itay Gazit <itaygazit@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pcbios] Merge adjacent memory regions of same type
Eduardo Habkost [Wed, 16 Feb 2011 18:41:24 +0000 (16:41 -0200)] 
[pcbios] Merge adjacent memory regions of same type

Some BIOSes can report multiple memory regions which may be adjacent
and the same type.  Since only the first region is used in the
mboot.c32 layer it's possible to run out of memory when loading all of
the boot modules.  One may get around this problem by having iPXE
merge these memory regions internally.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[3c90x] Clean up reset code
Thomas Miletich [Tue, 1 Feb 2011 22:10:18 +0000 (23:10 +0100)] 
[3c90x] Clean up reset code

Remove duplicate hardware resets, remove network interface logic
reset.

This also fixes a bug where some 3c905C variants would return bogus
EEPROM values because of a too short delay after the network reset.

Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Reported-by: Peter Huewe <peterhuewe@gmx.de>
Tested-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[3c90x] More fine-grained debugging levels
Thomas Miletich [Tue, 1 Feb 2011 22:10:17 +0000 (23:10 +0100)] 
[3c90x] More fine-grained debugging levels

DBG is reserved for errors and important warnings only.
DBG2 for additional information, e.g. "received packet".
DBGP is used to print the name of every function as it is called.

Signed-off-by: Thomas Miletich<thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[autoboot] Cope properly with empty DHCP filenames
Michael Brown [Tue, 1 Feb 2011 04:25:38 +0000 (04:25 +0000)] 
[autoboot] Cope properly with empty DHCP filenames

This (hopefully) fixes a regression introduced in commit e088892
("[autoboot] Connect SAN disk during a filename boot, if applicable").

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[uri] Add uri_has_path()
Michael Brown [Tue, 1 Feb 2011 04:25:19 +0000 (04:25 +0000)] 
[uri] Add uri_has_path()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[autoboot] Avoid using uri_dup() for constructed TFTP URI
Michael Brown [Tue, 1 Feb 2011 02:56:06 +0000 (02:56 +0000)] 
[autoboot] Avoid using uri_dup() for constructed TFTP URI

uri_dup() chokes on duplicating a URI with a path that does not begin
with a slash.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[autoboot] Allow setting expansions in filename and root-path
Michael Brown [Fri, 28 Jan 2011 00:24:05 +0000 (00:24 +0000)] 
[autoboot] Allow setting expansions in filename and root-path

Allow the DHCP filename and root-path to contain settings expansions,
such as

  http://boot.ipxe.org/demo/boot.php?mac=${mac:hexhyp}

Originally-implemented-by: Jarrod Johnson <jarrod.b.johnson@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Generalise expand_command() to expand_settings()
Michael Brown [Fri, 28 Jan 2011 00:16:18 +0000 (00:16 +0000)] 
[settings] Generalise expand_command() to expand_settings()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[autoboot] Connect SAN disk during a filename boot, if applicable
Michael Brown [Thu, 27 Jan 2011 18:48:47 +0000 (18:48 +0000)] 
[autoboot] Connect SAN disk during a filename boot, if applicable

For performing installations direct to a SAN target, it can be very
useful to hook a SAN disk and then proceed to perform a filename boot.
For example, the user may wish to hook the (empty) SAN installation
disk and then boot into the OS installer via TFTP.  This provides an
alternative mechanism to using "keep-san" and relying on the BIOS to
fall through to boot from the installation media, which is unreliable
on many BIOSes.

When a root-path is specified in addition to a boot filename, attempt
to hook the root-path as a SAN disk before booting from the specified
filename.  Since the root-path may be used for non-SAN purposes
(e.g. an NFS root mount point), ignore the root-path if it contains a
URI scheme that we do not support.

Originally-implemented-by: Jarrod Johnson <jarrod.b.johnson@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[init] Remove concept of "shutdown exit flags"
Michael Brown [Thu, 27 Jan 2011 20:35:48 +0000 (20:35 +0000)] 
[init] Remove concept of "shutdown exit flags"

Remove the concept of shutdown exit flags, and replace it with a
counter used to keep track of exposed interfaces that require devices
to remain active.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[xfer] Expose xfer_uri_opener()
Michael Brown [Thu, 27 Jan 2011 18:46:07 +0000 (18:46 +0000)] 
[xfer] Expose xfer_uri_opener()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[vxge] Add support for new function mode "multi-function 8 Direct IO"
Masroor Vettuparambil [Thu, 20 Jan 2011 06:34:08 +0000 (22:34 -0800)] 
[vxge] Add support for new function mode "multi-function 8 Direct IO"

Support a new function mode "multi-function 8 Direct IO" which is used
in ESX Direct I/O configuration.

Update driver version to 3.5.0.1

Signed-off-by: Masroor Vettuparambil <masroor.vettuparambil@exar.com>
Signed-off-by: Sivakumar Subramani <sivakumar.subramani@exar.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[liba20] Rename libflat to liba20
Michael Brown [Wed, 26 Jan 2011 23:23:07 +0000 (23:23 +0000)] 
[liba20] Rename libflat to liba20

libflat no longer has anything to do with flat real mode; it handles
only the A20 gate.  Update library name to match.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[libflat] Remove now-obsolete flatten_real_mode call
Michael Brown [Wed, 26 Jan 2011 23:20:48 +0000 (23:20 +0000)] 
[libflat] Remove now-obsolete flatten_real_mode call

Flat real mode will have been set up as a side-effect of the
protected-mode call invoked during install_block() for .text16.early;
there is no need to do so explicitly.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[prefix] Use 16-bit protected mode for access to high memory
Michael Brown [Wed, 26 Jan 2011 23:04:43 +0000 (23:04 +0000)] 
[prefix] Use 16-bit protected mode for access to high memory

Flat real mode works perfectly on real hardware, but seems to cause
problems for some hypervisors.  Revert to using 16-bit protected mode
(and returning to real mode with 4GB limits, so as not to break PMM
BIOSes).

Allow the code specific to the .mrom format to continue to assume that
flat real mode works, since this format is specific to real hardware.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[contrib] Specify boot order in bochsrc.txt
Michael Brown [Wed, 26 Jan 2011 23:24:23 +0000 (23:24 +0000)] 
[contrib] Specify boot order in bochsrc.txt

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[hermon] Indicate that device does not support interrupts
Michael Brown [Tue, 25 Jan 2011 14:20:26 +0000 (14:20 +0000)] 
[hermon] Indicate that device does not support interrupts

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[infiniband] Indicate that device does not support interrupts
Michael Brown [Tue, 25 Jan 2011 14:19:54 +0000 (14:19 +0000)] 
[infiniband] Indicate that device does not support interrupts

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pxe] Report SUPPORTED_IRQ only if device supports interrupts
Michael Brown [Tue, 25 Jan 2011 14:18:15 +0000 (14:18 +0000)] 
[pxe] Report SUPPORTED_IRQ only if device supports interrupts

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[netdevice] Allow devices to indicate that interrupts are not supported
Michael Brown [Tue, 25 Jan 2011 14:16:11 +0000 (14:16 +0000)] 
[netdevice] Allow devices to indicate that interrupts are not supported

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pci] Auto-resize VPD fields used for non-volatile storage
Michael Brown [Mon, 10 Jan 2011 03:35:34 +0000 (03:35 +0000)] 
[pci] Auto-resize VPD fields used for non-volatile storage

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pci] Add ability to resize a VPD field
Michael Brown [Mon, 10 Jan 2011 03:34:34 +0000 (03:34 +0000)] 
[pci] Add ability to resize a VPD field

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pci] Allow pci_vpd_init() return status to be ignored
Michael Brown [Tue, 11 Jan 2011 01:37:27 +0000 (01:37 +0000)] 
[pci] Allow pci_vpd_init() return status to be ignored

Most xxx_init() functions are void functions with no failure cases.
Allow pci_vpd_init() to be used in the same way.  (Subsequent calls to
pci_vpd_read() etc. will fail if pci_vpd_init() fails.)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[nvo] Allow resizing of non-volatile stored option blocks
Michael Brown [Tue, 11 Jan 2011 00:53:50 +0000 (00:53 +0000)] 
[nvo] Allow resizing of non-volatile stored option blocks

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[nvo] Remove the non-volatile options fragment list
Michael Brown [Tue, 30 Nov 2010 01:10:38 +0000 (01:10 +0000)] 
[nvo] Remove the non-volatile options fragment list

Since its implementation several years ago, no driver has used a
fragment list containing more than a single fragment.  Simplify the
NVO core and the drivers that use it by removing the whole concept of
the fragment list, and using a simple (address,length) pair instead.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[nvs] Allow for non-volatile storage devices without block boundaries
Michael Brown [Tue, 11 Jan 2011 19:56:59 +0000 (19:56 +0000)] 
[nvs] Allow for non-volatile storage devices without block boundaries

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[dhcp] Allow use of custom reallocation functions for DHCP option blocks
Michael Brown [Mon, 10 Jan 2011 23:58:11 +0000 (23:58 +0000)] 
[dhcp] Allow use of custom reallocation functions for DHCP option blocks

Allow functions other than realloc() to be used to reallocate DHCP
option block data, and specify the reallocation function at the time
of calling dhcpopt_init().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[dhcp] Rename length fields for DHCP options
Michael Brown [Tue, 30 Nov 2010 00:31:01 +0000 (00:31 +0000)] 
[dhcp] Rename length fields for DHCP options

Rename "len" to "used_len" and "max_len" to "alloc_len".

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[dhcp] Remove redundant length fields in struct dhcp_packet
Michael Brown [Tue, 30 Nov 2010 00:22:49 +0000 (00:22 +0000)] 
[dhcp] Remove redundant length fields in struct dhcp_packet

The max_len field is never used, and the len field is used only by
dhcp_tx().  Remove these two fields, and perform the necessary trivial
calculation in dhcp_tx() instead.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[hermon] Fix incorrectly-padded sense_port structure
Michael Brown [Fri, 24 Dec 2010 01:10:26 +0000 (01:10 +0000)] 
[hermon] Fix incorrectly-padded sense_port structure

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[igbvf] Add igbvf driver
Alex Williamson [Thu, 16 Dec 2010 03:49:32 +0000 (20:49 -0700)] 
[igbvf] Add igbvf driver

Driver for Intel 82576 based virtual functions, based on Intel source
code available at:

    http://sourceforge.net/projects/e1000  (igbvf-1.0.7)

Based on initial port from Eric Keller <ekeller@princeton.edu>.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[dhcp] Use Ethernet-compatible chaddr, if possible
Michael Brown [Wed, 15 Dec 2010 18:29:20 +0000 (18:29 +0000)] 
[dhcp] Use Ethernet-compatible chaddr, if possible

For IPoIB, we currently use the hardware address (i.e. the eight-byte
GUID) as the DHCP chaddr.  This works, but some PXE servers (notably
Altiris RDP) refuse to respond if the chaddr field is anything other
than six bytes in length.

We already have the notion of an Ethernet-compatible link-layer
address, which is used in the iBFT (the design of which similarly
fails to account for non-Ethernet link layers).  Use this as the first
preferred alternative to the actual link-layer address when
constructing the DHCP chaddr field.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pxe] Improve pxe_udp debug messages
Michael Brown [Wed, 15 Dec 2010 15:25:08 +0000 (15:25 +0000)] 
[pxe] Improve pxe_udp debug messages

The PXE debugging messages have remained pretty much unaltered since
Etherboot 5.4, and are now difficult to read in comparison to most of
the rest of iPXE.

Bring the pxe_udp debug messages up to normal iPXE standards.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[iscsi] Include both DNS addresses in iBFT, if available
Michael Brown [Thu, 9 Dec 2010 15:35:02 +0000 (15:35 +0000)] 
[iscsi] Include both DNS addresses in iBFT, if available

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Add fetch_ipv4_array_setting()
Michael Brown [Thu, 9 Dec 2010 15:34:12 +0000 (15:34 +0000)] 
[settings] Add fetch_ipv4_array_setting()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[debug] Add DBG_MD5() and related macros
Michael Brown [Sun, 5 Dec 2010 19:38:01 +0000 (19:38 +0000)] 
[debug] Add DBG_MD5() and related macros

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[legal] Add missing copyright header and FILE_LICENCE macro
Michael Brown [Sun, 5 Dec 2010 19:19:19 +0000 (19:19 +0000)] 
[legal] Add missing copyright header and FILE_LICENCE macro

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fnrec] Enhance function recording
Michael Brown [Sat, 4 Dec 2010 02:55:11 +0000 (02:55 +0000)] 
[fnrec] Enhance function recording

Enhance the information collected by the function recorder to include
the call site and entry/exit counts.  This allows fnrec.pl to produce
a call tree such as:

    step (from core/getkey.c:46 = 0x17e90) {
      ref_increment (from core/process.c:93 = 0x73ec) { }
      net_step (from core/process.c:96 = 0x73f1) {
        net_poll (from net/netdevice.c:741 = 0xbce6) {
          netdev_poll (from net/netdevice.c:700 = 0xbc58) { }
          netdev_rx_dequeue (from net/netdevice.c:709 = 0xbc65) { }
        }
      }
      ref_decrement (from core/process.c:96 = 0x73f9) { }
    }

Note that inlined functions are reported, confusingly, as extra calls
to the *containing* function.  Minimise this confusion by adding the
attribute "no_instrument_function" to all functions declared as
inline.  (Static functions that have been inlined autonomously by gcc
will still be problematic, but these are far fewer in number.)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pxe] Set correct PktType in PXENV_UNDI_ISR
Michael Brown [Mon, 6 Dec 2010 18:33:57 +0000 (18:33 +0000)] 
[pxe] Set correct PktType in PXENV_UNDI_ISR

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pxe] Avoid touching fields that may not exist in PXENV_UNDI_GET_NIC_TYPE
Michael Brown [Sat, 4 Dec 2010 21:32:00 +0000 (21:32 +0000)] 
[pxe] Avoid touching fields that may not exist in PXENV_UNDI_GET_NIC_TYPE

Earlier versions of the PXE specification do not have the SubVendor_ID
and SubDevice_ID fields, and some NBPs may not provide space for them.
Avoid overwriting the contents of these fields, just in case.

This is similar to the problem with the BufferLimit field in
PXENV_GET_CACHED_INFO.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[cmdline] Add "reboot" command
Michael Brown [Sat, 4 Dec 2010 02:51:26 +0000 (02:51 +0000)] 
[cmdline] Add "reboot" command

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[r8169] Disabling IRQs should not also acknowledge the IRQs
Michael Brown [Fri, 3 Dec 2010 20:55:59 +0000 (20:55 +0000)] 
[r8169] Disabling IRQs should not also acknowledge the IRQs

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[legal] Add FILE_LICENCE macro to some GPL-v2-or-later files
Shao Miller [Sat, 20 Mar 2010 17:09:39 +0000 (13:09 -0400)] 
[legal] Add FILE_LICENCE macro to some GPL-v2-or-later files

Changes were made to files where the licence text within the files
themselves confirms that the files are GPL version 2 or later.

Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[legal] Add FILE_LICENCE macro to some GPL-v2 files
Shao Miller [Sat, 20 Mar 2010 22:05:59 +0000 (18:05 -0400)] 
[legal] Add FILE_LICENCE macro to some GPL-v2 files

Changes were made to files where the licence text within the files
themselves confirms that the files are GPL version 2.

Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[libflat] Test A20 gate without switching to flat real mode
Michael Brown [Fri, 3 Dec 2010 04:44:10 +0000 (04:44 +0000)] 
[libflat] Test A20 gate without switching to flat real mode

Use the real-mode address ffff:0010 to access the linear address
0x100000, and so test whether or not the A20 gate is enabled without
requiring a switch into flat real mode (or some other addressing
mode).

This speeds up CPU mode transitions, and also avoids breaking the NBP
from IBM's Tivoli Provisioning Manager for Operating System
Deployment.  This NBP makes some calls to iPXE in VM86 mode rather
than true real mode and does not correctly emulate our transition into
flat real mode.

Interestingly, Tivoli's VMM *does* allow us to switch into protected
mode (though it patches our GDT so that we execute in ring 1 rather
than ring 0).  However, paging is still disabled and we have a 4GB
segment limit.  Being in ring 1 does not, therefore, restrict us in
any meaningful way; this has been verified by deliberately writing
garbage over Tivoli's own GDT (at address 0x02201010) during a
nominally VM86-mode PXE API call.  It's unclear precisely what
protection this VMM is supposed to be offering.

Suggested-by: Joshua Oreman <oremanj@rwcr.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[hermon] Work around hardware stripping of VLAN tags
Michael Brown [Wed, 1 Dec 2010 18:51:29 +0000 (18:51 +0000)] 
[hermon] Work around hardware stripping of VLAN tags

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[vlan] Expose vlan_find() to network card drivers
Michael Brown [Wed, 1 Dec 2010 18:46:50 +0000 (18:46 +0000)] 
[vlan] Expose vlan_find() to network card drivers

Some network cards automatically strip the VLAN header, providing the
VLAN tag via a side channel such as a completion queue entry.  These
cards need to be able to report receive completions directly against
the relevant VLAN device.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[vlan] Use "-" instead of "." as separator in VLAN device names
Michael Brown [Wed, 1 Dec 2010 17:15:52 +0000 (17:15 +0000)] 
[vlan] Use "-" instead of "." as separator in VLAN device names

VLAN device names have the form "netX.Y", e.g. "net0.5" for VLAN 5 on
net0.  This use of "." conflicts with the use of "." as the
hierarchical separator in settings block names, with the result that
VLAN device settings cannot be accessed by name.

It would be trivial to treat the VLAN device settings as being a child
of the trunk device settings, but this would cause the VLAN device
settings to be applied to the trunk device: for example, setting
"net0.5/ip" would then apply the IP address to both net0.5 and net0.

Fix by changing the VLAN device name to use "-" instead of ".": the
VLAN device "net0.5" is now "net0-5".

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Apply settings block name in register_settings()
Michael Brown [Wed, 1 Dec 2010 16:34:23 +0000 (16:34 +0000)] 
[settings] Apply settings block name in register_settings()

Pass the settings block name as a parameter to register_settings(),
rather than defining it with settings_init() (and then possibly
changing it by directly manipulating settings->name).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[iscsi] Disambiguate the common EINVAL cases
Michael Brown [Wed, 1 Dec 2010 01:23:50 +0000 (01:23 +0000)] 
[iscsi] Disambiguate the common EINVAL cases

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[dns] Disambiguate "no nameserver" and "no DNS record" errors
Michael Brown [Wed, 1 Dec 2010 00:47:09 +0000 (00:47 +0000)] 
[dns] Disambiguate "no nameserver" and "no DNS record" errors

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[hermon] Fix inconsistent information in HERMON_SET_PORT_GENERAL_PARAM
Michael Brown [Mon, 29 Nov 2010 17:18:49 +0000 (17:18 +0000)] 
[hermon] Fix inconsistent information in HERMON_SET_PORT_GENERAL_PARAM

pptx and pfctx should not be set together, nor should pprx and pfcrx.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[script] Remove "Aborting on <line>" message
Michael Brown [Mon, 29 Nov 2010 14:38:03 +0000 (14:38 +0000)] 
[script] Remove "Aborting on <line>" message

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[cmdline] Match user expectations for &&, ||, goto, and exit
Michael Brown [Mon, 29 Nov 2010 14:19:59 +0000 (14:19 +0000)] 
[cmdline] Match user expectations for &&, ||, goto, and exit

The && and || operators should be left-associative, since that is how
they are treated in most other languages (including C and Unix
shell).  For example, in the command:

  dhcp net0 && goto dhcp_ok || echo No DHCP on net0

if the "dhcp net0" fails then the "echo" should be executed.

After an "exit" or a successful "goto", further commands on the same
line should never be executed.  For example:

  goto somewhere && echo This should never be printed
  exit 0 && echo This should never be printed
  exit 1 && echo This should never be printed

An "exit" should cause the current shell or script to terminate and
return the specified exit status to its caller.  For example:

  chain test.ipxe && echo Success || echo Failure
    [in test.ipxe]
    #!ipxe
    exit 0

should echo "Success".

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[parseopt] Allow "0x"-prefixed hexadecimal values in integer-valued options
Michael Brown [Mon, 29 Nov 2010 14:18:43 +0000 (14:18 +0000)] 
[parseopt] Allow "0x"-prefixed hexadecimal values in integer-valued options

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[shell] Add "shell" command
Michael Brown [Sun, 28 Nov 2010 21:09:33 +0000 (21:09 +0000)] 
[shell] Add "shell" command

The "shell" command allows a script to enter an interactive shell,
which is potentially useful for troubleshooting.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Really use __builtin_offsetof() when available
Arkadiusz Miskiewicz [Sun, 28 Nov 2010 18:28:15 +0000 (18:28 +0000)] 
[build] Really use __builtin_offsetof() when available

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Use __builtin_offsetof() when available
Michael Brown [Sun, 28 Nov 2010 17:26:27 +0000 (17:26 +0000)] 
[build] Use __builtin_offsetof() when available

Some newer versions of gcc (observed with a patched gcc 4.5.1) seem to
treat our offsetof() implementation as not being a compile-time
constant.  Fix by using __builtin_offsetof() when available.  (As with
the original offsetof() macro, this code is copied from the Linux
kernel's stddef.h.)

Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[hermon] Enable priority flow control on the FCoE priority
Michael Brown [Sat, 27 Nov 2010 20:38:35 +0000 (20:38 +0000)] 
[hermon] Enable priority flow control on the FCoE priority

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fcoe] Use only the first instance of a FIP descriptor
Michael Brown [Sat, 27 Nov 2010 15:48:01 +0000 (15:48 +0000)] 
[fcoe] Use only the first instance of a FIP descriptor

Almost all FIP packets contain at most one instance of each
descriptor.  A VLAN notification may contain multiple VLAN
descriptors.  The FCoE specification does not provide any guidance
regarding prioritisation of VLANs, so we may choose to arbitrarily
choose the first listed VLAN.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[vlan] Treat VLAN 0 as valid
Michael Brown [Sat, 27 Nov 2010 15:23:46 +0000 (15:23 +0000)] 
[vlan] Treat VLAN 0 as valid

VLAN headers are allowed to contain a VLAN tag of zero, indicating
that the header specifies only a priority and that the packet does not
belong to any VLAN.  The easiest way to handle this is to treat VLAN 0
as being a normal VLAN.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fcoe] Tidy up debug message
Michael Brown [Sat, 27 Nov 2010 16:03:51 +0000 (16:03 +0000)] 
[fcoe] Tidy up debug message

The increase in length in Fibre Channel device names causes the
"selected FCF" message to wrap beyond 80 characters.  Fix by using
abbreviations where possible.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Allow Fibre Channel ports to be explicitly named
Michael Brown [Sat, 27 Nov 2010 14:37:53 +0000 (14:37 +0000)] 
[fc] Allow Fibre Channel ports to be explicitly named

Use the network interface name as the Fibre Channel port name.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fcoe] Create Fibre Channel port only when we have selected an FCF
Michael Brown [Sat, 27 Nov 2010 14:21:08 +0000 (14:21 +0000)] 
[fcoe] Create Fibre Channel port only when we have selected an FCF

Create the Fibre Channel port only when the FCoE port has selected a
Fibre Channel Forwarder to use.  This avoids the confusion of having
an FC port created for the network device on which only VLAN discovery
is performed.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fcoe] Add support for FIP VLAN discovery
Michael Brown [Fri, 26 Nov 2010 01:06:32 +0000 (01:06 +0000)] 
[fcoe] Add support for FIP VLAN discovery

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[vlan] Provide vlan_can_be_trunk()
Michael Brown [Fri, 26 Nov 2010 00:58:36 +0000 (00:58 +0000)] 
[vlan] Provide vlan_can_be_trunk()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[vlan] Add non-error debug messages
Michael Brown [Thu, 25 Nov 2010 23:50:41 +0000 (23:50 +0000)] 
[vlan] Add non-error debug messages

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[vlan] Allow duplicate VLAN creation attempts
Michael Brown [Thu, 25 Nov 2010 23:45:30 +0000 (23:45 +0000)] 
[vlan] Allow duplicate VLAN creation attempts

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[nvo] Allow fragment list to be omitted
Michael Brown [Thu, 25 Nov 2010 00:05:20 +0000 (00:05 +0000)] 
[nvo] Allow fragment list to be omitted

Allow the fragment list to be omitted when calling nvo_init().
Omitting the list will cause the whole of the NVS device to be used
for NVO storage.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pci] Add a mechanism for using a PCI VPD field as an NVS device
Michael Brown [Wed, 24 Nov 2010 23:59:53 +0000 (23:59 +0000)] 
[pci] Add a mechanism for using a PCI VPD field as an NVS device

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pci] Add support for reading and writing PCI Vital Product Data (VPD)
Michael Brown [Wed, 24 Nov 2010 21:01:24 +0000 (21:01 +0000)] 
[pci] Add support for reading and writing PCI Vital Product Data (VPD)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pci] Standardise debug message format
Michael Brown [Wed, 24 Nov 2010 16:59:46 +0000 (16:59 +0000)] 
[pci] Standardise debug message format

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[cmdline] Fix multi-layer variable expansion (again)
Michael Brown [Tue, 23 Nov 2010 00:18:11 +0000 (00:18 +0000)] 
[cmdline] Fix multi-layer variable expansion (again)

Expansion of the (admittedly perverse) "aaa}bbb${ccc" will currently
fail because expand_command() does not check that the closing "}"
occurs later than the opening "${".

Fix by ensuring that the most recent opening "${" is used to match
against the first *subsequent* closing "}".

Total cost of this change: -12 bytes, bringing the overall cost of
this feature to -4 bytes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[cmdline] Fix multi-layer variable expansion
Michael Brown [Mon, 22 Nov 2010 21:31:00 +0000 (21:31 +0000)] 
[cmdline] Fix multi-layer variable expansion

Expansion of ${${foo}} will currently fail, because the first
opening "${" will be incorrectly matched against the first closing
"}", leading to an attempt to expand the variable "${foo".

Fix by ensuring that the most recent opening "${" is used to match
against the first closing "}".

Total cost: 8 bytes.  :)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Allow "set" command to take an empty value
Michael Brown [Mon, 22 Nov 2010 21:11:03 +0000 (21:11 +0000)] 
[settings] Allow "set" command to take an empty value

Allow "set <variable>" to be used to set the variable to an empty
value, if permitted by the setting type.  Note that some settings
backends do not differentiate between an empty value and a
non-existent value, so this may or may not be equivalent to "clear
<variable>".

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[autoboot] Merge "netboot" command into "autoboot"
Michael Brown [Mon, 22 Nov 2010 21:04:30 +0000 (21:04 +0000)] 
[autoboot] Merge "netboot" command into "autoboot"

Allow "autoboot" to accept an optional list of network devices, and
remove the "netboot" command.  This saves around 130 bytes.

The "netboot" command has existed for approximately 48 hours, so its
removal should not cause backwards compatibility issues for anyone.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[cmdline] Add "isset" command
Michael Brown [Mon, 22 Nov 2010 20:41:17 +0000 (20:41 +0000)] 
[cmdline] Add "isset" command

The "isset" command can be used to determine whether or not a setting
is present.  For example:

  isset ${net0/ip} || dhcp net0   # If we have no IP address, try DHCP

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[script] Allow "exit" to exit a script
Michael Brown [Mon, 22 Nov 2010 20:20:33 +0000 (20:20 +0000)] 
[script] Allow "exit" to exit a script

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[script] Implement "goto" in iPXE scripts
Michael Brown [Mon, 22 Nov 2010 04:19:24 +0000 (04:19 +0000)] 
[script] Implement "goto" in iPXE scripts

Allow script labels to be defined using the syntax

  :<labelname>

(nothing else allowed on the line, including whitespace).  Labels are
ignored during script execution, but can be used as the target of the
"goto" command.  For example:

  #!ipxe

  goto machine_${net0/ip} || goto machine_default

  # Linux kernel boot
  :machine_10.0.0.101
  :machine_10.0.0.102
  set filename http://my.boot.server/vmlinuz
  goto done

  # Default configuration
  :machine_default
  set filename pxelinux.0
  goto done

  # Boot selected configuration
  :done
  chain ${filename}

Originally-implemented-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Originally-implemented-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[cmdline] Add trivial logical operators to iPXE command lines
Michael Brown [Mon, 22 Nov 2010 01:47:07 +0000 (01:47 +0000)] 
[cmdline] Add trivial logical operators to iPXE command lines

Make the "||" and "&&" operators available within iPXE commands.  For
example:

   dhcp net0 || set net0/ip 192.168.0.2

would attempt to acquire an IP address via DHCP, falling back to a
static address if DHCP fails.

As a side-effect, comments may now be appended to any line.  For
example:

  dhcp net0 || set net0/ip 192.168.0.2   # Try DHCP first, then static

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pxe] Remove startpxe and stoppxe commands from default builds
Michael Brown [Sun, 21 Nov 2010 23:40:40 +0000 (23:40 +0000)] 
[pxe] Remove startpxe and stoppxe commands from default builds

These commands exist primarily for debugging and are not generally
useful, so save 137 bytes by removing them by default.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[legal] Add some missing FILE_LICENCE declarations
Michael Brown [Sun, 21 Nov 2010 23:35:50 +0000 (23:35 +0000)] 
[legal] Add some missing FILE_LICENCE declarations

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[image] Use generic option-parsing library
Michael Brown [Sun, 21 Nov 2010 20:38:00 +0000 (20:38 +0000)] 
[image] Use generic option-parsing library

Total saving: 548 bytes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[login] Use generic option-parsing library
Michael Brown [Sun, 21 Nov 2010 20:02:54 +0000 (20:02 +0000)] 
[login] Use generic option-parsing library

Total cost: 7 bytes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[route] Use generic option-parsing library
Michael Brown [Sun, 21 Nov 2010 19:58:45 +0000 (19:58 +0000)] 
[route] Use generic option-parsing library

Total saving: 71 bytes.

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