Lynus Vaz [Thu, 11 Jun 2009 18:26:24 +0000 (23:56 +0530)]
Bugs fixed. Fixed memory leaks (hopefully).
Lynus Vaz [Wed, 10 Jun 2009 15:03:20 +0000 (20:33 +0530)]
Smaller parser with strings
Lynus Vaz [Mon, 8 Jun 2009 18:29:27 +0000 (23:59 +0530)]
Added support for strings in parser
Lynus Vaz [Tue, 2 Jun 2009 17:04:04 +0000 (22:34 +0530)]
Fixed a bug that caused gPXE to crash after an arith parse error
Lynus Vaz [Sat, 30 May 2009 18:05:03 +0000 (23:35 +0530)]
Fixed some bugs in the arithmetic parser
Lynus Vaz [Thu, 28 May 2009 13:42:13 +0000 (19:12 +0530)]
Arithmetic parser with variable expansion
Lynus Vaz [Tue, 26 May 2009 18:36:46 +0000 (00:06 +0530)]
Added my expression parser as hci/arith.c.
Daniel Verkamp [Mon, 25 May 2009 20:32:48 +0000 (16:32 -0400)]
[comboot] Implement stub calls for auxiliary data vector handling
Signed-off-by: Michael Brown <mcb30@etherboot.org>
Daniel Verkamp [Wed, 10 Dec 2008 08:35:02 +0000 (02:35 -0600)]
[ethernet] Add MII link status functions from Linux
Signed-off-by: Michael Brown <mcb30@etherboot.org>
Daniel Verkamp [Wed, 10 Dec 2008 08:30:54 +0000 (02:30 -0600)]
[ethernet] Update mii.h and use it in drivers that had a private copy
Signed-off-by: Michael Brown <mcb30@etherboot.org>
Daniel Verkamp [Wed, 10 Dec 2008 07:11:50 +0000 (01:11 -0600)]
[ethernet] Move struct mii_if_info to mii.h
Signed-off-by: Michael Brown <mcb30@etherboot.org>
Michael Brown [Tue, 26 May 2009 10:05:58 +0000 (11:05 +0100)]
[settings] Allow for arbitrarily-named settings
This provides a mechanism for using arbitrarily-named variables within
gPXE, using the existing syntax for settings.
Michael Brown [Tue, 26 May 2009 05:58:53 +0000 (06:58 +0100)]
[multiboot] Include argv[0] as part of "command line"
Grub will include the module name as part of the command line, and
some multiboot kernels expect this to be done.
Michael Brown [Thu, 21 May 2009 09:22:42 +0000 (10:22 +0100)]
[dhcp] Choose ProxyDHCP port based on presence of PXE options
If the ProxyDHCPOFFER already includes PXE options (i.e. option 60 is
set to "PXEClient" and option 43 is present) then assume that the
ProxyDHCPREQUEST can be sent to port 67, rather than port 4011. This
is a reasonable assumption, since in that case the ProxyDHCP server
has already demonstrated by responding to the DHCPDISCOVER that it is
listening on port 67. (If the ProxyDHCP server were not listening on
port 67, then the standard DHCP server would have been configured to
respond with option 60 set to "PXEClient" but no option 43 present.)
The PXE specification is ambiguous on this point; the specified
behaviour covers only the cases in which option 43 is *not* present in
the ProxyDHCPOFFER. In these cases, we will continue to send the
ProxyDHCPREQUEST to port 4011.
This change is required in order to allow us to interoperate with
dnsmasq, which listens only on port 67. (dnsmasq relies on
unspecified behaviour of the Intel PXE stack, which it seems will
retain the ProxyDHCPOFFER as an options source and never issue a
ProxyDHCPREQUEST, thereby enabling dnsmasq to omit listening on port
4011.)
Thomas Miletich [Thu, 21 May 2009 08:50:48 +0000 (10:50 +0200)]
[serial] Define constants for serial port I/O addresses
Tested with COM1 and COM2.
Signed-off-by: Michael Brown <mcb30@etherboot.org>
Michael Brown [Wed, 20 May 2009 09:03:13 +0000 (10:03 +0100)]
[tftp] Process OACKs even if malformed
IBM Tivoli PXE Server 5.1.0.3 is reported to send trailing garbage
bytes at the end of the OACK packet, which causes gPXE to reject the
packet and abort the TFTP transfer.
Work around the problem by processing as much as possible of the OACK,
and treating name/value parsing errors as non-fatal.
Reported-by: Shao Miller <Shao.Miller@yrdsb.edu.on.ca>
Michael Brown [Wed, 20 May 2009 07:54:41 +0000 (08:54 +0100)]
[settings] Fix erroneous bit-masking in fetch_uintz_setting()
Michael Brown [Wed, 20 May 2009 07:16:51 +0000 (08:16 +0100)]
[dhcp] Send broadcast PXE boot server discovery requests to port 67
We currently send all boot server discovery requests to port 4011.
Section 2.2.1 of the PXE spec states that boot server discovery
packets should be "sent broadcast (port 67), multicast (port 4011), or
unicast (port 4011)". Adjust our behaviour so that any boot server
discovery packets that are sent to the broadcast address are directed
to port 67 rather than port 4011.
This is required for operation with dnsmasq as a PXE server, since
dnsmasq listens only on port 67, and relies upon this (specified)
behaviour.
This change may break some setups using the (itself very broken) Linux
PXE server from kano.org.uk. This server will, in its default
configuration, listen only on port 4011. It never constructs a boot
server list (PXE_BOOT_SERVERS, option 43.8), and uses the wrong
definitions for the discovery control bits (PXE_DISCOVERY_CONTROL,
option 43.6). The upshot is that it will always instruct the client
to perform multicast and broadcast discovery only. In setups lacking
a valid multicast route on the server side, this used to work because
gPXE would eventually give up on the (non-responsive) multicast
address and send a broadcast request to port 4011, which the Linux PXE
server would respond to. Now that gPXE correctly sends this broadcast
request to port 67 instead, it is never seen by the Linux PXE server,
and the boot fails. The fix is to either (a) set up a multicast route
correctly on the server side before starting the PXE server, or (b)
edit /etc/pxe.conf to contain the server's unicast address in the
"multicast_address" field (a hack that happens to work).
Suggested-by: Simon Kelley <simon@thekelleys.org.uk>
Michael Brown [Tue, 19 May 2009 14:54:35 +0000 (15:54 +0100)]
[dhcp] Perform ProxyDHCP only if we do not already have PXE options
This prevents gPXE from wasting time attempting to contact a ProxyDHCP
server on port 4011 if the DHCP response already contains the relevant
PXE options. This behaviour is hinted at (though not explicitly
specified) in the PXE spec, and seems to match what the Intel client
does.
Suggested-by: Simon Kelley <simon@thekelleys.org.uk>
Michael Brown [Mon, 18 May 2009 08:33:36 +0000 (09:33 +0100)]
[legal] Add FILE_LICENCE declaration to romprefix.S
Michael Brown [Fri, 1 May 2009 14:41:06 +0000 (15:41 +0100)]
[legal] Add a selection of FILE_LICENCE declarations
Add FILE_LICENCE declarations to almost all files that make up the
various standard builds of gPXE.
Michael Brown [Wed, 29 Apr 2009 07:51:27 +0000 (08:51 +0100)]
[legal] Add licence.pl and %.licence make target
It is now possible to run e.g.
make bin/rtl8139.dsk.licence
in order to see a licensing assessment for any given gPXE build. The
assessment will either produce a single overall licence for the build
(based on combining all the licences used within the source files for
that build), or will exit with an error stating why a licence
assessment is not possible (for example, if there are files involved
that do not yet contain an explicit FILE_LICENCE() declaration).
Michael Brown [Mon, 27 Apr 2009 13:11:59 +0000 (14:11 +0100)]
[legal] Add mechanism for explicit per-file licence declarations
For partly historical reasons, various files in the gPXE source tree
are licensed under different, though compatible, terms. Most of the
code is licensed under GPLv2 with the "or later" clause, but there are
exceptions such as:
The string.h file, which derives from Linux and is licensed as
Public Domain.
The EFI header files, which are taken from the EDK2 source tree and
are licensed under BSD.
The 3c90x driver, which has a custom GPL-like licence text.
Introduce a FILE_LICENCE() macro to make licensing more explicit.
This macro should be applied exactly once to each source (.c, .S or
.h) file. It will cause a corresponding zero-sized common symbol to
be added to any .o files generated from that source file (and hence to
any final gPXE binaries generated from that source file). Determining
the applicable licences to generated files can then be done using e.g.
$ objdump -t bin/process.o | grep __licence
00000000 O *COM*
00000001 .hidden __licence_gpl2_or_later
indicating that bin/process.o is covered entirely by the GPLv2
with the "or later" clause, or
$ objdump -t bin/rtl8139.dsk.tmp | grep __licence
00033e8c g O .bss.textdata
00000000 .hidden __licence_gpl2_only
00033e8c g O .bss.textdata
00000000 .hidden __licence_gpl2_or_later
00033e8c g O .bss.textdata
00000000 .hidden __licence_public_domain
indicating that bin/rtl8139.dsk includes both code licensed under
GPLv2 (both with and without the "or later" clause) and code licensed
as Public Domain.
Determining the result of licence combinations is currently left as an
exercise for the reader.
Michael Brown [Fri, 1 May 2009 14:58:20 +0000 (15:58 +0100)]
[legacy] Remove long-obsolete old dhcp.h file
Michael Brown [Thu, 30 Apr 2009 03:42:21 +0000 (04:42 +0100)]
[pxeprefix] Work around bug in Etherboot 5.4 when loading undionly.kpxe
Etherboot 5.4 erroneously treats PXENV_UNLOAD_STACK as the "final
shutdown" call, and unhooks INT15. When using gPXE's undionly.kpxe,
this results in gPXE overwriting the portion of Etherboot located in
high memory, because it is no longer hidden from the system memory map
at the time that gPXE loads.
Work around this by explicitly testing for Etherboot as the underlying
PXE stack (as is already done in undinet.c) and skipping the call to
PXENV_UNLOAD_STACK if necessary.
Michael Brown [Mon, 27 Apr 2009 13:04:35 +0000 (14:04 +0100)]
[build] Add {PROVIDE,REQUIRE}_SYMBOL macros and tidy up compiler.h
Michael Brown [Sun, 26 Apr 2009 05:41:41 +0000 (06:41 +0100)]
[i386] Remove long-obsolete realmode.c file
Michael Brown [Sun, 26 Apr 2009 05:38:36 +0000 (06:38 +0100)]
[i386] Remove long-obsolete callbacks_arch.h file
Stefan Hajnoczi [Fri, 24 Apr 2009 09:21:07 +0000 (10:21 +0100)]
[build] Fix signed/unsigned division in util/zbin.c
Commit b149a99 ([build] Round up SUBx deltas) introduced a
signed/unsigned issue that affects gPXE images built on 32-bit hosts.
The zbin fixup utility performed an unsigned division, which led to
.usb images with an incorrect number of sectors to load.
The issue snuck by on 64-bit hosts since uint32_t is promoted to long.
On 32-bit hosts it is promoted to unsigned long.
Modified-by: Michael Brown <mcb30@etherboot.org>
Signed-off-by: Michael Brown <mcb30@etherboot.org>
Michael Brown [Fri, 24 Apr 2009 02:42:34 +0000 (03:42 +0100)]
[elf] Work around entry point bug in NetBSD kernels
NetBSD kernels are multiboot ELF kernels with an entry point
incorrectly specified as a virtual address rather than a physical
address.
Work around this by looking for the segment that could plausibly
contain the entry point address (interpreted as either a physical or
virtual address), and using that to determine the eventual physical
entry point.
In the event of any ambiguity, precedence is given to interpretation
of the entry point as a physical address.
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