]> git.ipfire.org Git - thirdparty/ipxe.git/log
thirdparty/ipxe.git
14 years ago[infiniband] Respond to CM disconnection requests
Michael Brown [Sat, 11 Sep 2010 14:31:33 +0000 (15:31 +0100)] 
[infiniband] Respond to CM disconnection requests

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[infiniband] Fix TID magic signature
Michael Brown [Sat, 11 Sep 2010 13:09:54 +0000 (14:09 +0100)] 
[infiniband] Fix TID magic signature

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[infiniband] Include SRP by default, but only for Infiniband builds
Michael Brown [Sun, 12 Sep 2010 20:44:48 +0000 (21:44 +0100)] 
[infiniband] Include SRP by default, but only for Infiniband builds

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[ethernet] Include AoE only for Ethernet builds
Michael Brown [Sun, 12 Sep 2010 20:45:50 +0000 (21:45 +0100)] 
[ethernet] Include AoE only for Ethernet builds

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Remove unnecessary constraint on DBG_ENABLE()/DBG_DISABLE()
Michael Brown [Sat, 11 Sep 2010 12:05:40 +0000 (13:05 +0100)] 
[build] Remove unnecessary constraint on DBG_ENABLE()/DBG_DISABLE()

DBG_ENABLE() and DBG_DISABLE() are currently constrained to enabling
and disabling only debug levels that are compiled in for the current
object.  For example, a DBG_ENABLE(DBGLVL_EXTRA) in foo.c will not be
able to affect output from other objects at DBGLVL_EXTRA unless foo.c
is itself compiled with DBGLVL_EXTRA enabled.

Partially fix by removing this unnecessary constraint.  (Note that it
is still necessary for at least one debug level to be compiled in for
the object invoking DBG_ENABLE()/DBG_DISABLE().)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[multiboot] Reduce length of "Features" startup banner
Michael Brown [Sun, 12 Sep 2010 17:40:02 +0000 (18:40 +0100)] 
[multiboot] Reduce length of "Features" startup banner

Minimise the chances of an unwanted line wrap on the iPXE feature list
printed at startup.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[retry] Add TIMER_INIT() for initialising static timers
Michael Brown [Mon, 6 Sep 2010 21:16:21 +0000 (22:16 +0100)] 
[retry] Add TIMER_INIT() for initialising static timers

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[rtl8139] Check for oversized packets when transmitting
Michael Brown [Sun, 5 Sep 2010 17:52:57 +0000 (18:52 +0100)] 
[rtl8139] Check for oversized packets when transmitting

An attempt to transmit a packet of 8192 bytes or larger will collide
with the status bits in the TX descriptor.  This gives the appearance
of the network card's transmit data path having just suddenly stopped
responding; iPXE is waiting for the card to report a TX completion
but, because of the status bit collision, the card thinks that the
descriptor has not yet been written.

Fix by explicitly checking for oversized packets in rtl_transmit().

Discovered during Fibre Channel over Ethernet testing, and debugged by
using gdb to examine the state of the emulated rtl8139 card in qemu.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[xfer] Add xfer_window_changed()
Michael Brown [Sun, 5 Sep 2010 00:16:29 +0000 (01:16 +0100)] 
[xfer] Add xfer_window_changed()

xfer_window_changed() can be used to notify peers that an interface is
now ready to accept data.  This can potentially be used to eliminate
the need for wasteful processes that simply poll xfer_window() until
the window becomes non-zero.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[infiniband] Add the concept of an Infiniband upper-layer driver
Michael Brown [Sat, 4 Sep 2010 22:35:09 +0000 (23:35 +0100)] 
[infiniband] Add the concept of an Infiniband upper-layer driver

Replace the explicit calls from the Infiniband core to the IPoIB layer
with the general concept of an Infiniband upper-layer driver
(analogous to a PCI driver) which can create arbitrary devices on top
of Infiniband devices.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[netdevice] Add the concept of a network upper-layer driver
Michael Brown [Sat, 4 Sep 2010 23:55:23 +0000 (00:55 +0100)] 
[netdevice] Add the concept of a network upper-layer driver

Add the concept of a network upper-layer driver, which can create
arbitrary devices on top of network devices.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[netdevice] Call netdev_link_[up|down|err]() only while registered
Michael Brown [Sun, 5 Sep 2010 01:03:31 +0000 (02:03 +0100)] 
[netdevice] Call netdev_link_[up|down|err]() only while registered

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[sis190] Initialise network device before calling register_netdev()
Michael Brown [Sun, 5 Sep 2010 01:20:23 +0000 (02:20 +0100)] 
[sis190] Initialise network device before calling register_netdev()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[tables] Add for_each_table_entry_continue() and _continue_reverse()
Michael Brown [Sat, 4 Sep 2010 22:29:00 +0000 (23:29 +0100)] 
[tables] Add for_each_table_entry_continue() and _continue_reverse()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[rtl8139] Strip CRC from received packets
Michael Brown [Fri, 3 Sep 2010 15:16:18 +0000 (16:16 +0100)] 
[rtl8139] Strip CRC from received packets

The rtl8139 driver includes the Ethernet CRC within the received
packet.  All current protocols ignore trailing garbage, but FCoE
requires the frame length to be correct (since the FCoE footer
position is calculated from the end of the packet), so fix the driver
to strip out the CRC.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[retry] Hold reference while timer is running and during expiry callback
Michael Brown [Thu, 2 Sep 2010 02:34:04 +0000 (03:34 +0100)] 
[retry] Hold reference while timer is running and during expiry callback

Guarantee that a retry timer cannot go out of scope while the timer is
running, and provide a guarantee to the expiry callback that the timer
will remain in scope during the entire callback (similar to the
guarantee provided to interface methods).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[process] Add process_running()
Michael Brown [Wed, 25 Aug 2010 10:17:13 +0000 (11:17 +0100)] 
[process] Add process_running()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[tables] Add table_index()
Michael Brown [Mon, 26 Jul 2010 12:26:34 +0000 (13:26 +0100)] 
[tables] Add table_index()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[xfer] Add xfer_deliver_raw_meta()
Michael Brown [Sun, 25 Jul 2010 00:49:00 +0000 (01:49 +0100)] 
[xfer] Add xfer_deliver_raw_meta()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[xfer] Generalise metadata "whence" field to "flags" field
Michael Brown [Fri, 2 Jul 2010 11:12:16 +0000 (12:12 +0100)] 
[xfer] Generalise metadata "whence" field to "flags" field

iPXE has never supported SEEK_END; the usage of "whence" offers only
the options of SEEK_SET and SEEK_CUR and so is effectively a boolean
flag.  Further flags will be required to support additional metadata
required by the Fibre Channel network model, so repurpose the "whence"
field as a generic "flags" field.

xfer_seek() has always been used with SEEK_SET, so remove the "whence"
field altogether from its argument list.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[eepro100] Add new PCI ID 8086:27dc
Marty Connor [Mon, 30 Aug 2010 14:24:51 +0000 (10:24 -0400)] 
[eepro100] Add new PCI ID 8086:27dc

Add PCI ID 8086:27dc to the eepro100 driver.

Reported-by: Cédric Delmas <c.delmas@akka.eu>
Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Fix misaligned table entries when using gcc 4.5
Piotr Jaroszyński [Thu, 19 Aug 2010 21:39:17 +0000 (23:39 +0200)] 
[build] Fix misaligned table entries when using gcc 4.5

Declarations without the accompanying __table_entry cause misalignment
of the table entries when using gcc 4.5.  Fix by adding the
appropriate __table_entry macro or (where possible) by removing
unnecessary forward declarations.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[compiler] Prevent empty weak function stubs from being removed
Joshua Oreman [Wed, 18 Aug 2010 23:37:22 +0000 (16:37 -0700)] 
[compiler] Prevent empty weak function stubs from being removed

Even with the noinline specifier added by commit 1a260f8, gcc may skip
calls to non-inlinable functions that it knows have no side
effects. This caused the get_cached_dhcpack() call in start_dhcp(),
the weak stub of which has no code in its body, to be removed,
preventing cached DHCP from working.

Fix by adding a __keepme macro to compiler.h expanding to asm(""), as
recommended by gcc's info page, and using it in the weak stub for
get_cached_dhcpack().

Reported-by: Aaron Brooks <aaron@brooks1.net>
Tested-by: Aaron Brooks <aaron@brooks1.net>
Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Add tap.linux to "make everything"
Michael Brown [Thu, 19 Aug 2010 12:25:42 +0000 (13:25 +0100)] 
[build] Add tap.linux to "make everything"

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[linux] Add the tap driver
Piotr Jaroszyński [Thu, 27 May 2010 23:09:22 +0000 (01:09 +0200)] 
[linux] Add the tap driver

Add the tap driver that can be used like:
$ ./ipxe.linux --net tap,if=tap0,mac=00:0c:29:c5:39:a1
The if setting is mandatory.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[linux] Add command line arguments
Piotr Jaroszyński [Mon, 31 May 2010 17:07:13 +0000 (19:07 +0200)] 
[linux] Add command line arguments

Support qemu-like arguments for network setup:
--net driver_name[,setting=value]*

and global settings:
--settings setting=value[,setting=value]*

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[linux] Add device and driver model
Piotr Jaroszyński [Mon, 31 May 2010 16:50:11 +0000 (18:50 +0200)] 
[linux] Add device and driver model

Add the base to build linux drivers and the linux UI code on.  UI
fills device requests, which are later walked over by the linux
root_driver and delegated to specific linux drivers.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[linux] Add empty smbios
Piotr Jaroszyński [Wed, 26 May 2010 17:04:47 +0000 (19:04 +0200)] 
[linux] Add empty smbios

There exists an smbios userspace library so implementing this is
probably possible, but doesn't seem really important to have in
userspace.  Hence provide a dummy implementation returning an error.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[linux] Add nap
Piotr Jaroszyński [Wed, 26 May 2010 16:54:36 +0000 (18:54 +0200)] 
[linux] Add nap

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[linux] Add umalloc
Piotr Jaroszyński [Wed, 26 May 2010 16:36:03 +0000 (18:36 +0200)] 
[linux] Add umalloc

Add umalloc API.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[linux] Add uaccess
Piotr Jaroszyński [Wed, 26 May 2010 16:55:06 +0000 (18:55 +0200)] 
[linux] Add uaccess

Add user access API for linux.

On linux userspace virtual == user == phys addresses.  Physical
addresses also being the same is wrong, but there is no general way of
converting userspace addresses to physical as what appears to be
contiguous in userspace is physically fragmented.  Currently only the
DMA memory is special-cased, but its conversion to bus addresses is
done in phys_to_bus.  This is known to break virtio as it is passing
phys addresses to the virtual device.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[linux] Add timer
Piotr Jaroszyński [Wed, 26 May 2010 14:57:34 +0000 (16:57 +0200)] 
[linux] Add timer

Add linux timer API.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[linux] Add console
Piotr Jaroszyński [Wed, 7 Apr 2010 23:40:31 +0000 (01:40 +0200)] 
[linux] Add console

Add linux console using stdin/out. Configure the attached terminal for
readline use.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[linux] Add most of the linux api
Piotr Jaroszyński [Wed, 9 Jun 2010 18:16:13 +0000 (20:16 +0200)] 
[linux] Add most of the linux api

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[linux] Add linux_syscall
Piotr Jaroszyński [Wed, 9 Jun 2010 18:04:09 +0000 (20:04 +0200)] 
[linux] Add linux_syscall

Add linux_syscall for both i386 and x86_64.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[linux] Add linux api headers
Piotr Jaroszyński [Thu, 27 May 2010 17:13:56 +0000 (19:13 +0200)] 
[linux] Add linux api headers

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[linux] Add linuxprefix
Piotr Jaroszyński [Wed, 9 Jun 2010 17:55:09 +0000 (19:55 +0200)] 
[linux] Add linuxprefix

Add a minimal _start required to run main.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[dhcp] Use i386-pcbios DHCP options on linux
Piotr Jaroszyński [Mon, 31 May 2010 17:11:38 +0000 (19:11 +0200)] 
[dhcp] Use i386-pcbios DHCP options on linux

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[linux] Add linux platform skeleton
Piotr Jaroszyński [Wed, 7 Apr 2010 23:25:38 +0000 (01:25 +0200)] 
[linux] Add linux platform skeleton

Add makefiles, ld scripts and default config for linux platform for
both i386 and x86_64.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[libc] Add strtoull()
Piotr Jaroszyński [Sun, 18 Jul 2010 15:52:43 +0000 (17:52 +0200)] 
[libc] Add strtoull()

Don't implement strtoul() on top of strtoull() as strtoull() is much
bigger and only used on linux currently. Instead refactor most of the
logic out of strtoul() into static inlines and reuse that. Also put it
in a separate object so it won't get linked in.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[mtnic] Switch to malloc_dma() and free_dma()
Piotr Jaroszyński [Wed, 28 Jul 2010 18:32:46 +0000 (20:32 +0200)] 
[mtnic] Switch to malloc_dma() and free_dma()

alloc_memblock() and free_memblock() are internal.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[libc] Add isxdigit()
Piotr Jaroszyński [Sun, 18 Jul 2010 15:53:47 +0000 (17:53 +0200)] 
[libc] Add isxdigit()

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Export find_setting()
Piotr Jaroszyński [Mon, 31 May 2010 17:08:23 +0000 (19:08 +0200)] 
[settings] Export find_setting()

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Provide %.fd0 build targets only for pcbios
Michael Brown [Sun, 4 Apr 2010 16:03:33 +0000 (18:03 +0200)] 
[build] Provide %.fd0 build targets only for pcbios

Originally-fixed-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Add everything target
Piotr Jaroszyński [Thu, 29 Jul 2010 13:25:36 +0000 (15:25 +0200)] 
[build] Add everything target

The everything target builds multiple image types on each supported
arch/platform combination.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Properly handle multiple goals per BIN directory
Piotr Jaroszyński [Thu, 29 Jul 2010 13:17:30 +0000 (15:17 +0200)] 
[build] Properly handle multiple goals per BIN directory

When building multiple targets per BIN with multiple jobs, for
example:

  make -j16 bin-i386-efi/ipxe.efi{,drv,rom} bin-x86_64-efi/ipxe.efi{,drv,rom}

we would invoke a make subprocess for each goal in parallel resulting
in multiple makes running in a single BIN directory.  Fix by grouping
goals per BIN directory and invoking only one make per BIN.  It is
both safer and faster.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Build pcbios specific drivers only on pcbios
Piotr Jaroszyński [Tue, 27 Jul 2010 18:22:54 +0000 (20:22 +0200)] 
[build] Build pcbios specific drivers only on pcbios

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[ioapi] Move get_memmap() to the I/O API group
Piotr Jaroszyński [Tue, 27 Jul 2010 18:37:55 +0000 (20:37 +0200)] 
[ioapi] Move get_memmap() to the I/O API group

pcbios specific get_memmap() is used by the b44 driver making
all-drivers builds fail on other platforms.  Move it to the I/O API
group and provide a dummy implementation on EFI.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[dhcp] Allow multiple interfaces in dhcp command
Michael Brown [Sat, 31 Jul 2010 08:20:41 +0000 (09:20 +0100)] 
[dhcp] Allow multiple interfaces in dhcp command

The "dhcp" command now accepts a list of interfaces to try until one
succeeds.  For example:

 iPXE> dhcp net0 net1 net2

If no interfaces are specified, all interfaces will be tried.

Note that interfaces that fail to DHCP are closed in order to avoid
memory exhaustion.  This behavior differs from the previous "dhcp"
command implementation but should not affect any existing scripts
since a "dhcp" command failure would in any case cause the script to
abort.

Originally-implemented-by: Lars Kellogg-Stedman <lars@oddbit.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[comboot] Run com32 programs with a valid IDT
Geoff Lywood [Wed, 7 Jul 2010 22:35:01 +0000 (15:35 -0700)] 
[comboot] Run com32 programs with a valid IDT

COM32 binaries generally expect to run with interrupts
enabled. Syslinux does so, and COM32 programs will execute cli/sti
pairs when running a critical section, to provide mutual exclusion
against BIOS interrupt handlers.  Previously, under iPXE, the IDT was
not valid, so any interrupt (e.g. a timer tick) would generally cause
the machine to triple fault.

This change introduces code to:
- Create a valid IDT at the same location that syslinux uses
- Create an "interrupt jump buffer", which contains small pieces of
  code that simply record the vector number and jump to a common
  handler
- Thunk down to real mode and execute the BIOS's interrupt handler
  whenever an interrupt is received in a COM32 program
- Switch IDTs and enable/disable interrupts when context switching to
  and from COM32 binaries

Testing done:
- Booted VMware ESX using a COM32 multiboot loader (mboot.c32)
- Built with GDBSERIAL enabled, and tested breakpoints on int22 and
  com32_irq
- Put the following code in a COM32 program:
    asm volatile ( "sti" );
    while ( 1 );
  Before this change, the machine would triple fault
  immediately. After this change, it hangs as expected. Under Bochs,
  it is possible to see the interrupt handler run, and the current
  time in the BIOS data area gets incremented.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[forcedeth] Replace driver with native iPXE driver
Andrei Faur [Thu, 29 Jul 2010 20:36:14 +0000 (23:36 +0300)] 
[forcedeth] Replace driver with native iPXE driver

This patch adds a native iPXE forcedeth driver and removes the legacy
Etherboot forcedeth driver. It supports 40 different chips, compared
to the original 14.

It has been tested on a NIC with an CK804 Ethernet Controller, and the
results of downloading 5 100mb images in a row have been:
12/11/11/11/11 seconds; booting DSL using pxelinux also succeeded. The
driver has also been tested by chaining undionly.kpxe and it worked.

Signed-off-by: Andrei Faur <da3drus@gmail.com>
Tested-by: Andrei Faur <da3drus@gmail.com>
Tested-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[string] Use 64-bit registers in assembly memswap() on x86_64
Joshua Oreman [Fri, 30 Jul 2010 16:52:03 +0000 (09:52 -0700)] 
[string] Use 64-bit registers in assembly memswap() on x86_64

An assembly version of memswap() is in an x86 word-length-agnostic
header file, but it used 32-bit registers to store pointers, leading
to memory errors responding to ARP queries on 64-bit systems.

Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[802.11] Fix a use-after-free
Joshua Oreman [Fri, 30 Jul 2010 03:13:31 +0000 (20:13 -0700)] 
[802.11] Fix a use-after-free

When we received an encrypted packet, after replacing it with its
decrypted version and freeing the encrypted original, we would
continue to look at the header of the now-freed original packet. Fix
by moving the header pointer to point at the decrypted packet instead.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[802.11] Use correct name for sec80211_detect()
Joshua Oreman [Fri, 30 Jul 2010 03:12:35 +0000 (20:12 -0700)] 
[802.11] Use correct name for sec80211_detect()

The workhorse function for detecting 802.11 security was still named
_sec80211_detect(), a holdover from the old style of weak function
handling, with the result that all networks would be identified as
"unknown".

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[tcp] Fix a 64bit compile time error
Piotr Jaroszyński [Thu, 22 Jul 2010 20:10:40 +0000 (22:10 +0200)] 
[tcp] Fix a 64bit compile time error

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[efi] Fix the 32-bit version of elf2efi64
Geoff Lywood [Wed, 21 Jul 2010 02:23:02 +0000 (19:23 -0700)] 
[efi] Fix the 32-bit version of elf2efi64

Currently, if elf2efi.c is compiled using a 32-bit HOST_CC, then the
resulting elf2efi64 binary will generate 32-bit EFI binaries instead
of 64-bit EFI binaries.

The problem is that elf2efi.c uses the MDE_CPU_* definitions to decide
whether to output a 32-bit or 64-bit PE binary.  However, MDE_CPU_*
gets defined in ProcessorBind.h, depending on the compiler's target
architecture.  Overriding them on the command line doesn't work in the
expected way, and you can end up in cases where both MDE_CPU_IA32 and
MDE_CPU_X64 are defined.

Fix by using a separate definition, EFI_TARGET_IA32/EFI_TARGET_X64,
which is specified only on the command line.

Signed-off-by: Geoff Lywood <glywood@vmware.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[tcp] Allow out-of-order receive queue to be discarded
Michael Brown [Wed, 21 Jul 2010 11:01:50 +0000 (12:01 +0100)] 
[tcp] Allow out-of-order receive queue to be discarded

Allow packets in the receive queue to be discarded in order to free up
memory.  This avoids a potential deadlock condition in which the
missing packet can never be received because the receive queue is
occupying all of the memory available for further RX buffers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[malloc] Add cache discard mechanism
Michael Brown [Wed, 21 Jul 2010 10:58:50 +0000 (11:58 +0100)] 
[malloc] Add cache discard mechanism

Add a facility allowing cached data to be discarded in order to
satisfy memory allocations that would otherwise fail.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[tcp] Handle out-of-order received packets
Michael Brown [Tue, 20 Jul 2010 22:17:30 +0000 (23:17 +0100)] 
[tcp] Handle out-of-order received packets

Maintain a queue of received packets, so that lost packets need not
result in retransmission of the entire TCP window.

Increase the TCP window to 8kB, in order that we can potentially
transmit enough duplicate ACKs to trigger Fast Retransmission at the
sender.

Using a 10MB HTTP download in qemu-kvm with an artificial drop rate of
1 in 64 packets, this reduces the download time from around 26s to
around 4s.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[netdevice] Provide a test mechanism for discarding packets at random
Michael Brown [Tue, 20 Jul 2010 19:52:08 +0000 (20:52 +0100)] 
[netdevice] Provide a test mechanism for discarding packets at random

Setting NETDEV_DISCARD_RATE to a non-zero value will cause one in
every NETDEV_DISCARD_RATE packets to be discarded at random on both
the transmit and receive datapaths, allowing the robustness of
upper-layer network protocols to be tested even in simulation
environments that provide wholly reliable packet transmission.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[virtio] Replace virtio-net with native iPXE driver
Stefan Hajnoczi [Fri, 2 Jul 2010 18:15:47 +0000 (19:15 +0100)] 
[virtio] Replace virtio-net with native iPXE driver

This patch adds a native iPXE virtio-net driver and removes the legacy
Etherboot virtio-net driver.  The main reasons for doing this are:

1. Multiple virtio-net NICs are now supported by iPXE.  The legacy
   driver kept global state and caused issues in virtual machines with
   more than one virtio-net device.

2. Faster downloads.  The native iPXE driver downloads 100 MB over
   HTTP in 12s, the legacy Etherboot driver in 37s.  This simple
   benchmark uses KVM with tap networking and the Python
   SimpleHTTPServer both running on the same host.

Changes to core virtio code reduce vring descriptors to 256 (QEMU uses
128 for virtio-blk and 256 for virtio-net) and change the opaque token
from u16 to void*.  Lowering the descriptor count reduces memory
consumption.  The void* opaque token change makes driver code simpler.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[errcode] Remove unused contrib/errcode scripts
Stefan Hajnoczi [Sun, 11 Jul 2010 07:52:57 +0000 (08:52 +0100)] 
[errcode] Remove unused contrib/errcode scripts

The new errdb error code database is more accurate than the regular
expression-based errcode scripts.  This patch removes errcode scripts
in favor of errdb.

The gpxebot.py script is no longer needed, gpxebot has been released
as a separate open source codebase:

  http://git.etherboot.org/?p=people/stefanha/gpxebot.git;a=summary

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[settings] Unregister the children when unregistering the parent
Piotr Jaroszyński [Wed, 14 Jul 2010 20:25:55 +0000 (22:25 +0200)] 
[settings] Unregister the children when unregistering the parent

The DHCP settings registered as a child of the netdevice settings are
not unregistered anywhere.  This prevents the netdevice from being
freed on shutdown.

Fix by automatically unregistering any child settings when the parent
settings are unregistered.

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[tcp] Treat ACKs as sent only when successfully transmitted
Michael Brown [Thu, 15 Jul 2010 18:33:46 +0000 (19:33 +0100)] 
[tcp] Treat ACKs as sent only when successfully transmitted

iPXE currently forces sending (i.e. sends a pure ACK even in the
absence of fresh data to send) only in response to packets that
consume sequence space or that lie outside of the receive window.
This ignores the possibility that a previous ACK was not actually sent
(due to, for example, the retransmission timer running).

This does not cause incorrect behaviour, but does cause unnecessary
retransmissions from our peer.  For example:

 1. Peer sends final data packet (ack      106 seq 521..523)
 2. We send FIN                  (seq 106..107 ack      523)
 3. Peer sends FIN               (ack      106 seq 523..524)
 4. We send nothing since retransmission timer is running for our FIN
 5. Peer ACKs our FIN            (ack      107 seq 524..524)
 6. We send nothing since this packet consumes no sequence space
 7. Peer retransmits FIN         (ack      107 seq 523..524)
 8. We ACK peer's FIN            (seq 107..107 ack      524)

What should happen at step (6) is that we should ACK the peer's FIN,
since we can deduce that we have never sent this ACK.

Fix by maintaining an "ACK pending" flag that is set whenever we are
made aware that our peer needs an ACK (whether by consuming sequence
space or by sending a packet that appears out of order), and is
cleared only when the ACK packet has been transmitted.

Reported-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[tcp] Merge boolean flags into a single "flags" field
Michael Brown [Thu, 15 Jul 2010 18:15:36 +0000 (19:15 +0100)] 
[tcp] Merge boolean flags into a single "flags" field

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[tcp] Use a dedicated timer for the TIME_WAIT state
Michael Brown [Thu, 15 Jul 2010 17:57:34 +0000 (18:57 +0100)] 
[tcp] Use a dedicated timer for the TIME_WAIT state

iPXE currently repurposes the retransmission timer to hold the TCP
connection in the TIME_WAIT state (i.e. waiting for up to 2*MSL in
case we are required to re-ACK our peer's FIN due to a lost ACK).
However, the fact that this timer is running will prevent such an ACK
from ever being sent, since the logic in tcp_xmit() assumes that a
running timer indicates that we ourselves are waiting for an ACK and
so blocks the transmission.  (We always wait for an ACK before sending
our next packet, to keep our transmit data path as simple as
possible.)

Fix by using an entirely separate timer for the TIME_WAIT state, so
that packets can still be sent.

Reported-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[build] Speed up rebuilding on header file changes
Michael Brown [Wed, 14 Jul 2010 17:29:16 +0000 (18:29 +0100)] 
[build] Speed up rebuilding on header file changes

Split src_template into deps_template (which handles the definition of
foo_DEPS) and rules_template (which handles the rules referencing
foo_DEPS).  The rules_template is not affected by any included header
files and so does not need to be reprocessed following a change to an
included header file.

This reduces the time required to rebuild the Makefile rules following
a change to stdint.h by around 45%, at a cost of increasing the time
required to rebuild after a "make veryclean" by around 3%.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[build] Standardise variable naming for inter-build state files
Michael Brown [Wed, 14 Jul 2010 16:43:44 +0000 (17:43 +0100)] 
[build] Standardise variable naming for inter-build state files

For files such as $(BIN)/.blib.list, standardise the variable names
used to represent the file contents.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[build] Avoid unnecessary "rm" and "touch" in dependency generation
Michael Brown [Wed, 14 Jul 2010 15:14:29 +0000 (16:14 +0100)] 
[build] Avoid unnecessary "rm" and "touch" in dependency generation

Speed up dependency generation by omitting the totally unnecessary
"rm" and "touch" commands.  This reduces the time taken to generate
dependencies by around 6%.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[build] Mark weak functions noinline
Stefan Hajnoczi [Wed, 14 Jul 2010 09:13:44 +0000 (10:13 +0100)] 
[build] Mark weak functions noinline

Weak functions whose visibility is hidden may be inlined due to a bug
in GCC.  Explicitly mark weak functions noinline to work around the
problem.

This makes the PXE_MENU config option work again, the PXE boot menu
was never being called because the compiler inlined a weak stub
function.

The GCC bug was identified and fixed by Richard Sandiford
<rdsandiford@googlemail.com> but in the meantime iPXE needs to
implement a workaround.

Reported-by: Steve Jones <steve@squaregoldfish.co.uk>
Reported-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Suggested-by: Joshua Oreman <oremanj@rwcr.net>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[hci] Continue processing while prompting for shell banner
Michael Brown [Wed, 14 Jul 2010 11:37:29 +0000 (12:37 +0100)] 
[hci] Continue processing while prompting for shell banner

Continue calling step() while displaying the shell banner.  This
potentially allows TCP connections to close gracefully after a failed
boot attempt.

Inspired-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[davicom] Use iPXE debugging infrastructure
Michael Brown [Wed, 14 Jul 2010 11:19:17 +0000 (12:19 +0100)] 
[davicom] Use iPXE debugging infrastructure

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[tulip] Use iPXE debugging infrastructure
Michael Brown [Wed, 14 Jul 2010 11:17:45 +0000 (12:17 +0100)] 
[tulip] Use iPXE debugging infrastructure

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[debug] Expose pause() and more() debugging functions
Michael Brown [Wed, 14 Jul 2010 11:01:20 +0000 (12:01 +0100)] 
[debug] Expose pause() and more() debugging functions

Include the pause() and more() debugging functions within the general
iPXE debugging framework, by introducing DBGxxx_PAUSE() and
DBGxxx_MORE() macros.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[debug] Remove unused guard_region() and check_region() functions
Michael Brown [Wed, 14 Jul 2010 10:44:58 +0000 (11:44 +0100)] 
[debug] Remove unused guard_region() and check_region() functions

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[build] Remove some obsolete header files
Michael Brown [Wed, 14 Jul 2010 10:38:02 +0000 (11:38 +0100)] 
[build] Remove some obsolete header files

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[console] Remove never-used putline() method
Michael Brown [Wed, 14 Jul 2010 10:27:42 +0000 (11:27 +0100)] 
[console] Remove never-used putline() method

putline() was introduced back in 2007 for a feature that was never
committed.  No console driver implements it and no code calls it, so
remove it from struct console_driver.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[cmdline] Fix inconsistent and ugly code formatting in shell_banner()
Michael Brown [Wed, 14 Jul 2010 10:17:26 +0000 (11:17 +0100)] 
[cmdline] Fix inconsistent and ugly code formatting in shell_banner()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[tcp] Randomise local TCP port
Guo-Fu Tseng [Tue, 13 Jul 2010 16:24:01 +0000 (17:24 +0100)] 
[tcp] Randomise local TCP port

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[tcp] Fix typos by changing ntohl() to htonl() where appropriate
Michael Brown [Tue, 13 Jul 2010 16:18:48 +0000 (17:18 +0100)] 
[tcp] Fix typos by changing ntohl() to htonl() where appropriate

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[tcp] Store local port in host byte order
Michael Brown [Tue, 13 Jul 2010 16:15:57 +0000 (17:15 +0100)] 
[tcp] Store local port in host byte order

Every other scalar integer value in struct tcp_connection is in host
byte order; change the definition of local_port to match.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[image] Fix a memory leak in free_image()
Piotr Jaroszyński [Thu, 8 Jul 2010 13:54:55 +0000 (15:54 +0200)] 
[image] Fix a memory leak in free_image()

image_set_cmdline() strdup()s cmdline, which free_image() doesn't
clean up.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[pcnet32] Fix pcnet32_wio_reset() bug
Andrei Faur [Wed, 7 Jul 2010 12:43:41 +0000 (15:43 +0300)] 
[pcnet32] Fix pcnet32_wio_reset() bug

This bug caused .probe to fail because the NIC did not reset properly.

Signed-off-by: Andrei Faur <da3drus@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[tcp] Fix potential use-after-free when accessing timestamp option
Michael Brown [Wed, 7 Jul 2010 11:57:08 +0000 (12:57 +0100)] 
[tcp] Fix potential use-after-free when accessing timestamp option

Reported-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[refcnt] Fix embedded image building
Alessandro Salvatori [Mon, 5 Jul 2010 10:01:23 +0000 (11:01 +0100)] 
[refcnt] Fix embedded image building

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[pcnet32] Fix uninitialised variable
Michael Brown [Fri, 25 Jun 2010 10:12:40 +0000 (11:12 +0100)] 
[pcnet32] Fix uninitialised variable

Reported-by: Geoff Lywood <glywood@vmware.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[myri10ge] Add NonVolatile Option (nvo) support
Glenn Brown [Wed, 23 Jun 2010 20:18:36 +0000 (13:18 -0700)] 
[myri10ge] Add NonVolatile Option (nvo) support

Add NonVolatile Option (nvo) and NonVolatile Storage (nvs) support to
the myri10ge driver using the EEPROM read/write mechanism provided by
the NIC's Vendor Specific PCI capability.

The myri10ge NIC is capabile of storing 64KB or more of nonvolatile
options, but this patch advertises only 512 bytes of nvo storage
because iPXE malloc's a buffer matching the total size we advertise.
512 is plenty without wasting malloc'd memory.  (The 2 other drivers
currently supporting nvo advertise 256 bytes or less.)

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[settings] Add setting deletion (Ctrl-D) interface
Glenn Brown [Wed, 23 Jun 2010 20:18:35 +0000 (13:18 -0700)] 
[settings] Add setting deletion (Ctrl-D) interface

Make Ctrl-D delete a setting, because the Text User Interface (tui)
previously provided no way to delete a setting.  Also, update the
on-screen instructions to describe the new feature.  Deleting settings
is especially important for settings stored in precious nonvolatile
storage.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[settings] Enable jump scroll in config UI
Glenn Brown [Wed, 23 Jun 2010 20:18:34 +0000 (13:18 -0700)] 
[settings] Enable jump scroll in config UI

Implement jump scrolling with "..." displayed where the settings list
continues off-screen, because there are now too many settings to fit
on screen in the "config ..." text user interface.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[pci] Define Vendor Specific capability ID
Glenn Brown [Wed, 23 Jun 2010 20:18:33 +0000 (13:18 -0700)] 
[pci] Define Vendor Specific capability ID

Add a PCI_CAP_ID_VNDR definition for the PCI standard "Vendor
Specific" capability ID.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[romprefix] Do not check for BBS compatibility
Michael Brown [Thu, 24 Jun 2010 18:03:04 +0000 (19:03 +0100)] 
[romprefix] Do not check for BBS compatibility

The existence and usage of the BEV entry point is covered by the PnP
spec, not the BBS spec; the BBS spec merely describes a policy for
selecting the boot device order.  iPXE should therefore check only for
a PnP BIOS in order to decide whether or not to hook INT19.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[build] Fix broken build caused by implied dependency upon "perl"
Michael Brown [Thu, 24 Jun 2010 16:20:35 +0000 (17:20 +0100)] 
[build] Fix broken build caused by implied dependency upon "perl"

Commit ea12dc0 ("[build] Avoid hard-coding the path to perl")
introduced a build failure for fully clean trees (e.g. after running
"make veryclean"), since the dependency upon $(PARSEROM) now includes
a dependency upon "perl" (which doesn't exist) rather than upon
"/usr/bin/perl" (which does exist).

There should of course be no dependency upon the perl binary at all;
the dependency should be upon "./util/parserom.pl" alone.

Fix by removing the $(PERL) from the definition of Perl-based utility
paths, and adding $(PERL) at the point of usage.

Reported-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[build] Avoid hard-coding the path to perl
Michael Brown [Thu, 24 Jun 2010 00:23:00 +0000 (01:23 +0100)] 
[build] Avoid hard-coding the path to perl

The path "/usr/bin/perl" has been hard-coded since Etherboot 5.1, for
no discernible reason.  Use just "perl" instead to fix the
inconsistency and allow building on systems with Perl installed
outside of /usr/bin.

Reported-by: Gabor Z. Papp <gzp@papp.hu>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[efi] Build iPXE script support into EFI binaries by default
Geoff Lywood [Wed, 16 Jun 2010 21:35:24 +0000 (14:35 -0700)] 
[efi] Build iPXE script support into EFI binaries by default

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[r8169] Remove driver cfg lookup, use pci_device_id->driver_data instead
Andrei Faur [Tue, 22 Jun 2010 16:41:58 +0000 (19:41 +0300)] 
[r8169] Remove driver cfg lookup, use pci_device_id->driver_data instead

This patch removes the cfg lookup made in the r8169 driver and
replaces it with equivalent information found in the driver_data field
of the pci_device_id structure.

Signed-off-by: Andrei Faur <da3drus@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[tls] Handle multiple handshake records
Michael Brown [Wed, 23 Jun 2010 00:01:32 +0000 (01:01 +0100)] 
[tls] Handle multiple handshake records

The handshake record in TLS can contain multiple messages.

Originally-fixed-by: Timothy Stack <tstack@vmware.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[refcnt] Add ref_no_free handler
Joshua Oreman [Thu, 26 Nov 2009 01:27:50 +0000 (17:27 -0800)] 
[refcnt] Add ref_no_free handler

Since more reference-counted structures than embedded images might
want to mark themselves unfreeable, expose a dummy ref_no_free().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[http] Pass through unknown interface method calls
Michael Brown [Tue, 22 Jun 2010 18:33:39 +0000 (19:33 +0100)] 
[http] Pass through unknown interface method calls

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[interface] Allow for non-pass-through interface methods
Michael Brown [Tue, 22 Jun 2010 18:12:40 +0000 (19:12 +0100)] 
[interface] Allow for non-pass-through interface methods

xfer_vredirect() should not be allowed to propagate to a pass-through
interface.  For example, when an HTTPS connection is opened, the
redirect message should cause the TLS layer to reopen the TCP socket,
rather than causing the HTTP layer to disconnect from the TLS layer.

Fix by allowing for non-pass-through interface methods, and setting
xfer_vredirect() to be one such method.

This is slightly ugly, in that it complicates the notion of an
interface method call by adding a "pass-through" / "non-pass-through"
piece of metadata.  However, the only current user of xfer_vredirect()
is iscsi.c, which uses it only because we don't yet have an
ioctl()-style call for retrieving the underlying socket address.
The new interface infrastructure allows for such a call to be created,
at which time this sole user of xfer_vredirect() can be removed,
xfer_vredirect() can cease to be an interface method and become simply
a wrapper around xfer_vreopen(), and the concept of a non-pass-through
interface method can be reverted.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 years ago[interface] Convert all data-xfer interfaces to generic interfaces
Michael Brown [Wed, 16 Jun 2010 00:31:29 +0000 (01:31 +0100)] 
[interface] Convert all data-xfer interfaces to generic interfaces

Remove data-xfer as an interface type, and replace data-xfer
interfaces with generic interfaces supporting the data-xfer methods.

Filter interfaces (as used by the TLS layer) are handled using the
generic pass-through interface capability.  A side-effect of this is
that deliver_raw() no longer exists as a data-xfer method.  (In
practice this doesn't lose any efficiency, since there are no
instances within the current codebase where xfer_deliver_raw() is used
to pass data to an interface supporting the deliver_raw() method.)

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