Michael Brown [Fri, 24 Apr 2009 02:16:18 +0000 (03:16 +0100)]
[multiboot] Work around raw-flag bug in Solaris kernels
Solaris kernels are multiboot images with the "raw" flag set,
indicating that the loader should use the raw address fields within
the multiboot header rather than looking for an ELF header. However,
the Solaris kernel contains garbage data in the raw address fields,
and requires us to use the ELF header instead.
Work around this by always using the ELF header if present. This
renders the "raw" flag somewhat redundant.
Michael Brown [Sat, 18 Apr 2009 16:10:00 +0000 (17:10 +0100)]
[doc] Remove obsolete README.pixify
Michael Brown [Sat, 18 Apr 2009 15:19:29 +0000 (16:19 +0100)]
[build] Automatically sort the list of constituent object sizes
Michael Brown [Sat, 18 Apr 2009 14:55:01 +0000 (15:55 +0100)]
[build] Provide mechanism for listing constituent object sizes
You can now type e.g.
make bin/rtl8139.rom.sizes
in order to see the (uncompressed) sizes of all of the object files
linked in to bin/rtl8139.rom. This should make it easier to identify
relevant code bloat.
Michael Brown [Fri, 17 Apr 2009 13:08:47 +0000 (14:08 +0100)]
[build] Remove obsolete linker script files
Michael Brown [Fri, 17 Apr 2009 12:43:35 +0000 (13:43 +0100)]
[build] Kill off the multiple-object-per-source-file mechanism
Now that there are no remaining multiple-object source files, kill off
the mechanism in order to simplify the Makefile.
Michael Brown [Fri, 17 Apr 2009 12:38:18 +0000 (13:38 +0100)]
[build] Kill off the last multiple-object source file
The build mechanism currently allows for multiple objects per source
file. The only remaining user of this is unnrv2b.S. Replace this
usage with a separate unnrv2b16.S wrapper file, as is currently used
for e.g. pxeprefix.S and kpxeprefix.S.
Michael Brown [Fri, 17 Apr 2009 11:38:44 +0000 (12:38 +0100)]
[build] Provide mechanism for listing per-target source files
You can now type e.g.
make bin/rtl8139.rom.deps
to see a list of the source files included in the build of
bin/rtl8139.rom. This is intended to assist with copyright vetting.
Other new debugging targets include
make bin/rtl8139.rom.objs
to see a list of object files linked in to bin/rtl8139.rom, and
make bin/rtl8139.rom.nodeps
to see a list of the source files that are *not* required for the
build of bin/rtl8139.rom.
Michael Brown [Thu, 16 Apr 2009 05:13:09 +0000 (06:13 +0100)]
[build] Simplify use of Getopt::Long in padimg.pl
Sometimes it's just so much fun doing things the complicated way that
you forget to check the man page for the existence of a simpler
syntax.
Michael Brown [Thu, 16 Apr 2009 04:59:44 +0000 (05:59 +0100)]
[build] Reinstate the .pdsk padded-floppy image format
Some utilities that expect a floppy disk image (e.g. iLO?) may test
for a file of the correct size. Reinstate the .pdsk image format in
order to provide this if needed.
Michael Brown [Thu, 16 Apr 2009 02:15:08 +0000 (03:15 +0100)]
[build] Pad .rom, .dsk, and .hd images to 512-byte boundaries
QEMU will silently round down a disk or ROM image file to the nearest
512 bytes. Fix by always padding .rom, .dsk and .hd images to the
nearest 512-byte boundary.
Originally-fixed-by: Stefan Hajnoczi <stefanha@gmail.com>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Michael Brown [Tue, 31 Mar 2009 05:26:51 +0000 (06:26 +0100)]
[int13] Improve debugging messages
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.
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.
Michael Brown [Mon, 30 Mar 2009 12:28:33 +0000 (13:28 +0100)]
[http] Support HTTP redirection
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.
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).
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.
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>
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>
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>
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>
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>
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>
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>
Michael Brown [Tue, 10 Mar 2009 17:50:01 +0000 (17:50 +0000)]
[build] Enable building with the Intel C compiler (icc)
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
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>
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.
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.
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>
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>
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>
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.)
Michael Brown [Mon, 2 Mar 2009 02:29:20 +0000 (02:29 +0000)]
[release] Update version to 0.9.7+ post release
Michael Brown [Mon, 2 Mar 2009 02:23:42 +0000 (02:23 +0000)]
[release] Update version to 0.9.7 for release
Michael Brown [Mon, 2 Mar 2009 02:19:07 +0000 (02:19 +0000)]
[release] Remove obsolete VERSION file
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>
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.
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.
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
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.
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.
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.
Michael Brown [Thu, 19 Feb 2009 10:37:30 +0000 (10:37 +0000)]
[scsi] Fix DBG() message reporting of error number
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.
Michael Brown [Thu, 19 Feb 2009 01:20:09 +0000 (01:20 +0000)]
[crypto] Add our own general-purpose cipher-block chaining routines
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.
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.
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.
Michael Brown [Wed, 18 Feb 2009 21:25:14 +0000 (21:25 +0000)]
[crypto] Rename aes_algorithm to aes_cbc_algorithm
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.
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>.
Michael Brown [Wed, 18 Feb 2009 04:48:30 +0000 (04:48 +0000)]
[i386] Kill off obsolete boot1a.s file
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.
Michael Brown [Tue, 17 Feb 2009 12:10:35 +0000 (12:10 +0000)]
[image] Redact password from URIs displayed by imgfetch()
Michael Brown [Tue, 17 Feb 2009 12:01:47 +0000 (12:01 +0000)]
[login] Add "login" command and UI
Michael Brown [Tue, 17 Feb 2009 11:57:31 +0000 (11:57 +0000)]
[settings] Allow store_setting() to access the root settings block
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.
Michael Brown [Tue, 17 Feb 2009 11:55:55 +0000 (11:55 +0000)]
[editbox] Allow for password widgets that do not display their contents
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.
Michael Brown [Tue, 17 Feb 2009 06:59:15 +0000 (06:59 +0000)]
[icmp] Add support for responding to pings
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)
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.
Michael Brown [Tue, 17 Feb 2009 02:03:16 +0000 (02:03 +0000)]
[comboot] Unhook interrupt vectors after returning from a COMBOOT image
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.
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.
Michael Brown [Mon, 16 Feb 2009 04:56:55 +0000 (04:56 +0000)]
[uri] Allow use of relative URIs when calling churi()
Michael Brown [Mon, 16 Feb 2009 03:53:25 +0000 (03:53 +0000)]
[build] Cope with oddities in the Fedora 10 assembler
The version of the GNU assembler shipped with Fedora 10
(2.18.50.0.9-8.fc10) complains about character literals in some of our
assembly code. Changing $'x' to $( 'x' ) seems to fix the problem.
Yes, the whitespace is required; using just $('x') does not work.
Reported by Kevin O'Connor <kevin@koconnor.net>.
Michael Brown [Mon, 16 Feb 2009 02:14:46 +0000 (02:14 +0000)]
[build] Fix building on gcc 3
GCC did not support #pragma GCC visibility until version 4.0.
Michael Brown [Mon, 16 Feb 2009 01:06:40 +0000 (01:06 +0000)]
[build] Allow NO_WERROR=1 to inhibit --fatal-warnings as well as -Werror
Michael Brown [Mon, 16 Feb 2009 00:30:48 +0000 (00:30 +0000)]
[image] Avoid claiming zero-length images as valid
Both the script and PXE images types will claim a zero-length image.
Inhibit this to avoid end-user surprises.
Michael Brown [Mon, 16 Feb 2009 00:28:30 +0000 (00:28 +0000)]
[image] Allow multiple embedded images
This patch extends the embedded image feature to allow multiple
embedded images instead of just one.
gPXE now always boots the first embedded image on startup instead of
doing the hardcoded DHCP boot (aka autoboot).
Based heavily upon a patch by Stefan Hajnoczi <stefanha@gmail.com>.
Michael Brown [Sun, 15 Feb 2009 11:42:15 +0000 (11:42 +0000)]
[romprefix] Update ROM checksum even if PMM allocation fails
There are code paths other than PMM allocation that can result in our
changing the ROM checksum. For example, we attempt to update our
product string to incorporate the PCI bus:dev.fn number. In a system
that does not support PMM, we could therefore end up with an incorrect
checksum.
Fix by attempting to update the checksum unconditionally.
Michael Brown [Sun, 15 Feb 2009 11:05:00 +0000 (11:05 +0000)]
[build] Treat warnings as errors in assembly files
Add --fatal-warnings to ASFLAGS; this is the equivalent of -Werror in
CFLAGS (which we have used since July 2007).
Michael Brown [Sun, 15 Feb 2009 10:54:52 +0000 (10:54 +0000)]
[i386] Add explicit flags and type on all .section declarations
Try to avoid future problems caused by implicit section flags and/or
type information by instituting a policy that all .section
declarations must explicitly state the flags and type.
Most of this change was achieved using
perl -pi \
-e 's/".text"$/".text", "ax", \@progbits/ ; ' \
-e 's/".text16"$/".text16", "ax", \@progbits/ ; ' \
-e 's/".text16.null"$/".text16.null", "ax", \@progbits/ ; ' \
-e 's/".text16.data"$/".text16.data", "aw", \@progbits/ ; ' \
-e 's/".data"$/".data", "aw", \@progbits/ ; ' \
-e 's/".data16"$/".data16", "aw", \@progbits/ ; ' \
-e 's/".bss"$/".bss", "aw", \@nobits/ ; ' \
-e 's/".bss16"$/".bss16", "aw", \@nobits/ ; ' \
-e 's/".prefix"$/".prefix", "ax", \@progbits/ ; ' \
-e 's/".prefix.lib"$/".prefix.lib", "awx", \@progbits/ ; ' \
-e 's/".prefix.data"$/".prefix.data", "aw", \@progbits/ ; ' \
-e 's/".weak"$/".weak", "a", \@nobits/ ; ' \
`git grep -l '\.section'`
Michael Brown [Sun, 15 Feb 2009 10:02:26 +0000 (10:02 +0000)]
[i386] Add explicit ""aw", @nobits" declarations to stack sections
As reported by Stefan, commit 13d09e6 ("[i386] Simplify linker script
and standardise linker-defined symbol names") breaks gdb, readelf and
associated utilities.
This is caused by the .stack section overwriting a block in the middle
of the .debug_info section (despite being included in the
.bss.textdata section in the output file, which apparently has the
correct attributes for a .bss section).
Fixed by adding explicit flags and type to the stack section
declaration.
Michael Brown [Sun, 15 Feb 2009 08:41:46 +0000 (08:41 +0000)]
[xfer] Make consistent assumptions that xfer metadata can never be NULL
The documentation in xfer.h and xfer.c does not say that the metadata
parameter is optional in calls such as xfer_deliver_iob_meta() and the
deliver_iob() method. However, some code in net/ is prepared to
accept a NULL pointer, and xfer_deliver_as_iob() passes a NULL pointer
directly to the deliver_iob() method.
Fix this mess of conflicting assumptions by making everything assume
that the metadata parameter is mandatory, and fixing
xfer_deliver_as_iob() to pass in a dummy metadata structure (as is
already done in xfer_deliver_iob()).
Michael Brown [Sun, 15 Feb 2009 07:50:23 +0000 (07:50 +0000)]
[umalloc] Avoid problems when _textdata_memsz is a multiple of 4kB
If it happens that _textdata_memsz ends up being an exact multiple of
4kB, then this will cause the .textdata section (after relocation) to
start on a page boundary. This means that the hidden memory region
(which is rounded down to the nearest page boundary) will start
exactly at virtual address 0, i.e. UNULL. This means that
init_eheap() will erroneously assume that it has failed to allocate a
an external heap, since it typically ends up choosing the area that
lies immediately below .textdata, which in this case will be the
region with top==UNULL.
A subsequent error is that memtop_urealloc() passes through the error
return status -ENOMEM to the caller, which (rightly) assumes that the
result represents a valid userptr_t address.
Fixed by using alternative tests for heap non-existence, and by
returning UNULL in case of an error from init_eheap().
Michael Brown [Fri, 13 Feb 2009 16:26:43 +0000 (16:26 +0000)]
[http] Allow for URI encodings within username and password
Michael Brown [Fri, 13 Feb 2009 15:43:17 +0000 (15:43 +0000)]
[http] Add support for HTTP Basic authentication
Michael Brown [Fri, 13 Feb 2009 14:54:13 +0000 (14:54 +0000)]
[base64] Add base64 encoding functions
Michael Brown [Thu, 12 Feb 2009 09:16:53 +0000 (09:16 +0000)]
[settings] Handle errors in fetchf_uristring()
fetchf_uristring() was failing to handle error values from
fetch_setting(), resulting in its attempting to allocate extremely
large temporary buffers on the stack (and so overrunning the stack and
locking up the machine).
Problem reported by Shao Miller <Shao.Miller@yrdsb.edu.on.ca>.
Michael Brown [Tue, 10 Feb 2009 17:37:24 +0000 (17:37 +0000)]
[tls] Use our own ASN.1 routines for certificate parsing
Use our own, more robust, ASN.1 parsing routines to extract the RSA
public key from a server certificate. Remove the now-unused AXTLS
ASN.1 parser.
Michael Brown [Tue, 10 Feb 2009 15:47:44 +0000 (15:47 +0000)]
[crypto] Remove unused files
Itay Gazit [Mon, 9 Feb 2009 12:40:48 +0000 (12:40 +0000)]
[mtnic] Add multiport support and some minor fixes
Signed-off-by: Michael Brown <mcb30@etherboot.org>
Thomas Miletich [Fri, 6 Feb 2009 13:35:29 +0000 (08:35 -0500)]
[sundance] Added NIC variant
This previously unsupported NIC variant was was found to work using
the current driver:
PCI_ROM(0x13f0, 0x0200, "ip100a", "IC+ IP100A"),
Signed-off-by: Marty Connor <mdc@etherboot.org>
Michael Brown [Thu, 5 Feb 2009 19:29:16 +0000 (19:29 +0000)]
[pxe] Display the "Press F8" prompt rather than displaying menu with timeout
The PXE spec dictates the rather ugly feature that we have to present
a DHCP-specified prompt string to the user, then wait to see if they
press F8 before displaying the menu.
This seems to me to be a significant retrograde step from the current
situation of displaying the menu with the timeout counting down
against the default selected boot option, but apparently the lack of
the "Press F8" prompt causes some confusion.