people/oremanj/gpxe.git
11 years agoMerge branch 'master' of git://git.etherboot.org/scm/gpxe
Joshua Oreman [Wed, 15 Apr 2009 23:20:49 +0000 (16:20 -0700)]
Merge branch 'master' of git://git.etherboot.org/scm/gpxe

11 years ago[dhcp] Accept filename via DHCP option 67 as well as BOOTP filename field
Michael Brown [Wed, 15 Apr 2009 20:08:02 +0000 (21:08 +0100)]
[dhcp] Accept filename via DHCP option 67 as well as BOOTP filename field

Allow options with dedicated BOOTP fields to fall back to using the
equivalent DHCP option if the relevant field is empty.

11 years ago[smbios] Add asset tag setting
Timothy Stack [Tue, 31 Mar 2009 22:20:07 +0000 (15:20 -0700)]
[smbios] Add asset tag setting

Add SMBIOS asset tag as a named setting.

Signed-off-by: Michael Brown <mcb30@etherboot.org>
11 years ago[gdb] Allow resynchronisation with gdb
Stefan Hajnoczi [Wed, 15 Apr 2009 16:16:31 +0000 (17:16 +0100)]
[gdb] Allow resynchronisation with gdb

This replaces the gdbstub's polite NAK behavior with retransmission of
the current outstanding reply packet.  It solves situations where gdb
and gPXE's gdbstub get out of sync due to the lack of flow control in
the gdb protocol spec.

Signed-off-by: Michael Brown <mcb30@etherboot.org>
11 years ago[build] Round up SUBx deltas
Stefan Hajnoczi [Sat, 11 Apr 2009 10:13:09 +0000 (11:13 +0100)]
[build] Round up SUBx deltas

The zbin compressor fixup utility rounds down file sizes before
calculating their difference.  This produces incorrect values and may
cause truncated gPXE images to be loaded at boot.

The following example explains the problem:
ilen    = 48 bytes     (uncompressed input file)
olen    = 17 bytes     (compressed output file)
divisor = 16 bytes     (paragraph granularity)
fixmeup = 3 paragraphs (value to fix up)

olen / divisor - ilen / divisor
= 1 - 3
= -2 paragraphs  (old delta calculation)

( align ( olen, divisor ) - align ( ilen, divisor ) ) / divisor
= 2 - 3
= -1 paragraphs  (new delta calculation)

If we perform the SUBx operation with old delta:
fixmeup + -2 = 1 paragraph gets loaded by the prefix

With the new delta:
fixmeup + -1 = 2 paragraphs get loaded by the prefix

The old delta calculation removes the last paragraph; the prefix will
load a truncated copy of gPXE into memory.  We need to load 2
paragraphs since olen is 17 bytes.  Loading only 1 paragraph (16
bytes) would truncate the last byte.

Signed-off-by: Michael Brown <mcb30@etherboot.org>
11 years ago[pcbios] Don't use "lret $2" to return from an interrupt
H. Peter Anvin [Sun, 12 Apr 2009 01:30:22 +0000 (18:30 -0700)]
[pcbios] Don't use "lret $2" to return from an interrupt

Using "lret $2" to return from an interrupt causes interrupts to be
disabled in the calling program, since the INT instruction will have
disabled interrupts.  Instead, patch CF on the stack and use iret to
return.

Interestingly, the original PC BIOS had this bug in at least one
place.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Michael Brown <mcb30@etherboot.org>
11 years agoAdd fireserve to CLEANUP
Joshua Oreman [Mon, 13 Apr 2009 04:39:31 +0000 (21:39 -0700)]
Add fireserve to CLEANUP

11 years agoRemove ref to removed memdebug code
Joshua Oreman [Mon, 13 Apr 2009 04:37:22 +0000 (21:37 -0700)]
Remove ref to removed memdebug code

11 years agoAdd errfile decl.
Joshua Oreman [Mon, 13 Apr 2009 04:22:46 +0000 (21:22 -0700)]
Add errfile decl.

11 years agoOops, forgot another.
Joshua Oreman [Mon, 13 Apr 2009 04:20:45 +0000 (21:20 -0700)]
Oops, forgot another.

11 years agoOops, forgot a file.
Joshua Oreman [Mon, 13 Apr 2009 04:20:10 +0000 (21:20 -0700)]
Oops, forgot a file.

11 years agoAdd protocol for loading images over FireWire. Mainly for development.
Joshua Oreman [Mon, 13 Apr 2009 04:19:32 +0000 (21:19 -0700)]
Add protocol for loading images over FireWire. Mainly for development.

11 years agoAdd firebug to CLEANUP
Joshua Oreman [Mon, 13 Apr 2009 04:38:52 +0000 (21:38 -0700)]
Add firebug to CLEANUP

11 years agoTypo fix
Joshua Oreman [Mon, 13 Apr 2009 04:32:34 +0000 (21:32 -0700)]
Typo fix

11 years agoFireWire debugging fixes, speedups, and reorganizations.
Joshua Oreman [Mon, 13 Apr 2009 04:18:39 +0000 (21:18 -0700)]
FireWire debugging fixes, speedups, and reorganizations.

11 years agobetter bus reset code
Joshua Oreman [Fri, 10 Apr 2009 09:50:26 +0000 (02:50 -0700)]
better bus reset code

11 years agoZero last fix: no __always_inline
Joshua Oreman [Thu, 9 Apr 2009 10:10:50 +0000 (03:10 -0700)]
Zero last fix: no __always_inline

11 years agoOne last fix: no need for 'initialized' check
Joshua Oreman [Thu, 9 Apr 2009 10:08:08 +0000 (03:08 -0700)]
One last fix: no need for 'initialized' check

11 years agofixes re Stefan's code review
Joshua Oreman [Thu, 9 Apr 2009 09:51:38 +0000 (02:51 -0700)]
fixes re Stefan's code review

11 years agoremove #ifdef OHCI1394_DEBUG, no longer used
Joshua Oreman [Tue, 7 Apr 2009 05:11:29 +0000 (22:11 -0700)]
remove #ifdef OHCI1394_DEBUG, no longer used

11 years agotab fix
Joshua Oreman [Tue, 7 Apr 2009 05:07:56 +0000 (22:07 -0700)]
tab fix

11 years agoLeave GDB configuration defines properly #undef'ed
Joshua Oreman [Tue, 7 Apr 2009 05:07:11 +0000 (22:07 -0700)]
Leave GDB configuration defines properly #undef'ed

11 years agoCommenting & cleanup
Joshua Oreman [Tue, 7 Apr 2009 05:04:11 +0000 (22:04 -0700)]
Commenting & cleanup

11 years agoremove spurious debugging statements
Joshua Oreman [Tue, 7 Apr 2009 04:25:47 +0000 (21:25 -0700)]
remove spurious debugging statements

11 years agoPoll gPXE regularly for new data.
Joshua Oreman [Tue, 7 Apr 2009 03:56:26 +0000 (20:56 -0700)]
Poll gPXE regularly for new data.

11 years agomore debug whee
Joshua Oreman [Tue, 7 Apr 2009 03:43:07 +0000 (20:43 -0700)]
more debug whee

11 years agodebugging fixes
Joshua Oreman [Tue, 7 Apr 2009 03:35:55 +0000 (20:35 -0700)]
debugging fixes

11 years agodebugging fixes
Joshua Oreman [Tue, 7 Apr 2009 02:36:58 +0000 (19:36 -0700)]
debugging fixes

11 years ago[gdbstub-firewire] Add missing gpxe/nap.h include
Joshua Oreman [Tue, 7 Apr 2009 02:16:50 +0000 (19:16 -0700)]
[gdbstub-firewire] Add missing gpxe/nap.h include

11 years ago[gdbstub-firewire] Add GDB middle-end, plus small changes to the FireWire stub to...
Joshua Oreman [Tue, 7 Apr 2009 01:47:12 +0000 (18:47 -0700)]
[gdbstub-firewire] Add GDB middle-end, plus small changes to the FireWire stub to accomodate it.

11 years ago[gdbstub-firewire] Add {rx,tx}_ringaddr parameters to link structure so debugger...
Joshua Oreman [Mon, 6 Apr 2009 23:35:13 +0000 (16:35 -0700)]
[gdbstub-firewire] Add {rx,tx}_ringaddr parameters to link structure so debugger knows where to poke.

11 years ago[gdbstub-firewire] Bugfixes and integration for the firewire stub
Joshua Oreman [Mon, 6 Apr 2009 20:35:56 +0000 (13:35 -0700)]
[gdbstub-firewire] Bugfixes and integration for the firewire stub

Not much more to be said than that, really!

11 years agoGDB firewire backend.
Joshua Oreman [Mon, 6 Apr 2009 05:23:27 +0000 (22:23 -0700)]
GDB firewire backend.

11 years agoOHCI 1394 stub driver for debugging.
Joshua Oreman [Mon, 6 Apr 2009 05:15:54 +0000 (22:15 -0700)]
OHCI 1394 stub driver for debugging.

11 years agoFix mkisofs command line to work with newest versions.
Joshua Oreman [Mon, 6 Apr 2009 05:15:29 +0000 (22:15 -0700)]
Fix mkisofs command line to work with newest versions.

11 years agosky2 driver. Still buggy.
Joshua Oreman [Mon, 6 Apr 2009 05:14:20 +0000 (22:14 -0700)]
sky2 driver. Still buggy.

11 years ago[build] Don't assume the existence of "seq"
Michael Brown [Tue, 31 Mar 2009 10:06:35 +0000 (11:06 +0100)]
[build] Don't assume the existence of "seq"

The "seq" command is GNU-specific; a BSD userland will not have it.
Use POSIX-conforming "awk" instead.

Reported-by: Joshua Oreman <oremanj@rwcr.net>
Suggested-by: Stefan Hajnoczi <stefanha@gmail.com>
11 years ago[efi] Allow building with non-system libbfd
Michael Brown [Tue, 31 Mar 2009 08:36:08 +0000 (09:36 +0100)]
[efi] Allow building with non-system libbfd

On Mac OS X, it is necessary to build binutils manually; the system
does not provide bfd.h or the libbfd or libiberty libraries.

Originally-fixed-by: Joshua Oreman <oremanj@rwcr.net>
11 years ago[efi] Fix compilation on Mac OS X.
Michael Brown [Tue, 31 Mar 2009 06:32:16 +0000 (07:32 +0100)]
[efi] Fix compilation on Mac OS X.

The Mac compiler treats "#pragma pack()" as gcc's "#pragma pack(pop)",
and so dies if the pragma pack stack is empty.  Adding a "#pragma
pack(1)" immediately beforehand is enough to keep the Mac compiler
happy.

The combination of "#pragma pack(1)", "#pragma pack()" won't actually
achieve anything on a Mac, but it will at least build.  (With gcc, the
"#pragma pack()" overrides any previous pragmas, so is still useful.)

Suggested-by: Joshua Oreman <oremanj@rwcr.net>
11 years ago[build] Use __SIZE_TYPE__ macro in definition of size_t
Joshua Oreman [Tue, 31 Mar 2009 06:20:11 +0000 (07:20 +0100)]
[build] Use __SIZE_TYPE__ macro in definition of size_t

This is required in order to build on Mac OS X.

Modified-by: Michael Brown <mcb30@etherboot.org>
Signed-off-by: Michael Brown <mcb30@etherboot.org>
11 years ago[3c90x] Add missing size_t format specifier
Joshua Oreman [Tue, 31 Mar 2009 06:10:40 +0000 (07:10 +0100)]
[3c90x] Add missing size_t format specifier

Signed-off-by: Michael Brown <mcb30@etherboot.org>
11 years ago[efi] Use POSIX version of basename() in elf2efi.c
Michael Brown [Tue, 31 Mar 2009 06:07:44 +0000 (07:07 +0100)]
[efi] Use POSIX version of basename() in elf2efi.c

This is required in order to build on Mac OS X.

Suggested-by: Joshua Oreman <oremanj@rwcr.net>
11 years ago[build] Add --divide to ASFLAGS if supported by the assembler
Michael Brown [Tue, 31 Mar 2009 06:01:06 +0000 (07:01 +0100)]
[build] Add --divide to ASFLAGS if supported by the assembler

Some builds of the GNU assembler will treat a '/' character as a
comment delimiter.  Adding "--divide" will cause it to be treated as a
division operator, as we expect.  The "--divide" option is not
available in all gas versions, so apply it only conditionally.

Suggested-by: Joshua Oreman <oremanj@rwcr.net>
11 years ago[int13] Improve debugging messages
Michael Brown [Tue, 31 Mar 2009 05:26:51 +0000 (06:26 +0100)]
[int13] Improve debugging messages

11 years ago[segment] Add "Requested memory not available" error message
Michael Brown [Tue, 31 Mar 2009 03:38:48 +0000 (04:38 +0100)]
[segment] Add "Requested memory not available" error message

prep_segment() can sometimes fail because an image requests memory
that is already in use by gPXE.  This will happen if
e.g. undionly.kpxe is used to boot memtest86; the memtest86 image is
an old-format kernel that needs to be loaded at 9000:0000, but this
area of memory may well already be in use by the underlying PXE stack.

Add a human-friendly error message, so that the cause is more
immediately visible.

11 years ago[resolv] Simplify xfer_redirect() logic
Michael Brown [Mon, 30 Mar 2009 14:23:57 +0000 (15:23 +0100)]
[resolv] Simplify xfer_redirect() logic

Now that we have xfer_vreopen() as the default .vredirect handler,
sending redirection events can become simpler.

11 years ago[http] Support HTTP redirection
Michael Brown [Mon, 30 Mar 2009 12:28:33 +0000 (13:28 +0100)]
[http] Support HTTP redirection

11 years ago[xfer] Implement xfer_vreopen() to properly handle redirections
Michael Brown [Mon, 30 Mar 2009 12:24:56 +0000 (13:24 +0100)]
[xfer] Implement xfer_vreopen() to properly handle redirections

When handling a redirection event, we need to close the existing
connection before opening the new connection.

11 years ago[bzimage] Support old (pre-2.00 bootloader) Linux kernel formats
Michael Brown [Mon, 30 Mar 2009 10:32:28 +0000 (11:32 +0100)]
[bzimage] Support old (pre-2.00 bootloader) Linux kernel formats

This allows gPXE to load memtest86, which is packaged as an old kernel.

Split all code that directly touches the kernel headers out into
bzimage_parse_header() and bzimage_update_header(), to reduce code
size and offset the cost of supporting older kernels.

Total cost of this feature: 11 bytes (uncompressed).

11 years ago[build] Avoid always rebuilding bin/embedded.o
Michael Brown [Fri, 27 Mar 2009 04:47:08 +0000 (04:47 +0000)]
[build] Avoid always rebuilding bin/embedded.o

bin/embedded.o has a build dependency on bin/.embedded.list, which
gets generated automatically by the Makefile.  However, if the
EMBEDDED_IMAGE list is empty, bin/.embedded.list will never be
created, and so bin/embedded.o will be rebuilt every time due to a
missing dependency.

Fix by forcing bin/.embedded.list to be created even if the list is
empty.

11 years ago[digest] md5sum and sha1sum commands
Daniel Verkamp [Thu, 26 Mar 2009 22:04:31 +0000 (17:04 -0500)]
[digest] md5sum and sha1sum commands

Modified-by: Michael Brown <mcb30@etherboot.org>
Signed-off-by: Michael Brown <mcb30@etherboot.org>
11 years ago[netdevice] Add debug message for unknown network-layer protocols
Michael Brown [Thu, 26 Mar 2009 16:14:24 +0000 (16:14 +0000)]
[netdevice] Add debug message for unknown network-layer protocols

Suggested-by: Bill Lortz <Bill.Lortz@premier.org>
11 years ago[pcnet32] Fix received packet corruption
Michael Brown [Thu, 26 Mar 2009 15:31:15 +0000 (15:31 +0000)]
[pcnet32] Fix received packet corruption

The pcnet32 driver mismanages its RX buffers, with the result that
packets get corrupted if more than one packet arrives between calls to
poll().

Originally-fixed-by: Bill Lortz <Bill.Lortz@premier.org>
Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com>
Tested-by: Stefan Hajnoczi <stefanha@gmail.com>
11 years ago[forcedeth] Add support for newer forcedeth NICs
Thomas Miletich [Thu, 26 Mar 2009 10:26:55 +0000 (10:26 +0000)]
[forcedeth] Add support for newer forcedeth NICs

Also adds the MAC_ADDR_CORRECT flag, to indicate whether or not the
MAC address needs to be fixed up by the driver.

Signed-off-by: Michael Brown <mcb30@etherboot.org>
11 years ago[pci] Add driver_data field to struct pci_device_id
Thomas Miletich [Thu, 26 Mar 2009 10:19:03 +0000 (10:19 +0000)]
[pci] Add driver_data field to struct pci_device_id

Modified-by: Michael Brown <mcb30@etherboot.org>
Signed-off-by: Michael Brown <mcb30@etherboot.org>
11 years ago[time] Add the sleep command
Shao Miller [Sat, 21 Mar 2009 05:48:15 +0000 (01:48 -0400)]
[time] Add the sleep command

Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com>
Reviewed-by: Thomas Miletich <thomas.miletich@gmail.com>
Modified-by: Michael Brown <mcb30@etherboot.org>
Signed-off-by: Michael Brown <mcb30@etherboot.org>
11 years ago[settings] Fix broken assertion in fetch_string_setting_copy()
Michael Brown [Thu, 26 Mar 2009 09:50:52 +0000 (09:50 +0000)]
[settings] Fix broken assertion in fetch_string_setting_copy()

Reported-by: Stefan Hajnoczi <stefanha@gmail.com>
11 years ago[build] Enable building with the Intel C compiler (icc)
Michael Brown [Tue, 10 Mar 2009 17:50:01 +0000 (17:50 +0000)]
[build] Enable building with the Intel C compiler (icc)

11 years ago[3c90x] Remove src/drivers/3c90x.txt
Marty Connor [Fri, 13 Mar 2009 15:59:47 +0000 (11:59 -0400)]
[3c90x] Remove src/drivers/3c90x.txt

Most of the 3c90x.txt file is obsolete.  The content from the file has
been placed here:

   http://etherboot.org/wiki/appnotes/3c90x_issues

11 years ago[3c90x] 3c90x driver rewrite using gPXE API
Thomas Miletich [Wed, 4 Mar 2009 21:02:13 +0000 (16:02 -0500)]
[3c90x] 3c90x driver rewrite using gPXE API

This is a major rewrite of the legacy etherboot 3c90x driver using the
gPXE API for much improved performance over the legacy driver it
replaces.

This driver has been tested on 3c905, 3c905B, and 3c905C cards.

Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com>
Reviewed-by: Marty Connor <mdc@etherboot.org>
Tested-by: Marty Connor <mdc@etherboot.org>
Tested-by: Daniel Verkamp <daniel@drv.nu>
Signed-off-by: Marty Connor <mdc@etherboot.org>
11 years ago[tables] Incorporate table data type information into table definition
Michael Brown [Fri, 13 Mar 2009 00:13:38 +0000 (00:13 +0000)]
[tables] Incorporate table data type information into table definition

Eliminate the potential for mismatches between table names and the
table entry data type by incorporating the data type into the
definition of the table, rather than specifying it explicitly in each
table accessor method.

11 years ago[tables] Redefine methods for accessing linker tables
Michael Brown [Thu, 12 Mar 2009 19:41:40 +0000 (19:41 +0000)]
[tables] Redefine methods for accessing linker tables

Intel's C compiler (icc) chokes on the zero-length arrays that we
currently use as part of the mechanism for accessing linker table
entries.  Abstract away the zero-length arrays, to make a port to icc
easier.

Introduce macros such as for_each_table_entry() to simplify the common
case of iterating over all entries in a linker table.

Represent table names as #defined string constants rather than
unquoted literals; this avoids visual confusion between table names
and C variable or type names, and also allows us to force a
compilation error in the event of incorrect table names.

11 years ago[tcp] Avoid setting PSH flag when SYN flag is set
Michael Brown [Tue, 10 Mar 2009 08:15:47 +0000 (08:15 +0000)]
[tcp] Avoid setting PSH flag when SYN flag is set

Some firewall devices seem to regard SYN,PSH as an invalid flag
combination and reject the packet.  Fix by setting PSH only if SYN is
not set.

Reported-by: DSE Incorporated <dseinc@gmail.com>
11 years ago[time] Add the time command
Daniel Verkamp [Wed, 4 Mar 2009 05:17:06 +0000 (23:17 -0600)]
[time] Add the time command

Signed-off-by: Michael Brown <mcb30@etherboot.org>
11 years ago[pxeprefix] Merge common code between !PXE and PXENV+
H. Peter Anvin [Mon, 2 Mar 2009 04:56:26 +0000 (20:56 -0800)]
[pxeprefix] Merge common code between !PXE and PXENV+

The parsing of the !PXE and PXENV+ structures share a fair bit of
code; merge the common code to save a few bytes.

Signed-off-by: Michael Brown <mcb30@etherboot.org>
11 years ago[settings] Allow for autovivification of settings blocks
Michael Brown [Fri, 6 Mar 2009 14:40:44 +0000 (14:40 +0000)]
[settings] Allow for autovivification of settings blocks

Allow for settings blocks to be created on demand.  This allows for
constructions such as

  set defaults/filename http://bootserver/bootfile
  set defaults/priority 0xff
  dhcp net0
  chain ${filename}

which will boot from the DHCP-provided filename, or from
"http://bootserver/bootfile" if the DHCP server does not provide a
filename.

(Note that "priority" gets interpreted as a signed integer, so setting
"defaults/priority" to 0xff will cause the "defaults" settings block
to have an effective priority of -1.)

11 years ago[release] Update version to 0.9.7+ post release
Michael Brown [Mon, 2 Mar 2009 02:29:20 +0000 (02:29 +0000)]
[release] Update version to 0.9.7+ post release

11 years ago[release] Update version to 0.9.7 for release v0.9.7
Michael Brown [Mon, 2 Mar 2009 02:23:42 +0000 (02:23 +0000)]
[release] Update version to 0.9.7 for release

11 years ago[release] Remove obsolete VERSION file
Michael Brown [Mon, 2 Mar 2009 02:19:07 +0000 (02:19 +0000)]
[release] Remove obsolete VERSION file

11 years ago[sundance] Add reset completion check
Thomas Miletich [Fri, 27 Feb 2009 18:52:03 +0000 (13:52 -0500)]
[sundance] Add reset completion check

Following the example of the Linux driver, we add a check and delay to
make sure that the NIC has finished resetting before the driver issues
any additional commands.

Signed-off-by: Marty Connor <mdc@etherboot.org>
11 years ago[infiniband] Kill off obsolete mlx_ipoib directory
Michael Brown [Wed, 25 Feb 2009 05:07:41 +0000 (05:07 +0000)]
[infiniband] Kill off obsolete mlx_ipoib directory

This directory contains the old Etherboot implementation of IPoIB boot
from Mellanox, which has long been obsoleted by gPXE's own
implementation.

11 years ago[image] Allow for zero embedded images
Michael Brown [Tue, 24 Feb 2009 05:51:21 +0000 (05:51 +0000)]
[image] Allow for zero embedded images

Having a default script containing

  #!gpxe
  autoboot

can cause problems when entering commands to load and start a kernel
manually; the default script image will still be present when the
kernel is started and so will be treated as an initrd.  It is possible
to work around this by typing "imgfree" before any other commands, but
this is counter-intuitive.

Fix by allowing the embedded image list to be empty (in which case we
just call autoboot()), and making this the default.

Reported by alkisg@gmail.com.

11 years ago[image] Added "chain" command to fetch, load, and execute image
Shao Miller [Tue, 23 Dec 2008 15:46:00 +0000 (10:46 -0500)]
[image] Added "chain" command to fetch, load, and execute image

The "chain" command combines the functions of "imgfetch", "imgload",
and "boot".

    chain http://etherboot.org/gtest/gtest.gpxe

is equivalent to:

    kernel http://etherboot.org/gtest/gtest.gpxe
    boot

11 years ago[pxe] Set %ax to zero on entry to PXE NBP
Michael Brown [Mon, 23 Feb 2009 08:43:27 +0000 (08:43 +0000)]
[pxe] Set %ax to zero on entry to PXE NBP

This is not strictly an entry requirement, but it does mean that a PXE
NBP returning without setting %ax will appear to have returned
success.

11 years ago[pxeprefix] Search for the PXE entry points through all methods
H. Peter Anvin [Wed, 18 Feb 2009 05:56:08 +0000 (21:56 -0800)]
[pxeprefix] Search for the PXE entry points through all methods

Search for the PXE entry points (via the !PXE or PXENV+ structures)
through all known combinations of search methods.  Furthermore, if we
find a PXENV+ structure, attempt to use it to find the !PXE structure
if at all possible.

11 years ago[iscsi] Include credentials in iBFT only if used during iSCSI login
Michael Brown [Fri, 20 Feb 2009 21:41:00 +0000 (21:41 +0000)]
[iscsi] Include credentials in iBFT only if used during iSCSI login

Avoid passing credentials in the iBFT that were available but not
required for login.  This works around a problem in the Microsoft
iSCSI initiator, which will refuse to initiate sessions if the CHAP
password is fewer than 12 characters, even if the target ends up not
asking for CHAP authentication.

11 years ago[scsi] Fix DBG() message reporting of error number
Michael Brown [Thu, 19 Feb 2009 10:37:30 +0000 (10:37 +0000)]
[scsi] Fix DBG() message reporting of error number

11 years ago[crypto] Allow creation of arbitrary CBC cipher algorithms using CBC_CIPHER()
Michael Brown [Thu, 19 Feb 2009 01:48:52 +0000 (01:48 +0000)]
[crypto] Allow creation of arbitrary CBC cipher algorithms using CBC_CIPHER()

Given any block cipher, a corresponding CBC mode of behaviour for the
cipher can be created using the CBC_CIPHER() macro.

11 years ago[crypto] Add our own general-purpose cipher-block chaining routines
Michael Brown [Thu, 19 Feb 2009 01:20:09 +0000 (01:20 +0000)]
[crypto] Add our own general-purpose cipher-block chaining routines

11 years ago[crypto] Change cipher_{en,de}crypt() to void functions
Michael Brown [Wed, 18 Feb 2009 22:27:34 +0000 (22:27 +0000)]
[crypto] Change cipher_{en,de}crypt() to void functions

It is a programming error, not a runtime error, if we attempt to use
block ciphers with an incorrect blocksize, so use an assert() rather
than an error status return.

11 years ago[crypto] Split crypto_algorithm into {digest,cipher,pubkey}_algorithm
Michael Brown [Wed, 18 Feb 2009 21:56:02 +0000 (21:56 +0000)]
[crypto] Split crypto_algorithm into {digest,cipher,pubkey}_algorithm

The various types of cryptographic algorithm are fundamentally
different, and it was probably a mistake to try to handle them via a
single common type.

pubkey_algorithm is a placeholder type for now.

11 years ago[crypto] Move AES_convert_key() hack into axtls_aes.c
Michael Brown [Wed, 18 Feb 2009 21:33:54 +0000 (21:33 +0000)]
[crypto] Move AES_convert_key() hack into axtls_aes.c

Although the nature of the hack is essentially unchanged, this allows
us to remove the hardcoded assumption in tls.c that the RX cipher is
AES.

11 years ago[crypto] Rename aes_algorithm to aes_cbc_algorithm
Michael Brown [Wed, 18 Feb 2009 21:25:14 +0000 (21:25 +0000)]
[crypto] Rename aes_algorithm to aes_cbc_algorithm

11 years ago[pxe] Initialize EDX on PXE NBP entry and INT 1Ah
H. Peter Anvin [Wed, 18 Feb 2009 06:28:46 +0000 (22:28 -0800)]
[pxe] Initialize EDX on PXE NBP entry and INT 1Ah

The PXE 1.x spec specifies that on NBP entry or on return from INT
1Ah AX=5650h, EDX shall point to the physical address of the PXENV+
structure.  The PXE 2.x spec drops this requirement, simply stating
that EDX is clobbered.  Given the principle "be conservative in what
you send, liberal in what you accept", however, we should implement
this anyway.

11 years ago[pxeprefix] Add .kkpxe image type and ability to return via PXE stack
Michael Brown [Mon, 27 Oct 2008 01:06:00 +0000 (01:06 +0000)]
[pxeprefix] Add .kkpxe image type and ability to return via PXE stack

Certain combinations of PXE stack and BIOS result in a broken INT 18
call, which will leave the system displaying a "PRESS ANY KEY TO
REBOOT" message instead of proceeding to the next boot device.  On
these systems, returning via the PXE stack is the only way to continue
to the next boot device.  Returning via the PXE stack works only if we
haven't already blown away the PXE base code in pxeprefix.S.

In most circumstances, we do want to blow away the PXE base code.
Base memory is a limited resource, and it is desirable to reclaim as
much as possible.  When we perform an iSCSI boot, we need to place the
iBFT above the 512kB mark, because otherwise it may not be detected by
the loaded OS; this may not be possible if the PXE base code is still
occupying that memory.

Introduce a new prefix type .kkpxe which will preserve both the PXE
base code and the UNDI driver (as compared to .kpxe, which preserves
the UNDI driver but uninstalls the PXE base code).  This prefix type
can be used on systems that are known to experience the specific
problem of INT 18 being broken, or in builds (such as gpxelinux.0) for
which it is particularly important to know that returning to the BIOS
will work.

Written by H. Peter Anvin <hpa@zytor.com> and Stefan Hajnoczi
<stefanha@gmail.com>, minor structural alterations by Michael Brown
<mcb30@etherboot.org>.

11 years ago[i386] Kill off obsolete boot1a.s file
Michael Brown [Wed, 18 Feb 2009 04:48:30 +0000 (04:48 +0000)]
[i386] Kill off obsolete boot1a.s file

11 years ago[dhcp] Use a default user-class of "gPXE"
Michael Brown [Tue, 17 Feb 2009 22:03:28 +0000 (22:03 +0000)]
[dhcp] Use a default user-class of "gPXE"

This change makes it possible to break the PXE-chaining infinite loop
even when restricted to a Windows DHCP server.

11 years ago[image] Redact password from URIs displayed by imgfetch()
Michael Brown [Tue, 17 Feb 2009 12:10:35 +0000 (12:10 +0000)]
[image] Redact password from URIs displayed by imgfetch()

11 years ago[login] Add "login" command and UI
Michael Brown [Tue, 17 Feb 2009 12:01:47 +0000 (12:01 +0000)]
[login] Add "login" command and UI

11 years ago[settings] Allow store_setting() to access the root settings block
Michael Brown [Tue, 17 Feb 2009 11:57:31 +0000 (11:57 +0000)]
[settings] Allow store_setting() to access the root settings block

11 years ago[http] Send authentication information whenever username is present
Michael Brown [Tue, 17 Feb 2009 11:56:27 +0000 (11:56 +0000)]
[http] Send authentication information whenever username is present

Send authentication information if the username is present, even if
the password is empty.

11 years ago[editbox] Allow for password widgets that do not display their contents
Michael Brown [Tue, 17 Feb 2009 11:55:55 +0000 (11:55 +0000)]
[editbox] Allow for password widgets that do not display their contents

11 years ago[pxe] Allow Escape to abort PXE menu selections
Michael Brown [Tue, 17 Feb 2009 07:35:57 +0000 (07:35 +0000)]
[pxe] Allow Escape to abort PXE menu selections

Other vendor PXE stacks tend to allow the Escape key to be used to
abort menu selection.  Allow Escape (as well as Ctrl-C) to abort
selection.

11 years ago[icmp] Add support for responding to pings
Michael Brown [Tue, 17 Feb 2009 06:59:15 +0000 (06:59 +0000)]
[icmp] Add support for responding to pings

11 years ago[comboot] Implement INT 22h AX=001Bh (Cleanup, shuffle, and boot to real mode)
Daniel Verkamp [Mon, 29 Sep 2008 15:45:57 +0000 (10:45 -0500)]
[comboot] Implement INT 22h AX=001Bh (Cleanup, shuffle, and boot to real mode)

11 years ago[comboot] Restore the real-mode stack pointer on exit from a COMBOOT image
Michael Brown [Tue, 17 Feb 2009 03:33:26 +0000 (03:33 +0000)]
[comboot] Restore the real-mode stack pointer on exit from a COMBOOT image

COMBOOT images use INTs to issue API calls; these end up making calls
into gPXE from real mode, and so temporarily change the real-mode
stack pointer.  When our COMBOOT code uses a longjmp() to implement
the various "exit COMBOOT image" API calls, this leaves the real-mode
stack pointer stuck with its temporary value, which causes problems if
we eventually try to exit out of gPXE back to the BIOS.

Fix by adding rmsetjmp() and rmlongjmp() calls (analogous to
sigsetjmp()/siglongjmp()); these save and restore the additional state
needed for real-mode calls to function correctly.

11 years ago[comboot] Unhook interrupt vectors after returning from a COMBOOT image
Michael Brown [Tue, 17 Feb 2009 02:03:16 +0000 (02:03 +0000)]
[comboot] Unhook interrupt vectors after returning from a COMBOOT image

11 years ago[comboot] Fix reference counting on replacement images
Michael Brown [Tue, 17 Feb 2009 01:45:12 +0000 (01:45 +0000)]
[comboot] Fix reference counting on replacement images

When chaining COMBOOT images, the old images now get freed correctly.

11 years ago[comboot] Allow for tail recursion of COMBOOT images
Michael Brown [Tue, 17 Feb 2009 00:47:35 +0000 (00:47 +0000)]
[comboot] Allow for tail recursion of COMBOOT images

Multi-level menus via COMBOOT rely on the COMBOOT program being able
to exit and invoke a new COMBOOT program (the next menu).  This works,
but rapidly (within about five iterations) runs out of space in gPXE's
internal stack, since each new image is executed in a new function
context.

Fix by allowing tail recursion between images; an image can now
specify a replacement image for itself, and image_exec() will perform
the necessary tail recursion.

11 years ago[uri] Allow use of relative URIs when calling churi()
Michael Brown [Mon, 16 Feb 2009 04:56:55 +0000 (04:56 +0000)]
[uri] Allow use of relative URIs when calling churi()