Michael Brown [Wed, 29 Oct 2008 18:17:02 +0000 (18:17 +0000)]
[settings] Add the notion of a "tag magic" to numbered settings
Settings can be constructed using a dotted-decimal notation, to allow
for access to unnamed settings. The default interpretation is as a
DHCP option number (with encapsulated options represented as
"<encapsulating option>.<encapsulated option>".
In several contexts (e.g. SMBIOS, Phantom CLP), it is useful to
interpret the dotted-decimal notation as referring to non-DHCP
options. In this case, it becomes necessary for these contexts to
ignore standard DHCP options, otherwise we end up trying to, for
example, retrieve the boot filename from SMBIOS.
Allow settings blocks to specify a "tag magic". When dotted-decimal
notation is used to construct a setting, the tag magic value of the
originating settings block will be ORed in to the tag number.
Store/fetch methods can then check for the magic number before
interpreting arbitrarily-numbered settings.
Michael Brown [Wed, 29 Oct 2008 01:10:33 +0000 (01:10 +0000)]
[romprefix] Further sanity checks for the PCI 3 runtime segment address
This extends the sanity checks on the runtime segment address provided
in %bx, first implemented in commit 5600955.
We now allow the ROM to be placed anywhere above a000:0000 (rather
than c000:0000, as before), since this is the region allowed by the
PCI 3 spec. If the BIOS asks us to place the runtime image such that
it would overlap with the init-time image (which is explicitly
prohibited by the PCI 3 spec), then we assume that the BIOS is faulty
and ignore the provided runtime segment address.
Testing on a SuperMicro BIOS providing overlapping segment addresses
shows that ignoring the provided runtime segment address is safe to do
in these circumstances.
Michael Brown [Tue, 28 Oct 2008 18:49:58 +0000 (18:49 +0000)]
[phantom] Add CLP settings interface
This interface provides access to firmware settings (e.g. MAC address)
that will apply to all drivers loaded for the duration of the current
system boot.
Michael Brown [Fri, 24 Oct 2008 02:49:11 +0000 (03:49 +0100)]
[phantom] Unhalt/halt all PEGs during driver startup/shutdown
A hardware bug means that reads through the expansion ROM BAR can
return corrupted data if the PEGs are running. This breaks platforms
that re-read the expansion ROM after invoking gPXE code, such as IBM
blade servers.
Halt PEGs during driver shutdown, and unhalt PEGs during driver
startup if we detect that this is not the first startup since
power-on.
Michael Brown [Fri, 24 Oct 2008 20:41:58 +0000 (21:41 +0100)]
[phantom] Add line count limit to phantom_dmesg()
The Phantom firmware debug logs can be extremely long, so add the
ability to restrict the output to the last N lines.
Michael Brown [Mon, 27 Oct 2008 00:29:16 +0000 (00:29 +0000)]
[ioapi] Fix broken implementation of insX() in the x86 I/O API
Michael Brown [Fri, 24 Oct 2008 03:08:43 +0000 (04:08 +0100)]
[uri] Avoid interpreting DOS-style path names as opaque URIs
A DOS-style full path name such as "C:\Program Files\tftpboot\nbp.0"
satisfies the syntax requirements for a URI with a scheme of "C" and
an opaque portion of "\Program Files\tftpboot\nbp.0".
Add a check in parse_uri() to ignore schemes that are apparently only
a single character long; this avoids interpreting DOS-style paths in
this way, and shouldn't affect any practical URI scheme.
Michael Brown [Thu, 23 Oct 2008 22:35:01 +0000 (23:35 +0100)]
[phantom] Change register space abstraction to match other drivers
Most other Phantom drivers define a register space in terms of a 64M
virtual address space. While this doesn't map in any meaningful way
to the actual addresses used on the latest cards, it makes maintenance
easier if we do the same.
Michael Brown [Thu, 23 Oct 2008 03:16:31 +0000 (04:16 +0100)]
[pcbios] Guard against register corruption in INT 15,e820 implementations
Someone at Dell must have a full-time job designing ways to screw up
implementations of INT 15,e820. This latest gem is courtesy of a Dell
Xanadu system, which arbitrarily decides to obliterate the contents of
%esi.
Preserve %esi, %edi and %ebp across calls to INT 15,e820, in case
someone tries a variation on this trick in future.
Michael Brown [Wed, 22 Oct 2008 20:18:15 +0000 (21:18 +0100)]
[settings] Avoid returning uninitialised data on error in fetch_xxx_setting()
Callers (e.g. usr/autoboot.c) may not check the return values from
fetch_xxx_setting(), assuming that in error cases the returned setting
value will be "empty" (for some sensible value of "empty").
In particular, if the DHCP server did not specify a next-server
address, this would result in gPXE using uninitialised data for the
TFTP server IP address.
Michael Brown [Tue, 21 Oct 2008 22:00:13 +0000 (23:00 +0100)]
[tftp] Add EUNIQ_xx values to differentiate the many EINVAL errors
Michael Brown [Tue, 21 Oct 2008 21:31:10 +0000 (22:31 +0100)]
[tg3] Add PCI ID for BCM5786
Contributed by Steve Cayford <cayfo001@umn.edu>
Michael Brown [Tue, 21 Oct 2008 19:49:10 +0000 (20:49 +0100)]
[contrib] Add patch to enable writable ROM images in bochs
Some of the gPXE romprefix.S code attempts to write to the ROM image,
as allowed by the PCI spec. We do gracefully handle the case of
read-only ROM images (for ISA ROMs and for normal bochs/qemu
operation), but it can be handy to be able to use bochs to debug the
code paths that depend on writable ROM images.
Michael Brown [Fri, 17 Oct 2008 17:24:04 +0000 (18:24 +0100)]
[build] Fix building on FreeBSD
FreeBSD requires the object format to be specified as elf_i386_fbsd,
rather than elf_i386.
Based on a patch from Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Michael Brown [Fri, 17 Oct 2008 17:12:24 +0000 (18:12 +0100)]
[romprefix] Sanity-check the runtime segment address for PCI 3
Some PCI 3 BIOSes seem to provide a garbage value in %bx, which should
contain the runtime segment address. Perform a basic sanity check: we
reject the segment if it is below the start of option ROM space. If
the sanity check fails, we assume that the BIOS was not expecting us
to be a PCI 3 ROM, and we just leave our image in situ.
Michael Brown [Fri, 17 Oct 2008 02:12:11 +0000 (03:12 +0100)]
[build] Use ".bss.*" names for uninitialised-data sections
The section name seems to have significance for some versions of
binutils.
There is no way to instruct gcc that sections such as .bss16 contain
uninitialised data; it will emit them with contents explicitly set to
zero. We therefore have to rely on the linker script to force these
sections to become uninitialised-data sections. We do this by marking
them as NOLOAD; this seems to be the closest semantic equivalent in the
linker script language.
However, this gets ignored by some versions of ld (including 2.17 as
shipped with Debian Etch), which mark the resulting sections with
(CONTENTS,ALLOC,LOAD,DATA). Combined with the fact that this version of
ld seems to ignore the specified LMA for these sections, this means that
they end up overlapping other sections, and so parts of .prefix (for
example) get obliterated by .data16's bss section.
Rename the .bss sections from .section_bss to .bss.section; this seems to
cause these versions of ld to treat them as uninitialised data.
Michael Brown [Fri, 17 Oct 2008 00:39:48 +0000 (20:39 -0400)]
[build] Fix building on Ubuntu 8.04
Not fully understood, but it seems that the LMA of bss sections matters
for some newer binutils builds. Force all bss sections to have an LMA
at the end of the file, so that they don't interfere with other
sections.
The symptom was that objcopy -O binary -j .zinfo would extract the
.zinfo section from bin/xxx.tmp as a blob of the correct length, but
with zero contents. This would then cause the [ZBIN] stage of the
build to fail.
Also explicitly state that .zinfo(.*) sections have @progbits, in case
some future assembler or linker variant decides to omit them.
Michael Brown [Thu, 16 Oct 2008 16:21:48 +0000 (17:21 +0100)]
[etherfabric] Merge changes from vendor tree
Also clean up minor errors in the use of debug macros.
Eduardo Habkost [Wed, 8 Oct 2008 20:02:33 +0000 (17:02 -0300)]
virtio-net: Fix kick/wait logic
The virtnet_transmit() logic for waiting the packet to be transmitted is
reversed: we can't wait the packet to be transmitted if we didn't kick()
the ring yet. The vring_more_used() while loop logic is reversed also,
that explains why the code works today.
The current code risks trying to free a buffer from the used ring
when none was available, that will happen most times because KVM
doesn't handle the packet immediately on kick(). Luckily it was working
because it was unlikely to have a buffer still queued for transmit when
virtnet_transmit() was called.
Also, adds a BUG_ON() to vring_get_buf(), to catch cases where we try
to free a buffer from the used ring when there was none available.
Patch for Etherboot. gPXE has the same problem on the code, but I hadn't
a chance to test gPXE using virtio-net yet.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Michael Brown [Thu, 16 Oct 2008 04:38:23 +0000 (05:38 +0100)]
[efi] Add basic implementation of EFI SIMPLE_NETWORK_PROTOCOL
This implementation is tested and working, but not currently tied in
to the EFI build.
Michael Brown [Wed, 15 Oct 2008 03:17:48 +0000 (04:17 +0100)]
[netdevice] Change link-layer push() and pull() methods to take raw types
EFI requires us to be able to specify the source address for
individual transmitted packets, and to be able to extract the
destination address on received packets.
Take advantage of this to rationalise the push() and pull() methods so
that push() takes a (dest,source,proto) tuple and pull() returns a
(dest,source,proto) tuple.
Michael Brown [Wed, 15 Oct 2008 01:00:44 +0000 (02:00 +0100)]
[netdevice] Split multicast hashing out into an mc_hash method
Multicast hashing is an ugly overlap between network and link layers.
EFI requires us to provide access to this functionality, so move it
out of ipv4.c and expose it as a method of the link layer.
Michael Brown [Tue, 14 Oct 2008 23:49:59 +0000 (00:49 +0100)]
[netdevice] Add maximum packet length as a net device property
Currently this length is set at device allocation time, and is never
changed.
Michael Brown [Mon, 13 Oct 2008 09:41:38 +0000 (10:41 +0100)]
[efi] Fix linker script for ld 2.17.50.0.9
Some versions of ld choke on the "AT ( _xxx_lma )" in efi.lds with an
error saying "nonconstant expression for load base". Since these were
only explicitly setting the LMA to the address that it would have had
anyway, they can be safely omitted.
Michael Brown [Sun, 12 Oct 2008 00:55:55 +0000 (01:55 +0100)]
[efi] Add EFI image format and basic runtime environment
We have EFI APIs for CPU I/O, PCI I/O, timers, console I/O, user
access and user memory allocation.
EFI executables are created using the vanilla GNU toolchain, with the
EXE header handcrafted in assembly and relocations generated by a
custom efilink utility.
Michael Brown [Mon, 13 Oct 2008 09:05:23 +0000 (10:05 +0100)]
[sanboot] Quick and dirty hack to make SAN boot protocols selectable
Michael Brown [Mon, 13 Oct 2008 08:37:51 +0000 (09:37 +0100)]
[config] Make the default image type selection platform-dependent
Michael Brown [Mon, 13 Oct 2008 04:30:04 +0000 (05:30 +0100)]
[monojob] Release reference on completed job
monojob_wait() was holding a reference to the completed job, meaning that
various objects would not be freed until the next job was plugged in to
the monojob interface.
Michael Brown [Mon, 13 Oct 2008 03:32:11 +0000 (04:32 +0100)]
[umalloc] Formalise the user memory allocation API
Michael Brown [Mon, 13 Oct 2008 02:47:33 +0000 (03:47 +0100)]
[uaccess] Formalise the uaccess API
The userptr_t is now the fundamental type that gets used for conversions.
For example, virt_to_phys() is implemented in terms of virt_to_user() and
user_to_phys().
Michael Brown [Sun, 12 Oct 2008 23:23:18 +0000 (00:23 +0100)]
[timer] Remove now-obsolete references to TIMER_BIOS and TIMER_RDTSC
Michael Brown [Sun, 12 Oct 2008 22:34:45 +0000 (23:34 +0100)]
[nap] Formalise the CPU sleeping API
Michael Brown [Sun, 12 Oct 2008 20:27:57 +0000 (21:27 +0100)]
[monojob] Allow for extremely slow system timers
The EFI timer runs at one tick per second, so using ">" rather than ">="
results in a two-second gap between dots.
Michael Brown [Sun, 12 Oct 2008 18:56:52 +0000 (19:56 +0100)]
[timer] Formalise the timer API
We now have two implementations for the timer API: one using the
time-of-day counter at 40:70 and one using RDTSC. Both make use of
timer2_udelay().
Michael Brown [Sun, 12 Oct 2008 14:06:07 +0000 (15:06 +0100)]
[process] Add DBG2() messages to help track down frozen processes
Michael Brown [Sun, 12 Oct 2008 14:04:37 +0000 (15:04 +0100)]
[retry] Use a separate flag to indicate that a retry timer is running
Using start==0 to indicate a stopped timer is dangerous, because 0 is a
valid value for the current tick counter.
Michael Brown [Sun, 12 Oct 2008 13:37:51 +0000 (14:37 +0100)]
[commands] Fix config command to accept zero arguments
Michael Brown [Sun, 12 Oct 2008 11:50:44 +0000 (12:50 +0100)]
[pci] Formalise the PCI I/O API
Michael Brown [Sun, 12 Oct 2008 11:37:25 +0000 (12:37 +0100)]
[legacy] Add missing #include <gpxe/io.h>
Michael Brown [Sun, 12 Oct 2008 11:37:08 +0000 (12:37 +0100)]
[phantom] Add missing #include <gpxe/io.h>
Michael Brown [Sun, 12 Oct 2008 01:30:31 +0000 (02:30 +0100)]
[config] Split console configuration out to config/console.h
Michael Brown [Sun, 12 Oct 2008 01:11:50 +0000 (02:11 +0100)]
[ioapi] Absorb virt_to_phys() and phys_to_virt() into the I/O API
Michael Brown [Sun, 12 Oct 2008 01:01:18 +0000 (02:01 +0100)]
[i386] Remove obsolete functions from virtaddr.h
The copy_{to,from}_phys() functions were obsoleted long ago by
copy_{to,from}_user().
relocate_to() also disappeared some time ago.
Michael Brown [Sun, 12 Oct 2008 00:59:57 +0000 (01:59 +0100)]
[rtl8139] Add missing #include <string.h>
Michael Brown [Sun, 12 Oct 2008 00:59:49 +0000 (01:59 +0100)]
[natsemi] Add missing #include <string.h>
Michael Brown [Sun, 12 Oct 2008 00:59:34 +0000 (01:59 +0100)]
[e1000] Add missing #include <string.h>
Michael Brown [Sat, 11 Oct 2008 23:52:30 +0000 (00:52 +0100)]
[ioapi] Remove old io.h file and switch all users over to <gpxe/io.h>
Michael Brown [Sun, 12 Oct 2008 00:03:17 +0000 (01:03 +0100)]
[ioapi] Formalise the I/O API as used in i386-pcbios
Michael Brown [Sat, 11 Oct 2008 23:39:57 +0000 (00:39 +0100)]
[cs89x0] Simplify obscure loop syntax
Michael Brown [Sat, 11 Oct 2008 23:38:56 +0000 (00:38 +0100)]
[e1000] Fix dubious syntax in e1000 I/O wrapper macros
Michael Brown [Fri, 10 Oct 2008 17:41:24 +0000 (18:41 +0100)]
[makefile] Add -Wformat-nonliteral as an extra warning category
-Wformat-nonliteral is not enabled by -Wall and needs to be explicitly
specified.
Modified the few files that use nonliteral format strings to work with
this new setting in place.
Inspired by a patch from Carl Karsten <carl@personnelware.com> and an
identical patch from Rorschach <r0rschach@lavabit.com>.
Michael Brown [Wed, 8 Oct 2008 01:30:48 +0000 (02:30 +0100)]
[efi] Add EFI headers from the EFI Development Kit (edk2)
The intention is to include near-verbatim copies of the EFI headers
required by gPXE. This is achieved using the import.pl script in
src/include/gpxe/efi.
Note that import.pl will modify any #include lines in each imported
header to reflect its new location within the gPXE tree. It will also
tidy up the file by removing carriage return characters and trailing
whitespace.
Michael Brown [Thu, 9 Oct 2008 21:22:01 +0000 (22:22 +0100)]
[i386] Simplify linker script and standardise linker-defined symbol names
Reduce the number of sections within the linker script to match the
number of practical sections within the output file.
Define _section, _msection, _esection, _section_filesz, _section_memsz,
and _section_lma for each section, replacing the mixture of symbols that
previously existed.
In particular, replace _text and _end with _textdata and _etextdata, to
make it explicit within code that uses these symbols that the .text and
.data sections are always treated as a single contiguous block.
Michael Brown [Fri, 10 Oct 2008 02:57:31 +0000 (03:57 +0100)]
[makefile] Reduce verbosity of various NON_AUTO_MEDIA rules
Michael Brown [Fri, 10 Oct 2008 01:14:22 +0000 (02:14 +0100)]
[makefile] Split platform-dependent portions out of arch/i386/Makefile
Michael Brown [Fri, 10 Oct 2008 01:09:55 +0000 (02:09 +0100)]
[makefile] Inhibit warnings if AUTO_DEPS or MEDIA_DEPS are empty lists
Michael Brown [Fri, 10 Oct 2008 01:08:31 +0000 (02:08 +0100)]
[makefile] Add missing dependency on arch/$(ARCH)/Makefile to MAKEDEPS
Michael Brown [Fri, 10 Oct 2008 01:07:04 +0000 (02:07 +0100)]
[util] Don't die on undefined symbols in sortobjdump.pl
Undefined symbols shouldn't reach sortobjdump.pl, but if they do then it
is not a helpful place to report the error.
Michael Brown [Thu, 9 Oct 2008 17:02:19 +0000 (18:02 +0100)]
[util] Add optional debug messages to zbin.c
Michael Brown [Tue, 7 Oct 2008 23:37:40 +0000 (00:37 +0100)]
[makefile] Split config.h out into config/*.h and kill off mkconfig.pl
Michael Brown [Tue, 7 Oct 2008 22:18:15 +0000 (23:18 +0100)]
[makefile] Add support for multiple build platforms
Allow for the build CPU architecture and platform to be specified as part
of the make command goals. For example:
make bin/rtl8139.rom # Standard i386 PC-BIOS build
make bin-efi/rtl8139.efi # i386 EFI build
The generic syntax is "bin[-[arch-]platform]", with the default
architecture being "i386" (regardless of the host architecture) and the
default platform being "pcbios".
Non-path targets such as "srcs" can be specified using e.g.
make bin-efi srcs
Note that this changeset is merely Makefile restructuring to allow the
build architecture and platform to be determined by the make command
goals, and to export these to compiled code via the ARCH and PLATFORM
defines. It doesn't actually introduce any new build platforms.
Michael Brown [Tue, 7 Oct 2008 21:46:43 +0000 (22:46 +0100)]
[makefile] Kill off arch/$(ARCH)/Config
The arch/i386/Config file has long been marked as deprecated. Move all
the pertinent bits to arch/i386/Makefile instead and remove
arch/i386/Config.
Michael Brown [Tue, 7 Oct 2008 21:27:55 +0000 (22:27 +0100)]
[libc] Define wchar_t in a gcc-compatible way
gcc defines the magic __WCHAR_TYPE__ macro, in order to convey
information about whether or not the user selected -fshort-wchar.
Michael Brown [Fri, 12 Sep 2008 01:06:49 +0000 (02:06 +0100)]
[libc] Add function declaration for main() in stdlib.h
Michael Brown [Tue, 30 Sep 2008 00:20:04 +0000 (01:20 +0100)]
[crypto] Rename <gpxe/bitops.h> to <gpxe/rotate.h>
Michael Brown [Wed, 1 Oct 2008 18:15:07 +0000 (19:15 +0100)]
[i2c] Generalise i2c bit-bashing support to addressless devices
Some devices (e.g. the Atmel AT24C11) have no concept of a device
address; they respond to every device address and use this value as
the word address. Some other devices use part of the device address
field to extend the word address field.
Generalise the i2c bit-bashing support to handle this by defining the
device address length and word address length as properties of an i2c
device. The word address is assumed to overflow into the device
address field if the address used exceeds the width of the word
address field.
Also add a bus reset mechanism. i2c chips don't usually have a reset
line, so rebooting the host will not clear any bizarre state that the
chip may be in. We reset the bus by clocking SCL until we see SDA
high, at which point we know we can generate a start condition and
have it seen by all devices. We then generate a stop condition to
leave the bus in a known state prior to use.
Finally, add some extra debugging messages to i2c_bit.c.
Michael Brown [Wed, 1 Oct 2008 18:05:39 +0000 (19:05 +0100)]
[makefile] Fix -fno-stack-protector test on older versions of gcc
Some older versions of gcc don't complain about unknown compiler flags
unless you ask them to actually compile; asking them to merely
preprocess won't trigger the error.
Fix the -fno-stack-protector test by making it attempt to compile an
empty file, rather than preprocess an empty file.
Michael Brown [Wed, 1 Oct 2008 17:58:21 +0000 (18:58 +0100)]
[compiler] Allow for selective disabling of debug levels at runtime
The usefulness of DBGLVL_IO is limited by the fact that many cards
require large numbers of uninteresting I/O reads/writes at device
probe time, typically when driving a bit-bashing I2C/SPI bus to read
the MAC address.
This patch adds the DBG_DISABLE() and DBG_ENABLE() macros, which can
be used to temporarily disable and re-enable selected debug levels.
Note that debug levels must still be enabled in the build in order to
function at all: you can't use DBG_ENABLE(DBGLVL_IO) in an object
built with DEBUG=object:1 and expect it to do anything.
Michael Brown [Sat, 13 Sep 2008 15:21:47 +0000 (16:21 +0100)]
[compiler] Add __always_inline macro
Marty Connor [Wed, 1 Oct 2008 17:46:16 +0000 (13:46 -0400)]
[release] Update version to 0.9.5+ post release
Marty Connor [Wed, 1 Oct 2008 17:38:45 +0000 (13:38 -0400)]
[release] Update version to 0.9.5 for release
Michael Brown [Mon, 29 Sep 2008 23:38:10 +0000 (00:38 +0100)]
[arbel] Fix off-by-one error in the failure path in arbel_probe()
Michael Brown [Mon, 29 Sep 2008 23:31:02 +0000 (00:31 +0100)]
[hermon] Fix off-by-one error in the failure path in hermon_probe()
H. Peter Anvin [Mon, 29 Sep 2008 20:50:21 +0000 (13:50 -0700)]
[makefile] Quote argument to sed containing []
[] are shell metacharacters, and they can get confused by files in the
local directory.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Mon, 29 Sep 2008 20:48:51 +0000 (13:48 -0700)]
[makefile] Avoid using ?=
?= in a Makefile means that that variable can be overridden by the
environment. This is confusing to users, especially with a generic
name like "ARCH".
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Michael Brown [Mon, 29 Sep 2008 15:00:09 +0000 (16:00 +0100)]
[tg3] Add PCI ID
Reported working by Martin Kreiner <m.kreiner@levigo.de>
Michael Brown [Mon, 29 Sep 2008 04:11:51 +0000 (05:11 +0100)]
[pcbios] Allow for larger-than-20-byte buffers in e820mangler.S
Although the E820 API allows for a caller to provide only a 20-byte
buffer, there exists at least one combination (HP BIOS, 32-bit WinPE)
that relies on information found only in the "extended attributes"
field, which requires a 24-byte buffer.
Allow for up to a 64-byte E820 buffer, in the hope of coping with
future idiocies like this one.
Michael Brown [Mon, 29 Sep 2008 02:55:13 +0000 (03:55 +0100)]
[pcbios] Print INT 15,E820 extended attributes, if present
The ACPI specification defines an additional 4-byte field at offset 20
for an E820 memory map entry. This field is presumably optional,
since generally E820 gets given only a 20-byte buffer to fill.
However, the bits of this optional field are defined as:
bit 0 : region is enabled
bit 1 : region is non-volatile memory rather than RAM
so it seems as though callers that pass in only a 20-byte buffer may
be missing out on some rather important information.
Michael Brown [Mon, 29 Sep 2008 00:00:14 +0000 (01:00 +0100)]
[gdb] Fix a compiler warning that shows up only when assertions are enabled
gcc should (I think) be warning about this anyway, but seems to do so
only when assertions are enabled for this object.
Michael Brown [Sun, 28 Sep 2008 23:36:11 +0000 (00:36 +0100)]
[pcbios] Save/restore %es in INT 15,e820
Our INT 15,e820 code was setting %es=%ss (as part of the "look ahead
in the memory map" logic), but failing to restore %es afterwards.
This is a serious bug, but wasn't affecting many platforms because
almost all callers seem to set %es=%ss anyway.
Michael Brown [Sun, 28 Sep 2008 22:06:53 +0000 (23:06 +0100)]
[i386] Add dump_regs() debug call
Use as "call dump_regs" from any real-mode code within .text16.
Should preserve all registers and flags.
Michael Brown [Sat, 27 Sep 2008 22:50:14 +0000 (23:50 +0100)]
[hermon] Allocate only as much memory as is needed for ICM and ICM AUX
Use individual page mappings rather than a single whole-region
mapping, to avoid the waste of memory that occurs due to the
constraint that each mapped block must be aligned on its own size.
Michael Brown [Fri, 26 Sep 2008 20:30:53 +0000 (21:30 +0100)]
[iscsi] Fix LUN parsing in the iSCSI root-path
Marty Connor [Fri, 26 Sep 2008 20:05:55 +0000 (16:05 -0400)]
[release] Update version post release to 0.9.4+
Marty Connor [Fri, 26 Sep 2008 19:14:34 +0000 (15:14 -0400)]
[release] Update version information for 0.9.4 release
Michael Brown [Fri, 26 Sep 2008 02:39:35 +0000 (03:39 +0100)]
[settings] Allow for setting fetchers to fail in fetchf_hex()
Michael Brown [Fri, 26 Sep 2008 02:39:17 +0000 (03:39 +0100)]
[settings] Expose MAC address setting for general use
Michael Brown [Fri, 26 Sep 2008 00:36:22 +0000 (01:36 +0100)]
[romprefix] Fully clear the "Press B to boot..." message when INT19 is used
Michael Brown [Thu, 25 Sep 2008 17:45:30 +0000 (18:45 +0100)]
[pcbios] Fetch INT 15,e820 entry directly into our e820 cache
Some BIOSes require us to pass in not only the continuation value (in
%ebx) as returned by the previous call to INT 15,e820 but also the
unmodified buffer (at %es:%di) as returned by the previous call to INT
15,e820. Apparently, someone thought it would be a worthwhile
optimisation to fill in only the low dword of the "length" field and
the low byte of the "type field", assuming that the buffer would
remain unaltered from the previous call.
This problem was being triggered by the "peek ahead" logic in
get_mangled_e820(), which would read the next entry into a temporary
buffer in order to be able to guarantee terminating the map with
%ebx=0 rather than CF=1. (Terminating with CF=1 upsets some Windows
flavours, despite being documented legal behaviour.)
Work around this problem by always fetching directly into our e820
cache; that way we can guarantee that the underlying call always sees
the previous buffer contents (and the same buffer address).
Michael Brown [Thu, 25 Sep 2008 06:23:34 +0000 (07:23 +0100)]
[arbel] Allocate sufficient space for firmware buffer
We were accidentally allocating only half the required amount of
memory (given the alignment method) for the firmware buffer, leading
to conflicts between the firmware buffer and gPXE code/data segments.
Michael Brown [Thu, 25 Sep 2008 06:22:06 +0000 (07:22 +0100)]
[hermon] Allocate sufficient space for firmware buffer
We were accidentally allocating only half the required amount of
memory (given the alignment method) for the firmware buffer, leading
to conflicts between the firmware buffer and gPXE code/data segments.
Michael Brown [Thu, 25 Sep 2008 02:34:26 +0000 (03:34 +0100)]
[pcbios] Add facility for testing arbitrary E820 memory maps
We seem to be having issues with various E820 memory maps. These
problems are often difficult to reproduce, requiring access to the
specific system exhibiting the problem.
Add a facility for hooking in a fake E820 map generator, using an
arbitrary map defined in a C array, solely in order to be able to test
the map-mangling code against arbitrary E820 maps.
Michael Brown [Tue, 16 Sep 2008 01:38:29 +0000 (02:38 +0100)]
[crypto] Remove spurious #include "config.h"
Michael Brown [Thu, 25 Sep 2008 00:53:42 +0000 (01:53 +0100)]
[romprefix] Allow BANNER_TIMEOUT to control banners in romprefix.S
In particular, allow BANNER_TIMEOUT=0 to inhibit the prompt banners
altogether.
Ironically, this request comes from the same OEM that originally
required the prompts to be present during POST.
Michael Brown [Thu, 25 Sep 2008 00:35:15 +0000 (01:35 +0100)]
[dhcp] Accept BOOTP as well as DHCP
Michael Brown [Wed, 24 Sep 2008 20:23:50 +0000 (21:23 +0100)]
[pxe] Enable interrupts before starting PXE NBP execution
Based on a patch provided by XenSource for Etherboot 5.4.
Michael Brown [Wed, 24 Sep 2008 17:33:31 +0000 (18:33 +0100)]
[pcbios] Inhibit INT 15 memory map hiding on brain-dead BIOSes
Some really moronic BIOSes bring up the PXE stack via the UNDI loader
entry point during POST, and then don't bother to unload it before
overwriting the code and data segments. If this happens, we really
don't want to leave INT 15 hooked, because that will cause any loaded
OS to die horribly as soon as it attempts to fetch the system memory
map.
We use a heuristic to detect whether or not we are being loaded at the
top of free base memory. If we determine that we are being loaded at
some other arbitrary location in base memory, then we assume that it's
not safe to hook INT 15.
Michael Brown [Wed, 24 Sep 2008 06:22:42 +0000 (07:22 +0100)]
[settings] Add the uristring setting type
This allows settings to be expanded in a way that is safe to include
within a URI string, such as
kernel http://10.0.0.1/boot.php?mf=${manufacturer:uristring}
where the ${manufacturer} setting may contain characters that are not
permitted (or have reserved purposes) within a URI.
Since whitespace characters will be URI-encoded (e.g. "%20" for a
space character), this also works around the problem that spaces
within an expanded setting would cause the shell to split command-line
arguments incorrectly.
Michael Brown [Wed, 24 Sep 2008 06:21:47 +0000 (07:21 +0100)]
[uri] Add uri_encode() and uri_decode() functions for URI character encoding
Michael Brown [Tue, 23 Sep 2008 23:53:40 +0000 (00:53 +0100)]
[romprefix] If we hook INT 19, prompt before attempting boot
On non-BBS systems we hook INT 19, since there is no other way we can
guarantee gaining control of the flow of execution. If we end up
doing this, prompt the user before attempting boot, since forcibly
capturing INT 19 is rather antisocial.