people/cooldavid/gpxe.git
10 years ago[r8169] Remove r8169 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 r8169 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: Stefan Hajnoczi <stefanha@gmail.com>
10 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
gPXE 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>
10 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 settings, 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 storate.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
10 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>
10 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>
10 years ago[pcnet32] Replace pcnet32 with native driver
Andrei Faur [Sun, 20 Jun 2010 19:23:01 +0000 (22:23 +0300)]
[pcnet32] Replace pcnet32 with native driver

This patch replaces the old pcnet32 driver with a new one that
uses gPXE's API.

Signed-off-by: Andrei Faur <da3drus@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
10 years ago[jme] Fix 64-bit compile of JMicron ethernet driver
Geoff Lywood [Tue, 15 Jun 2010 00:46:36 +0000 (17:46 -0700)]
[jme] Fix 64-bit compile of JMicron ethernet driver

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
10 years ago[ethernet] Move Ethernet MAC address checking routines to ethernet.h
Michael Brown [Fri, 4 Jun 2010 19:24:45 +0000 (22:24 +0300)]
[ethernet] Move Ethernet MAC address checking routines to ethernet.h

Originally-fixed-by: Faur Andrei <da3drus@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
10 years ago[jme] Fix refill behavior
Guo-Fu Tseng [Fri, 4 Jun 2010 14:23:15 +0000 (22:23 +0800)]
[jme] Fix refill behavior

After changing the driver to refill after feed, if any error occurs a
non-contiguous empty buffer will be introduced in the ring due to my
reuse-buffer-when-error implementation.

Reported-by: Marty Connor <mdc@etherboot.org>
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
10 years ago[eepro100] Add PCI ID for Intel Pro/100 VE
Erwan Velu [Thu, 3 Jun 2010 20:28:38 +0000 (22:28 +0200)]
[eepro100] Add PCI ID for Intel Pro/100 VE

Signed-off-by: Erwan Velu <erwanaliasr1@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
10 years ago[lkrnprefix] Fix documentation path in comment
Wu Fengguang [Thu, 3 Jun 2010 03:16:03 +0000 (11:16 +0800)]
[lkrnprefix] Fix documentation path in comment

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
10 years ago[jme] Add JMicron Ethernet driver
Guo-Fu Tseng [Mon, 31 May 2010 22:09:02 +0000 (06:09 +0800)]
[jme] Add JMicron Ethernet driver

A new driver for JMicron Ethernet controller.

Reviewed-by: Joshua Oreman <oremanj@rwcr.net>
Reviewed-by: Michael Brown <mbrown@fensystems.co.uk>
Reviewed-by: Marty Connor <mdc@etherboot.org>
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
10 years ago[efi] Add the "snpnet" driver
Geoff Lywood [Fri, 28 May 2010 03:08:28 +0000 (20:08 -0700)]
[efi] Add the "snpnet" driver

Add a new network driver that consumes the EFI Simple Network Protocol.
Also add a bus driver that can find the Simple Network Protocol that
gPXE was loaded from; the resulting behavior is similar to the
"undionly" driver for BIOS systems.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
10 years ago[efi] Update UEFI header files with latest version from TianoCore
Geoff Lywood [Fri, 28 May 2010 22:06:24 +0000 (15:06 -0700)]
[efi] Update UEFI header files with latest version from TianoCore

Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
10 years ago[iscsi] Allow base64 encoding in large binary values
Piotr Jaroszyński [Fri, 28 May 2010 18:52:47 +0000 (19:52 +0100)]
[iscsi] Allow base64 encoding in large binary values

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
10 years ago[infiniband] Use generic base16 functions for SRP
Michael Brown [Fri, 28 May 2010 18:04:59 +0000 (19:04 +0100)]
[infiniband] Use generic base16 functions for SRP

Signed-off-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
10 years ago[iscsi] Use generic base16 functions for iSCSI
Michael Brown [Fri, 28 May 2010 15:21:56 +0000 (16:21 +0100)]
[iscsi] Use generic base16 functions for iSCSI

Signed-off-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
10 years ago[base16] Add generic base16 encoding and decoding routines
Michael Brown [Fri, 28 May 2010 13:58:04 +0000 (14:58 +0100)]
[base16] Add generic base16 encoding and decoding routines

Base16 encoding is currently implemented in both iSCSI and SRP.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
10 years ago[base64] Add ability to decode base64 strings
Michael Brown [Fri, 28 May 2010 11:42:00 +0000 (12:42 +0100)]
[base64] Add ability to decode base64 strings

Inspired-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
10 years ago[base64] Allow base64_encode() to handle arbitrary data
Michael Brown [Fri, 28 May 2010 00:17:22 +0000 (01:17 +0100)]
[base64] Allow base64_encode() to handle arbitrary data

Signed-off-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
10 years ago[dhcp] Use correct DHCP options on EFI systems
Geoff Lywood [Tue, 4 May 2010 21:31:46 +0000 (14:31 -0700)]
[dhcp] Use correct DHCP options on EFI systems

See RFC 4578 for details.

Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
10 years ago[build] Allow building against a zlib in a non-standard location
Geoff Lywood [Thu, 27 May 2010 21:27:20 +0000 (14:27 -0700)]
[build] Allow building against a zlib in a non-standard location

Support a ZLIB_DIR= variable on the make command line.

Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
10 years ago[efi] Fix *.efi linking
Piotr Jaroszyński [Tue, 30 Mar 2010 16:18:43 +0000 (18:18 +0200)]
[efi] Fix *.efi linking

The linker chooses to look for _start first and always picks
efidrvprefix.o to satisfy it (probably because it's earlier in the
archive) which causes a multiple definition error when the linker
later has to pick efiprefix.o for other symbols. Use EFI-specific
LD_FLAGS with more --defsym magic to work around that.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
10 years ago[efi] Fix link order for elf2efi
Piotr Jaroszyński [Tue, 30 Mar 2010 13:34:17 +0000 (15:34 +0200)]
[efi] Fix link order for elf2efi

Dependencies are considered in left-to-right order so the source file
needs to come first in this case.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
10 years ago[elf2efi] Improve error handling
Geoff Lywood [Thu, 27 May 2010 00:04:12 +0000 (17:04 -0700)]
[elf2efi] Improve error handling

Currently, if you attempt to build 64-bit EFI binaries on a 32-bit system
without a suitable cross-compiling version of libbfd.a, the gPXE build will
die with a segmentation fault in elf2efi64. This fix makes it die with a
slightly more useful error message.

Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
10 years ago[bitmap] Fix bitmaps on 64-bit platforms
Geoff Lywood [Tue, 4 May 2010 21:18:04 +0000 (14:18 -0700)]
[bitmap] Fix bitmaps on 64-bit platforms

Fix mistaken truncation of bitmap blocks to integer size before
testing and comparison. A typical symptom of the error would be
TFTP transfers failing after 32 blocks.

Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
10 years ago[linker] Use weak definitions instead of weak declarations
Joshua Oreman [Thu, 27 May 2010 00:52:44 +0000 (17:52 -0700)]
[linker] Use weak definitions instead of weak declarations

This removes the need for inline safety wrappers, marginally
reducing the size penalty of weak functions, and works around an
apparent binutils bug that causes undefined weak symbols to not
actually be NULL when compiling with -fPIE (as EFI builds do).

A bug in versions of binutils prior to 2.16 (released in 2005)
will cause same-file weak definitions to not work with those
toolchains. Update the README to reflect our new dependency on
binutils >= 2.16.

Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
10 years ago[dhcp] Don't consider invalid offers to be duplicates
Joshua Oreman [Wed, 26 May 2010 21:22:03 +0000 (14:22 -0700)]
[dhcp] Don't consider invalid offers to be duplicates

This fixes a regression in BOOTP support; since BOOTP requests often have
the `siaddr' field set to 0.0.0.0, they would be considered duplicates
of the first zeroed-out offer slot.

Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
10 years ago[compiler] Fix 64bit compile time errors
Piotr Jaroszyński [Tue, 30 Mar 2010 13:33:20 +0000 (15:33 +0200)]
[compiler] Fix 64bit compile time errors

Apart from format specifier fixes there are two changes in proper code:
- Change type of regs in skge_hw to unsigned long
- Cast result of sizeof in myri10ge to uint32_t

Both don't change anything for i386 and should be fine on x86_64.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
10 years ago[dhcp] Honor PXEBS_SKIP option in discovery control
Joshua Oreman [Tue, 25 May 2010 20:17:40 +0000 (16:17 -0400)]
[dhcp] Honor PXEBS_SKIP option in discovery control

It is permissible for a DHCP packet containing PXE options to specify
only "discovery control", instead of the more typical boot menu +
prompt options. This is the strategy used by older versions of
dnsmasq; by specifying the discovery control as PXEBS_SKIP, they cause
vendor PXE ROMs to ignore boot server discovery and just use the
filename and next-server options in the initial (Proxy)DHCP packet.
Modify gPXE to accept this behavior, to be more compatible with the
Intel firmware.

Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
Tested-by: Kyle Kienapfel <kyle@shadowmage.org>
10 years ago[wpa] Remove PMKID checking
Joshua Oreman [Wed, 19 May 2010 03:39:32 +0000 (23:39 -0400)]
[wpa] Remove PMKID checking

PMKID checking is an additional pre-check that helps detect invalid passphrases
before going through the full handshaking procedure. It takes up some amount of
code size, and is not necessary from a security perspective. It also is
implemented improperly by some routers, which was causing gPXE to give spurious
authentication errors. Remove it for these reasons.

Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
10 years ago[comboot] Propagate carry flag from COMBOOT API
Stefan Hajnoczi [Sat, 8 May 2010 10:49:09 +0000 (11:49 +0100)]
[comboot] Propagate carry flag from COMBOOT API

COMBOOT API calls set the carry flag on failure.  This was not being
propagated because the COMBOOT interrupt handler used iret to return
with EFLAGS restored from the stack.  This patch propagates CF before
returning from the interrupt.

Reported-by: Geoff Lywood <glywood@vmware.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[uri] Special case NULL in churi()
Piotr Jaroszyński [Mon, 12 Apr 2010 15:37:10 +0000 (17:37 +0200)]
[uri] Special case NULL in churi()

resolve_uri() doesn't (and probably shouldn't) handle NULL relative_uri.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[uri] Fix NULL dereference in parse_uri()
Piotr Jaroszyński [Mon, 12 Apr 2010 15:15:44 +0000 (17:15 +0200)]
[uri] Fix NULL dereference in parse_uri()

Don't try to parse authority if it's not there.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[eepro100] Remove link-state checking
Thomas Miletich [Fri, 16 Apr 2010 16:11:39 +0000 (18:11 +0200)]
[eepro100] Remove link-state checking

Christopher Armenio reported link detection problems with an
integrated eepro100 NIC.  Thomas Miletich removed link detection code
from the eepro100 driver and verified that the driver continued to
function.  Christopher verified Thomas' patch on his integrated
eepro100 NIC.

Reported-by: Christopher Armenio <christopher.armenio@resquared.com>
Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[util] Hide an expected error from the 'which' command
Piotr Jaroszyński [Mon, 29 Mar 2010 00:15:03 +0000 (02:15 +0200)]
[util] Hide an expected error from the 'which' command

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[build] Look for isolinux.bin in more places
Piotr Jaroszyński [Mon, 29 Mar 2010 00:12:06 +0000 (02:12 +0200)]
[build] Look for isolinux.bin in more places

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[drivers] Fix warnings identified by gcc 4.5
Bruce Rogers [Sat, 3 Apr 2010 00:16:38 +0000 (18:16 -0600)]
[drivers] Fix warnings identified by gcc 4.5

In building gpxe for openSUSE Factory (part of kvm package), there were
a few problems identified by the compiler.  This patch addresses them.

Signed-off-by: Bruce Rogers <brogers@novell.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[build] Add support for local configuration files
Piotr Jaroszyński [Mon, 22 Mar 2010 22:19:00 +0000 (23:19 +0100)]
[build] Add support for local configuration files

Include config/local/$file in config/$file where it makes sense and
create empty local configs during build if not present.

Modified-by: Michael Brown <mcb30@etherboot.org>
Signed-off-by: Michael Brown <mcb30@etherboot.org>
10 years ago[pxe] Remove pxe_set_cached_filename()
Michael Brown [Fri, 26 Mar 2010 17:53:24 +0000 (17:53 +0000)]
[pxe] Remove pxe_set_cached_filename()

gPXE currently overwrites the filename stored in the cached DHCP
packets when a call to PXENV_TFTP_READ_FILE or PXENV_RESTART_TFTP is
made.  This code has existed for many years as a workaround for RIS,
which seemed to require that this be done.

pxe_set_cached_filename() causes problems with the Bootix NBP, and a
recent test demonstrates that RIS will complete successfully even with
pxe_set_cached_filename() removed.  There have been many changes to
the DHCP and PXE logic since this code was first added, and it is
quite plausible that it was masking a bug that no longer exists.

Reported-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
Debugged-by: Shao Miller <Shao.Miller@yrdsb.edu.on.ca>
Signed-off-by: Michael Brown <mcb30@etherboot.org>
10 years ago[pxe] Avoid potential interrupt storms when using shared interrupts
Michael Brown [Tue, 23 Mar 2010 00:58:52 +0000 (00:58 +0000)]
[pxe] Avoid potential interrupt storms when using shared interrupts

Current gPXE code always returns "OURS" in response to
PXENV_UNDI_ISR:START.  This is harmless for non-shared interrupt
lines, and avoids the complexity of trying to determine whether or not
we really did cause the interrupt.  (This is a non-trivial
determination; some drivers don't have interrupt support and hook the
system timer interrupt instead, for example.)

A problem occurs when we have a shared interrupt line, the other
device asserts an interrupt, and the controlling ISR does not chain to
the other device's ISR when we return "OURS".  Under these
circumstances, the other device's ISR never executes, and so the
interrupt remains asserted, causing an interrupt storm.

Work around this by returning "OURS" if and only if our net device's
interrupt is currently recorded as being enabled.  Since we always
disable interrupts as a result of a call to PXENV_UNDI_ISR:START, this
guarantees that we will eventually (on the second call) return "NOT
OURS", allowing the other ISR to be called.  Under normal operation,
including a non-shared interrupt situation, this change will make no
difference since PXENV_UNDI_ISR:START would be called only when
interrupts were enabled anyway.

Signed-off-by: Michael Brown <mcb30@etherboot.org>
10 years ago[netdevice] Record whether or not interrupts are currently enabled
Michael Brown [Tue, 23 Mar 2010 00:55:19 +0000 (00:55 +0000)]
[netdevice] Record whether or not interrupts are currently enabled

Signed-off-by: Michael Brown <mcb30@etherboot.org>
10 years ago[netdevice] Add netdev_is_open() wrapper function
Michael Brown [Tue, 23 Mar 2010 00:46:23 +0000 (00:46 +0000)]
[netdevice] Add netdev_is_open() wrapper function

Signed-off-by: Michael Brown <mcb30@etherboot.org>
10 years ago[phantom] Update interrupt support to match current firmware
Michael Brown [Sat, 20 Mar 2010 03:11:03 +0000 (03:11 +0000)]
[phantom] Update interrupt support to match current firmware

The interrupt control mechanism on Phantom cards has changed
substantially since the driver was initially written.  This updates
the code to match the mechanism used in production firmware.

This is sufficient to allow DOS wget to function successfully using
the 3Com UNDI/NDIS, Intel UNDI/NDIS, and UNDIPD.COM UNDI/PD stacks.

Signed-off-by: Michael Brown <mcb30@etherboot.org>
10 years ago[igb] Add igb driver
Marty Connor [Wed, 17 Mar 2010 07:44:27 +0000 (03:44 -0400)]
[igb] Add igb driver

This commit adds an igb (Intel GigaBit) driver based on Intel source
code available at:

    http://sourceforge.net/projects/e1000/

which is upstream source for the Linux kernel e1000 drivers, and
should support some PCIe e1000 variants.

Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[e1000e] Add e1000e driver
Marty Connor [Wed, 17 Mar 2010 07:18:46 +0000 (03:18 -0400)]
[e1000e] Add e1000e driver

This commit adds an e1000e driver based on Intel source code
available at:

    http://sourceforge.net/projects/e1000/

which is upstream source for the Linux kernel e1000 drivers, and
should support many PCIe e1000 variants.

Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[e1000] Update e1000 driver
Marty Connor [Wed, 17 Mar 2010 07:02:32 +0000 (03:02 -0400)]
[e1000] Update e1000 driver

This commit replaces the current gPXE e1000 driver with one ported
from Intel source code available at

    http://sourceforge.net/projects/e1000/

which is upstream source for the Linux kernel e1000 drivers, and
should support most if not all PCI e1000 variants.

Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[iscsi] Disambiguate some common authentication errors
Michael Brown [Wed, 17 Mar 2010 02:23:17 +0000 (02:23 +0000)]
[iscsi] Disambiguate some common authentication errors

Signed-off-by: Michael Brown <mcb30@etherboot.org>
10 years ago[vxge] Add stub vxge.c file so bin/vxge.usb can be built
Stefan Hajnoczi [Thu, 4 Mar 2010 08:05:01 +0000 (08:05 +0000)]
[vxge] Add stub vxge.c file so bin/vxge.usb can be built

The vxge driver code is split over several files, including vxge_main.c.
This causes the build system and ROM-o-matic to see the driver as
"vxge_main".

This patch adds a stub vxge.c which takes up no space but gives the
driver its proper name, "vxge".

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[fnrec] Add function recorder for debugging
Stefan Hajnoczi [Fri, 5 Feb 2010 22:15:18 +0000 (22:15 +0000)]
[fnrec] Add function recorder for debugging

The function recorder is a crash and hang debugging tool.  It logs each
function call into a memory buffer while gPXE runs.  After the machine
is reset, and if the contents of memory have not been overwritten, gPXE
will detect the memory buffer and print out its contents.

This allows developers to see a trace of the last functions called
before a crash or hang.  The util/fnrec.sh script can be used to convert
the function addresses back into symbol names.

To build with fnrec:

    make FNREC=1

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[build] Disable ccache for embedded.o
Stefan Hajnoczi [Mon, 1 Mar 2010 20:34:47 +0000 (20:34 +0000)]
[build] Disable ccache for embedded.o

Embedded image support uses .incbin in inline assembly to include binary
files.  The file dependency is not spotted by ccache when deciding
whether or not to rebuild embedded.o.  This results in builds that
contain an outdated version of the embedded image when ccache is used.

Reported-by: Tim 'Shaggy' Bielawa <tbielawa@jabber.org>
Reported-by: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[misc] Remove accidentally commited .dotest directory
Marty Connor [Thu, 4 Mar 2010 16:09:56 +0000 (11:09 -0500)]
[misc] Remove accidentally commited .dotest directory

Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[build] Disable ccache for embedded.o
Stefan Hajnoczi [Mon, 1 Mar 2010 20:34:47 +0000 (20:34 +0000)]
[build] Disable ccache for embedded.o

Embedded image support uses .incbin in inline assembly to include binary
files.  The file dependency is not spotted by ccache when deciding
whether or not to rebuild embedded.o.  This results in builds that
contain an outdated version of the embedded image when ccache is used.

Reported-by: Tim 'Shaggy' Bielawa <tbielawa@jabber.org>
Reported-by: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[comboot] Match version strings to SYSLINUX style
Daniel Verkamp [Mon, 1 Mar 2010 01:55:13 +0000 (01:55 +0000)]
[comboot] Match version strings to SYSLINUX style

In the actual SYSLINUX suite's comboot implementation, the version
string is prefixed by CR LF, and the copyright string has a leading
space.  Some tools (specifically HDT) assume these padding characters
exist, so we should probably return strings in a similar format.

Signed-off-by: Michael Brown <mcb30@etherboot.org>
10 years ago[vxge] Add support for X3100 series 10GbE Server/Storage Adapter
Masroor Vettuparambil [Tue, 2 Feb 2010 09:42:36 +0000 (09:42 +0000)]
[vxge] Add support for X3100 series 10GbE Server/Storage Adapter

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Masroor Vettuparambil <masroor.vettuparambil@neterion.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[undi] Ensure only one UNDI instance is loaded
Stefan Hajnoczi [Fri, 12 Feb 2010 18:06:34 +0000 (18:06 +0000)]
[undi] Ensure only one UNDI instance is loaded

Loading multiple UNDI instances would be useful in systems that have
several network cards with vendor PXE ROMs.  However, we cannot rely on
UNDI ROMs working correctly with multiple instances loaded
simultaneously.

The gPXE UNDI driver supports the following multi-NIC configurations:
1. Chainloading undionly.kpxe on a specific NIC.
2. Loading the UNDI driver for the first probed device and ignoring all
   other UNDI devices in the system.

This patch refuses to probe additional UNDI devices so there can never
be multiple instances of UNDI loaded.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[iscsi] Fix interoperability with QNAP TS-639Pro
Danny Volkind [Mon, 22 Feb 2010 04:51:46 +0000 (04:51 +0000)]
[iscsi] Fix interoperability with QNAP TS-639Pro

Modified-by: Michael Brown <mcb30@etherboot.org>
Signed-off-by: Michael Brown <mcb30@etherboot.org>
10 years ago[util] Detect genisoimage as mkisofs replacement
Stefan Hajnoczi [Sat, 13 Feb 2010 17:00:42 +0000 (17:00 +0000)]
[util] Detect genisoimage as mkisofs replacement

Debian based systems may have genisoimage(1) instead of mkisofs(1).
They are command-line compatible so the util/geniso script should be
able to choose either one.

This patch also changes the use of the mkisofs quiet (-q) flag to its
long form (-quiet).  This should be compatible with more versions of
cdrtools and cdrkit.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[hermon] Change hermon_alloc_icm() to conform to ConnectX2 requirements
Itay Gazit [Wed, 25 Nov 2009 18:42:12 +0000 (20:42 +0200)]
[hermon] Change hermon_alloc_icm() to conform to ConnectX2 requirements

Align each ICM member alloc to the member size instead of page size.
Increase multicast table size to 128.

Signed-off-by: Itay Gazit <itaygazit@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[shell_banner] Avoid printing Ctrl-B prompt if BANNER_TIMEOUT <= 0
Marty Connor [Thu, 4 Feb 2010 00:14:35 +0000 (19:14 -0500)]
[shell_banner] Avoid printing Ctrl-B prompt if BANNER_TIMEOUT <= 0

Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[release] Update version to 1.0.0+ post release
Marty Connor [Tue, 2 Feb 2010 16:26:30 +0000 (11:26 -0500)]
[release] Update version to 1.0.0+ post release

Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[release] Update version to 1.0.0 for release v1.0.0
Marty Connor [Tue, 2 Feb 2010 16:12:44 +0000 (11:12 -0500)]
[release] Update version to 1.0.0 for release

Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[proto] Remove unsupported NMB protocol
Stefan Hajnoczi [Sat, 30 Jan 2010 09:57:32 +0000 (09:57 +0000)]
[proto] Remove unsupported NMB protocol

The NMB protocol code came from legacy Etherboot and was never updated
to work as a gPXE protocol.  There has been no demand for this protocol,
so this patch removes it.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[proto] Remove unsupported IGMP protocol
Stefan Hajnoczi [Sat, 30 Jan 2010 09:55:37 +0000 (09:55 +0000)]
[proto] Remove unsupported IGMP protocol

The IGMP code came from legacy Etherboot and was never updated to work
as a gPXE protocol.  There has been no demand for this protocol, so this
patch removes it.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[proto] Remove unsupported NFS protocol
Stefan Hajnoczi [Sat, 30 Jan 2010 09:48:21 +0000 (09:48 +0000)]
[proto] Remove unsupported NFS protocol

The NFS protocol code came from legacy Etherboot and was never updated
to work as a gPXE protocol.  There has been no demand for this protocol,
so this patch removes it.

I have an unfinished NFSv3 over TCP implementation for gPXE that can be
used as the base for new work, should we want to resurrect this
protocol.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[proto] Remove unsupported FSP protocol
Stefan Hajnoczi [Sat, 30 Jan 2010 09:28:52 +0000 (09:28 +0000)]
[proto] Remove unsupported FSP protocol

The FSP protocol code came from legacy Etherboot and was never updated
to work as a gPXE protocol.  There has been no demand for this protocol,
so this patch removes it.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[prefix] Remove unsupported ELF prefices
Stefan Hajnoczi [Fri, 29 Jan 2010 18:33:08 +0000 (18:33 +0000)]
[prefix] Remove unsupported ELF prefices

The .elf, .elfd, .lmelf, and .lmelfd prefices were brought over from
legacy Etherboot and they do not build in gPXE.  This patch removes the
ELF prefices.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[prefix] Remove unsupported .exe prefix
Stefan Hajnoczi [Fri, 29 Jan 2010 18:25:21 +0000 (18:25 +0000)]
[prefix] Remove unsupported .exe prefix

The unfinished .exe prefix was brought over from legacy Etherboot.
There has been no demand for .exe images so this patch removes the
prefix.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[prefix] Remove unsupported .com prefix
Stefan Hajnoczi [Fri, 29 Jan 2010 18:20:21 +0000 (18:20 +0000)]
[prefix] Remove unsupported .com prefix

The DOS .com prefix was brought over from legacy Etherboot but does not
build.  There has been no demand for .com images so this patch removes
the prefix.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[prefix] Remove .bImage in favor of .lkrn
Stefan Hajnoczi [Fri, 29 Jan 2010 18:14:38 +0000 (18:14 +0000)]
[prefix] Remove .bImage in favor of .lkrn

The .lkrn prefix allows gPXE to be loaded as a Linux bzImage.  The
bImage prefix was carried over from legacy Etherboot and does not build.
This patch removes the .bImage prefix, use .lkrn instead.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[http] GET / if URI doesn't contain a path
Joshua Oreman [Wed, 27 Jan 2010 04:56:42 +0000 (23:56 -0500)]
[http] GET / if URI doesn't contain a path

Commit 3d9dd93 introduced a regression in HTTP: if a URI without a
path is specified (e.g. http://netboot.me), we send the empty string
as our GET request. Reintroduce an extra slash when uri->path is NULL,
to turn this into the expected GET /.

Reported-by: Kyle Kienapfel <doctor.whom@gmail.com>
Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[uri] Handle an empty unparse_uri() result properly
Joshua Oreman [Wed, 27 Jan 2010 04:55:23 +0000 (23:55 -0500)]
[uri] Handle an empty unparse_uri() result properly

Previously, if none of the URI parts requested existed in the passed
URI, unparse_uri() would not touch the destination buffer at all; this
could lead to use of uninitialized data. Fix by setting buf[0] = '\0'
before unparsing whenever we have room to do so.

Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[release] Update version to 1.0.0-rc1+ post release
Marty Connor [Tue, 26 Jan 2010 20:00:32 +0000 (15:00 -0500)]
[release] Update version to 1.0.0-rc1+ post release

10 years ago[release] Update version to 1.0.0-rc1 for release v1.0.0-rc1
Marty Connor [Tue, 26 Jan 2010 19:40:57 +0000 (14:40 -0500)]
[release] Update version to 1.0.0-rc1 for release

10 years ago[rtl818x] Remove broken mmio register support
Stefan Hajnoczi [Fri, 22 Jan 2010 18:12:48 +0000 (18:12 +0000)]
[rtl818x] Remove broken mmio register support

The rtl818x driver uses programmed I/O but has a fallback to
memory-mapped I/O registers.  The fallback currently will not work since
the registers are accessed using inl()/outl() programmed I/O functions
in the driver.  This patch removes the fallback to we fail cleanly when
programmed I/O is not possible.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[natsemi] Convert stray mmio readl() to pio inl()
Stefan Hajnoczi [Mon, 25 Jan 2010 08:28:37 +0000 (08:28 +0000)]
[natsemi] Convert stray mmio readl() to pio inl()

This driver uses programmed I/O to access hardware registers.  There is
a stray memory-mapped I/O read on a programmed I/O address.  Perhaps
this is an artifact of porting the driver.  Fix this by converting it to
programmed I/O.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[pxe] Introduce PXE exit hook for NBP chaining
Shao Miller [Sun, 24 Jan 2010 03:12:27 +0000 (22:12 -0500)]
[pxe] Introduce PXE exit hook for NBP chaining

It might be the case that we wish to chain to an NBP without
being "in the way".  We now implement a hook in our exit path
for gPXE *.*pxe build targets.  The hook is a pointer to a
SEG16:OFF16 which we try to jump to during exit.  By default,
this pointer results in the usual exit path.

We also implement the "pxenv_file_exit_hook" PXE API routine
to allow the user to specify an alternate SEG16:OFF16 to jump
to during exit.

Unfortunately, this additional PXE extension has a cost
in code size.  Fortunately, a look at the size difference
for a gPXE .rom build target shows zero size difference
after compression.

The routine is documented in doc/pxe_extensions as follows:

FILE EXIT HOOK

Op-Code: PXENV_FILE_EXIT_HOOK (00e7h)

Input: Far pointer to a t_PXENV_FILE_EXIT_HOOK parameter
structure that has been initialized by the caller.

Output: PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be
returned in AX.  The Status field in the parameter
structure must be set to one of the values represented
by the PXENV_STATUS_xxx constants.

Description:Modify the exit path to jump to the specified code.
Only valid for pxeprefix-based builds.

typedef struct s_PXENV_FILE_EXIT_HOOK {
        PXENV_STATUS_t Status;
        SEGOFF16_t Hook;
} t_PXENV_FILE_EXIT_HOOK;

Set before calling API service:

Hook: The SEG16:OFF16 of the code to jump to.

Returned from API service:

Status: See PXENV_STATUS_xxx constants.

Requested-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[dhcp] Keep multiple DHCP offers received, and use them intelligently
Joshua Oreman [Tue, 3 Nov 2009 18:45:58 +0000 (13:45 -0500)]
[dhcp] Keep multiple DHCP offers received, and use them intelligently

Instead of keeping only the best IP and PXE offers, store all of them,
and pick the best to use just before a request is sent. This allows
priority differentiation to work even when lower-priority offers
provide PXE options, and improves robustness at sites with broken PXE
servers intermingled with working ones: when a ProxyDHCP request times
out, instead of giving up, we try the next PXE offer we've received.
It also allows us to avoid breaking up combined IP+PXE offers, which
can be important with some firewall configurations. This behavior
matches that of most vendor PXE ROMs.

Store a reference to the DHCPOFFER packet in the offer structure, so
that when registering settings after a successful ACK we can register
the proxy PXE settings we originally received; this removes the need
for a nonstandard duplicate REQUEST/ACK to port 67 of proxy servers
like dnsmasq that provide PXE options in the OFFER.

Total cost: 450 bytes uncompressed.

Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[pci] Save and restore PCI command register
Bernhard Kohl [Thu, 21 Jan 2010 23:13:48 +0000 (18:13 -0500)]
[pci] Save and restore PCI command register

This seems to be necessary for some types of PCI devices. We had
problems when using gPXE in KVM virtual machines with direct
PCI device access.

Signed-off-by: Bernhard Kohl <bernhard.kohl@nsn.com>
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Modified-by: Marty Connor <mdc@etherboot.org>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[ftp] User and password URI support for the FTP protocol
gL2n30Y06arv2 [Tue, 29 Dec 2009 17:49:28 +0000 (17:49 +0000)]
[ftp] User and password URI support for the FTP protocol

The default user and password are used for anonymous FTP by default.
This patch adds support for an explicit user name and password in an FTP
URI:

    imgfetch ftp://user:password@server.com/path/to/file

Edited-by: Stefan Hajnoczi <stefanha@gmail.com>. Bugs are my fault.
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[uri] Decode/encode URIs when parsing/unparsing
Joshua Oreman [Wed, 30 Dec 2009 03:36:04 +0000 (22:36 -0500)]
[uri] Decode/encode URIs when parsing/unparsing

Currently, handling of URI escapes is ad-hoc; escaped strings are
stored as-is in the URI structure, and it is up to the individual
protocol to unescape as necessary. This is error-prone and expensive
in terms of code size. Modify this behavior by unescaping in
parse_uri() and escaping in unparse_uri() those fields that typically
handle URI escapes (hostname, user, password, path, query, fragment),
and allowing unparse_uri() to accept a subset of fields to print so
it can be easily used to generate e.g. the escaped HTTP path?query
request.

Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[settings] Add automagic "netX" settings block for last opened netdev
Joshua Oreman [Thu, 22 Oct 2009 04:55:08 +0000 (00:55 -0400)]
[settings] Add automagic "netX" settings block for last opened netdev

A script loaded via autoboot may want to get some of the settings (MAC
address, IP address, et cetera) for the interface via which it was
loaded, in order to pass them to the operating system. Previously such
a script had no way to determine what to put in the X of ${netX/foo}.

Solve this problem by transparently forwarding accesses to the real
settings associated with the most recently opened network device,
so scripts in this situation can say literally ${netX/foo} and get
the foo setting they want.

Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[prefix] Add .xrom prefix for a ROM that loads itself by PCI accesses
Joshua Oreman [Sun, 18 Oct 2009 20:12:51 +0000 (16:12 -0400)]
[prefix] Add .xrom prefix for a ROM that loads itself by PCI accesses

The standard option ROM format provides a header indicating the size
of the entire ROM, which the BIOS will reserve space for, load, and
call as necessary. However, this space is strictly limited to 128k for
all ROMs. gPXE ameliorates this somewhat by reserving space for itself
in high memory and relocating the majority of its code there, but on
systems prior to PCI3 enough space must still be present to load the
ROM in the first place. Even on PCI3 systems, the BIOS often limits the
size of ROM it will load to a bit over 64kB.

These space problems can be solved by providing an artificially small
size in the ROM header: just enough to let the prefix code (at the
beginning of the ROM image) be loaded by the BIOS. To the BIOS, the
gPXE ROM will appear to be only a few kilobytes; it can then load
the rest of itself by accessing the ROM directly using the PCI
interface reserved for that task.

There are a few problems with this approach. First, gPXE needs to find
an unmapped region in memory to map the ROM so it can read from it;
this is done using the crude but effective approach of scanning high
memory (over 0xF0000000) for a sufficiently large region of all-ones
(0xFF) reads. (In x86 architecture, all-ones is returned for accesses
to memory regions that no mapped device can satisfy.) This is not
provably valid in all situations, but has worked well in practice.
More importantly, this type of ROM access can only work if the PCI ROM
BAR exists at all. NICs on physical add-in PCI cards generally must
have the BAR in order for the BIOS to be able to load their ROM, but
ISA cards and LAN-on-Motherboard cards will both fail to load gPXE
using this scheme.

Due to these uncertainties, it is recommended that .xrom only be used
when a regular .rom image is infeasible due to crowded option ROM
space. However, when it works it could allow loading gPXE images
as large as a flash chip one could find - 128kB or even higher.

Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[config] Make PXE stack a compile-time option
Joshua Oreman [Tue, 6 Oct 2009 23:15:06 +0000 (19:15 -0400)]
[config] Make PXE stack a compile-time option

For extremely tight space requirements and specific applications, it is
sometimes desirable to create gPXE images that cannot provide the PXE API
functionality to client programs. Add a configuration header option,
PXE_STACK, that can be removed to remove this stack. Also add PXE_MENU
to control the PXE boot menu, which most uses of gPXE do not need.

Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[pxe] Support cached DHCP packets in .kkpxe images
Joshua Oreman [Tue, 8 Dec 2009 08:48:15 +0000 (03:48 -0500)]
[pxe] Support cached DHCP packets in .kkpxe images

If we don't unload the PXE stack before executing gPXE, automatically
take advantage of the cached DHCPACK that the underlying/parent PXE
stack can provide. If that cached DHCPACK contains option 175.178, or
the user sets the use-cached setting before invoking DHCP, the real
DHCP request will be skipped and the cached DHCPACK will be used for
network configuration. Otherwise, the cached settings block is thrown
away as soon as a fresh one is acquired.

Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[dhcp] Add generic facility for using cached network settings
Joshua Oreman [Tue, 8 Dec 2009 08:40:50 +0000 (03:40 -0500)]
[dhcp] Add generic facility for using cached network settings

When a DHCP session is started (using autoboot or a command-line `dhcp
net0'), check whether the new setting use-cached (DHCP option 175.178)
is TRUE; if so, skip DHCP and rely on currently registered
settings. This lets one combine a static IP with autoboot.

Before checking the use-cached setting, call a weak
get_cached_dhcpack() hook that can be implemented by particular builds
of gPXE supporting some fashion of retrieving a cached DHCPACK packet.
If one is available, it is registered as an options source, and then
either that packet's option 175.178 or the user's prior manual
use-cached setting can allow skipping duplicate DHCP.

Using cached packets is not the default because DHCP servers are often
configured to give gPXE different options than they give a vendor PXE
client; in order to break the infinite loop of PXE chaining, one would
need to load a gPXE with an embedded image that does something more
than autoboot.

Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[pxe] Separate parent PXE API caller from UNDINET driver
Joshua Oreman [Tue, 8 Dec 2009 08:38:50 +0000 (03:38 -0500)]
[pxe] Separate parent PXE API caller from UNDINET driver

Calling the parent PXE stack (the stack that loaded us, for
undionly.kkpxe) can be useful for more than UNDI calls; for instance,
it lets us get cached DHCP packets to avoid re-DHCP when working with
embedded images.

Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[linker] Add safe weak symbol macros
Joshua Oreman [Thu, 26 Nov 2009 02:10:05 +0000 (18:10 -0800)]
[linker] Add safe weak symbol macros

Weak symbols are a useful tool in eliminating unnecessary dependencies
between object files, but they are somewhat dangerous because one must
remember to test the weak symbol against NULL before using it. To
rectify that, add macros for declaring weak functions that will return
a default value inline if the file defining them is not available at
link time.

Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[contrib] Add README file to rom-o-matic
Marty Connor [Tue, 19 Jan 2010 02:37:14 +0000 (21:37 -0500)]
[contrib] Add README file to rom-o-matic

Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[tftp] Abort requests with error code 0
Stefan Hajnoczi [Mon, 18 Jan 2010 20:53:20 +0000 (20:53 +0000)]
[tftp] Abort requests with error code 0

There is no defined error code for aborting a request but 0 is commonly
used.  This patch switches the abort request error code from
TFTP_ERR_UNKNOWN_TID (5) to 0.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[tftp] Make TFTP size requests abort transfer with an error
Thomas Horsten [Thu, 7 Jan 2010 17:02:13 +0000 (17:02 +0000)]
[tftp] Make TFTP size requests abort transfer with an error

pxenv_tftp_get_fsize is an API call that PXE clients can call to
obtain the size of a remote file. It is implemented by starting a TFTP
transfer with pxe_tftp_open, waiting for the response and then
stopping the transfer with pxe_tftp_close(). This leaves the session
hanging on the TFTP server and it will try to resend the packet
repeatedly (verified with tftpd-hpa) until it times out.

This patch adds a method "tftpsize" that will abort the transfer after
the first packet is received from the server. This will terminate the
session on the server and is the same behaviour as Intel's PXE ROM
exhibits.

Together with a qemu patch to handle the ERROR packet (submitted to
qemu's mailing list), this resolves a specific issue where booting
pxegrub with qemu's TFTP server would be slow or hang.

I've tested this against qemu's tftp server and against my normal boot
infrastructure (tftpd-hpa). Booting pxegrub and loading extra files
now produces a trace similar to Intel's PXE client and there are no
spurious retransmits from tftpd any more.

Signed-off-by: Thomas Horsten <thomas@horsten.com>
Signed-off-by: Milan Plzik <milan.plzik@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[contrib] Add .hrom format to rom-o-matic
Marty Connor [Sun, 17 Jan 2010 19:11:52 +0000 (14:11 -0500)]
[contrib] Add .hrom format to rom-o-matic

Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[contrib] Add rom-o-matic to contrib
Marty Connor [Sun, 17 Jan 2010 03:23:45 +0000 (22:23 -0500)]
[contrib] Add rom-o-matic to contrib

10 years ago[contrib] Move most contrib content to a separate repository
Marty Connor [Sun, 17 Jan 2010 02:47:39 +0000 (21:47 -0500)]
[contrib] Move most contrib content to a separate repository

Most of the content that was previously in this directory has been
moved to a separate git repository:

    http://git.etherboot.org/?p=contrib.git;a=summary

or the Etherboot Project wiki:

    http://etherboot.org/

10 years ago[sanboot] Prevent leaking a stack reference for "keep-san" AoE
Stefan Hajnoczi [Tue, 5 Jan 2010 08:05:32 +0000 (08:05 +0000)]
[sanboot] Prevent leaking a stack reference for "keep-san" AoE

When the "keep-san" option is used, the function is exited without
unregistering the stack allocated int13h drive.  To prevent a dangling
pointer to the stack, these structs should be heap allocated.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[tftp] Remove unnecessary delay when opening a connection
Stefan Hajnoczi [Wed, 13 Jan 2010 17:57:41 +0000 (17:57 +0000)]
[tftp] Remove unnecessary delay when opening a connection

The retry timer is used to retransmit TFTP packets lost on the network,
and to start a new connection.  There is an unnecessary delay while
waiting for name resolution because the timer period is fixed and cannot
be shortened when name resolution completes.  This patch keeps the timer
period at zero while name resolution takes place so that no time is lost
once before sending the first packet.

Reported-by: Thomas Horsten <thomas@horsten.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[tftp] Allow fetching larger files by wrapping block number
Stefan Hajnoczi [Sun, 10 Jan 2010 19:05:17 +0000 (19:05 +0000)]
[tftp] Allow fetching larger files by wrapping block number

This patch adds TFTP support for files larger than 65535 blocks by
wrapping the 16-bit block number.

Reported-by: Mark Johnson <johnson.nh@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[dhcp] Assume PXE options are in DHCPOFFER only if boot menu is included
Joshua Oreman [Tue, 3 Nov 2009 18:37:57 +0000 (13:37 -0500)]
[dhcp] Assume PXE options are in DHCPOFFER only if boot menu is included

IBM's Tivoli Provisioning Manager for OS Deployment, when acting as a
ProxyDHCP server, sends an initial offer with a vendor class of "PXEClient"
and vendor-encapsulated options that have nothing to do with PXE. To
differentiate between this case and the case of a ProxyDHCP server that
sends all PXE options in its initial offer, modify gPXE to check for
the presence of an encapsulated PXE boot menu option (43.9) instead of
simply checking for the existence of any encapsulated options at all.
This is the same check used by the Intel vendor PXE ROM.

Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[dhcp] Accept ProxyDHCP replies of type DHCPOFFER
Joshua Oreman [Tue, 3 Nov 2009 18:31:12 +0000 (13:31 -0500)]
[dhcp] Accept ProxyDHCP replies of type DHCPOFFER

The PXE standard provides examples of ProxyDHCP responses being encoded both
as type DHCPOFFER and DHCPACK, but currently we only accept DHCPACKs. Since
there are PXE servers in existence that respond to ProxyDHCPREQUESTs with
DHCPOFFERs, modify gPXE's ProxyDHCP pruning logic to treat both types of
responses equally.

Signed-off-by: Marty Connor <mdc@etherboot.org>
10 years ago[skge] Note correct author of akge driver
Thomas Miletich [Thu, 14 Jan 2010 17:23:52 +0000 (12:23 -0500)]
[skge] Note correct author of akge driver

The previous [skge] commit should have been recorded as authored by
Thomas Miletich <thomas.miletich@gmail.com>

I mistakenly committed it improperly after fixing a merge issue.

Signed-off-by: Marty Connor <mdc@etherboot.org>