]> git.ipfire.org Git - thirdparty/ipxe.git/log
thirdparty/ipxe.git
12 years ago[romprefix] Report failure cause when unable to open payload
Michael Brown [Tue, 30 Apr 2013 13:31:39 +0000 (14:31 +0100)] 
[romprefix] Report failure cause when unable to open payload

Report the cause of the failure when we are unable to open the .mrom
payload.  There are two possible failure cases:

 - Unable to find a suitable memory BAR to borrow (e.g. if the NIC
   doesn't have a memory BAR that is at least as large as the
   expansion ROM BAR, or if the memory BAR has been assigned a 64-bit
   address which won't fit into the 32-bit expansion ROM BAR).  This
   will be reported as "BABABABA".

 - Unable to find correct ROM image within the BAR.  This will be
   reported as the address (within the borrowed BAR) at which we first
   fail to find a valid 55AA signature.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[realtek] Allow reaction time between writing RTL_CAPR and reading RTL_CR
Michael Brown [Tue, 30 Apr 2013 12:36:04 +0000 (13:36 +0100)] 
[realtek] Allow reaction time between writing RTL_CAPR and reading RTL_CR

Some older RTL8139 chips seem to not immediately update the
RTL_CR.BUFE bit in response to a write to RTL_CAPR.  This results in
iPXE seeing a spurious zero-length received packet, and thereafter
being out of sync with the hardware's RX ring offset.

Fix by inserting an extra PCI read cycle after writing to RTL_CAPR, to
give the chip time to react before we next read RTL_CR.

Reported-by: Gelip <mrgelip@gmail.com>
Tested-by: Gelip <mrgelip@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[pxe] Convert external PXE API errors into iPXE platform-generated errors
Michael Brown [Mon, 29 Apr 2013 18:58:25 +0000 (19:58 +0100)] 
[pxe] Convert external PXE API errors into iPXE platform-generated errors

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[errdb] Strip platform error code for non-platform-generated errors
Michael Brown [Mon, 29 Apr 2013 14:36:32 +0000 (15:36 +0100)] 
[errdb] Strip platform error code for non-platform-generated errors

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[realtek] Use ID word to detect EEPROM presence
Michael Brown [Sun, 28 Apr 2013 17:50:10 +0000 (18:50 +0100)] 
[realtek] Use ID word to detect EEPROM presence

Some onboard RTL8169 NICs seem to leave the EEPROM pins disconnected.
The existing is_valid_ether_addr() test will not necessarily catch
this, since it expects a missing EEPROM to show up as a MAC address of
00:00:00:00:00:00 or ff:ff:ff:ff:ff:ff.  When the EEPROM pins are
floating the MAC address may read as e.g. 00:00:00:00:0f:00, which
will not be detected as invalid.

Check the ID word in the first two bytes of the EEPROM (which should
have the value 0x8129 for all RTL8139 and RTL8169 chips), and use this
to determine whether or not an EEPROM is present.

Reported-by: Carl Karsten <carl@nextdayvideo.com>
Tested-by: Carl Karsten <carl@nextdayvideo.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Default to short wchar_t in stddef.h
Michael Brown [Sun, 28 Apr 2013 16:43:37 +0000 (17:43 +0100)] 
[build] Default to short wchar_t in stddef.h

sparse does not understand -fshort-wchar.  Default to using uint16_t
as a wchar_t if not explicitly specified by the compiler, to avoid
large numbers of spurious warnings from sparse.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Fix dubious uses of bitwise operators
Michael Brown [Sun, 28 Apr 2013 16:30:01 +0000 (17:30 +0100)] 
[build] Fix dubious uses of bitwise operators

Detected by sparse.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Fix uses of literal 0 as a NULL pointer
Michael Brown [Sun, 28 Apr 2013 15:51:05 +0000 (16:51 +0100)] 
[build] Fix uses of literal 0 as a NULL pointer

Detected using sparse.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Use -Wno-decl when running sparse
Michael Brown [Sun, 28 Apr 2013 15:43:32 +0000 (16:43 +0100)] 
[build] Use -Wno-decl when running sparse

Linker table entries must be non-static in order to avoid being
completely optimised away by some versions of gcc.  Use -Wno-decl to
prevent sparse from warning about these, since the alternative would
be to litter the code with otherwise unnecessary "extern"
declarations.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[realtek] Print bad MAC address in debug message when inferring no EEPROM
Michael Brown [Sat, 27 Apr 2013 20:24:10 +0000 (21:24 +0100)] 
[realtek] Print bad MAC address in debug message when inferring no EEPROM

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[process] Mark process descriptor as static in PERMANENT_PROCESS
Michael Brown [Thu, 25 Apr 2013 14:15:43 +0000 (15:15 +0100)] 
[process] Mark process descriptor as static in PERMANENT_PROCESS

There is no need for the process descriptor to be a global variable.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Avoid sparse undeclared symbol warning for PROVIDE_SYMBOL()
Michael Brown [Thu, 25 Apr 2013 14:14:59 +0000 (15:14 +0100)] 
[build] Avoid sparse undeclared symbol warning for PROVIDE_SYMBOL()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Allow sparse to be invoked via "make C=1"
Michael Brown [Thu, 25 Apr 2013 13:56:48 +0000 (14:56 +0100)] 
[build] Allow sparse to be invoked via "make C=1"

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Define __WINT_TYPE__ if necessary
Michael Brown [Thu, 25 Apr 2013 13:51:33 +0000 (14:51 +0100)] 
[build] Define __WINT_TYPE__ if necessary

sparse does not define __WCHAR_TYPE__ or __WINT_TYPE__.  We already
define __WCHAR_TYPE__ if the compiler does not do so; do the same for
__WINT_TYPE__.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Allow sparse to find compiler.h
Michael Brown [Thu, 25 Apr 2013 12:45:41 +0000 (13:45 +0100)] 
[build] Allow sparse to find compiler.h

sparse seems to have problems finding compiler.h when specified as
"-include compiler.h"; one possible explanation is that it ignores the
include path.  Fix by using "-include include/compiler.h".

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[netdevice] Use link-layer address as part of RNG seed
Michael Brown [Fri, 19 Apr 2013 13:26:12 +0000 (14:26 +0100)] 
[netdevice] Use link-layer address as part of RNG seed

iPXE currently seeds the random number generator using the system
timer tick count.  When large numbers of machines are booted
simultaneously, multiple machines may end up choosing the same DHCP
transaction ID (XID) value; this can cause problems.

Fix by using the least significant (and hence most variable) bits of
each network device's link-layer address to perturb the random number
generator.  This introduces some per-machine unique data into the
random number generator's seed, and so reduces the chances of DHCP XID
collisions.

This does not affect the ANS X9.82-compatible random bit generator
used by TLS and other cryptography code, which uses an entirely
separate source of entropy.

Originally-implemented-by: Bernhard Kohl <bernhard.kohl@nsn.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Add sample platform-generated error disambiguations
Michael Brown [Fri, 19 Apr 2013 12:29:22 +0000 (13:29 +0100)] 
[efi] Add sample platform-generated error disambiguations

Add disambiguated errors for LoadImage() and StartImage(), primarily
to demonstrate how to use __einfo_uniqify() and __einfo_platformify()
in the context of EFI platform errors.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Perform meaningful error code conversions
Michael Brown [Thu, 18 Apr 2013 20:29:53 +0000 (21:29 +0100)] 
[efi] Perform meaningful error code conversions

Exploit the redefinition of iPXE error codes to include a "platform
error code" to allow for meaningful conversion of EFI_STATUS values to
iPXE errors and vice versa.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[libc] Redefine low 8 bits of error code as "platform error code"
Michael Brown [Fri, 19 Apr 2013 12:34:13 +0000 (13:34 +0100)] 
[libc] Redefine low 8 bits of error code as "platform error code"

The low 8 bits of an iPXE error code are currently defined as the
closest equivalent PXE error code.  Generalise this scheme to
platforms other than PC-BIOS by extending this definition to "closest
equivalent platform error code".  This allows for the possibility of
returning meaningful errors via EFI APIs.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[libc] Use __einfo() tuple as first argument to EUNIQ()
Michael Brown [Thu, 18 Apr 2013 00:05:32 +0000 (01:05 +0100)] 
[libc] Use __einfo() tuple as first argument to EUNIQ()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Remove obsolete EFI I/O implementation using EFI_CPU_IO_PROTOCOL
Michael Brown [Thu, 18 Apr 2013 15:50:13 +0000 (16:50 +0100)] 
[efi] Remove obsolete EFI I/O implementation using EFI_CPU_IO_PROTOCOL

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[intel] Add intelx driver for Intel 10 Gigabit Ethernet NICs
Michael Brown [Wed, 3 Apr 2013 14:21:08 +0000 (15:21 +0100)] 
[intel] Add intelx driver for Intel 10 Gigabit Ethernet NICs

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[intel] Expose functionality to be shared with intelx driver
Michael Brown [Wed, 3 Apr 2013 14:21:03 +0000 (15:21 +0100)] 
[intel] Expose functionality to be shared with intelx driver

The Intel 10 Gigabit NICs have a datapath that is almost
register-compatible with the Intel 1 Gigabit NICs.  Expose common
functionality to avoid duplication of code in the new "intelx" driver.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[intel] Remove hardcoded offsets for descriptor ring registers
Michael Brown [Wed, 3 Apr 2013 14:20:55 +0000 (15:20 +0100)] 
[intel] Remove hardcoded offsets for descriptor ring registers

The Intel 10 Gigabit NICs use the same simplified (aka "legacy")
descriptor format and the same layout for descriptor register blocks
as the Intel 1 Gigabit NICs.  The offsets of the descriptor register
blocks are not the same.

Simplify reuse of the existing code by removing all hardcoded offsets
for registers within descriptor register blocks, and ensuring that all
offsets are calculated using the descriptor register block base
address provided via intel_init_ring().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[bios] Fix screen clearing on buggy BIOSes
Michael Brown [Wed, 17 Apr 2013 18:36:03 +0000 (19:36 +0100)] 
[bios] Fix screen clearing on buggy BIOSes

The implementation of INT 10,06 on some BIOSes (observed with both
Hyper-V and a Dell OptiPlex 7010) seems to treat %dx=0xffff as a
special value meaning "do absolutely nothing".  Fix by using
%dx=0xfefe, which should still be sufficient to cover any realistic
screen size.

Reported-by: John Clark <skyman@iastate.edu>
Tested-by: John Clark <skyman@iastate.edu>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[settings] Expose build architecture and platform via settings
Michael Brown [Sat, 6 Apr 2013 10:27:27 +0000 (11:27 +0100)] 
[settings] Expose build architecture and platform via settings

Expose the build architecture (e.g. "i386" or "x86_64") via
${buildarch} and the firmware platform (e.g. "pcbios" or "efi") via
${platform}.  These settings directly expose the ARCH and PLATFORM
variables from the Makefile.

Note that the build architecture reflects the architecture for which
iPXE was compiled, not the architecture on which iPXE is currently
running.  The "cpuid" command can be used to detect a 64-bit system at
runtime.

Requested-by: James A. Peltier <jpeltier@sfu.ca>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Fetch device path for loaded image during initialisation
Michael Brown [Wed, 27 Mar 2013 21:23:21 +0000 (21:23 +0000)] 
[efi] Fetch device path for loaded image during initialisation

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[prism2] Use standard type names
Michael Brown [Mon, 25 Mar 2013 18:02:20 +0000 (18:02 +0000)] 
[prism2] Use standard type names

Avoid using UINT16 and similar typedefs, which are non-standard in the
iPXE codebase and generate conflicts when trying to include any of the
EFI headers.

Also fix trailing whitespace in the affected files, to prevent
complaints from git.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[igbvf] Remove conflicting macro definitions
Michael Brown [Mon, 25 Mar 2013 18:02:09 +0000 (18:02 +0000)] 
[igbvf] Remove conflicting macro definitions

Remove macros which aren't used anywhere in the driver, and which
conflict with macros of the same name used in the EFI headers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[cs89x0] Remove conflicting macro definitions
Michael Brown [Mon, 25 Mar 2013 18:01:53 +0000 (18:01 +0000)] 
[cs89x0] Remove conflicting macro definitions

Remove macros which aren't used anywhere in the driver, and which
conflict with macros of the same name used in the EFI headers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Enable "cpuid" command by default for EFI
Michael Brown [Fri, 22 Mar 2013 13:58:54 +0000 (13:58 +0000)] 
[efi] Enable "cpuid" command by default for EFI

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[cmdline] Add ability to perform a warm reboot
Michael Brown [Fri, 22 Mar 2013 13:54:44 +0000 (13:54 +0000)] 
[cmdline] Add ability to perform a warm reboot

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Add "reboot" command for EFI
Michael Brown [Fri, 22 Mar 2013 13:42:16 +0000 (13:42 +0000)] 
[efi] Add "reboot" command for EFI

Abstract out the ability to reboot the system to a separate reboot()
function (with platform-specific implementations), add an EFI
implementation, and make the existing "reboot" command available under
EFI.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Avoid strict-aliasing warning for gcc 4.3
Bo Yang [Wed, 20 Mar 2013 08:34:17 +0000 (16:34 +0800)] 
[build] Avoid strict-aliasing warning for gcc 4.3

Signed-off-by: Bo Yang <boyang@suse.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Provide efi_guid_ntoa() for printing EFI GUIDs
Michael Brown [Wed, 20 Mar 2013 15:25:16 +0000 (15:25 +0000)] 
[efi] Provide efi_guid_ntoa() for printing EFI GUIDs

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[uuid] Abstract UUID mangling code out to a separate uuid_mangle() function
Michael Brown [Wed, 20 Mar 2013 15:06:40 +0000 (15:06 +0000)] 
[uuid] Abstract UUID mangling code out to a separate uuid_mangle() function

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[dhcp] Use PXE byte ordering for UUID in DHCP option 97
Michael Brown [Wed, 20 Mar 2013 00:54:42 +0000 (00:54 +0000)] 
[dhcp] Use PXE byte ordering for UUID in DHCP option 97

The PXE spec does not specify a byte ordering for UUIDs, but RFC4578
suggests that it follows the EFI spec, in which the first three fields
are little-endian.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[smbios] Mangle UUIDs for SMBIOS version 2.6 and newer
Michael Brown [Wed, 20 Mar 2013 00:14:38 +0000 (00:14 +0000)] 
[smbios] Mangle UUIDs for SMBIOS version 2.6 and newer

iPXE treats UUIDs as being in network byte order (big-endian).  The
SMBIOS specification version 2.6 states that UUIDs are stored with
little-endian values in the first three fields; earlier versions did
not specify an endianness.  This results in some inconsistency between
the BIOS, vendor PXE, iPXE, and operating system interpretations of
the SMBIOS UUID.

dmidecode assumes that the byte order is little-endian if and only if
the SMBIOS version is 2.6 or higher.  Choose to match this behaviour.

Reported-by: Matthew Helton <mwhelton@gmail.com>
Reported-by: Alexandru Bordei <alexandru.bordei@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[smbios] Provide SMBIOS version number via smbios_version()
Michael Brown [Wed, 20 Mar 2013 00:12:30 +0000 (00:12 +0000)] 
[smbios] Provide SMBIOS version number via smbios_version()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[int13] Split out ISO9660 and El Torito definitions to separate header files
Michael Brown [Mon, 18 Mar 2013 15:05:43 +0000 (15:05 +0000)] 
[int13] Split out ISO9660 and El Torito definitions to separate header files

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Add EFI-specific debugging macros
Michael Brown [Fri, 15 Mar 2013 19:09:45 +0000 (19:09 +0000)] 
[efi] Add EFI-specific debugging macros

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Fix minor typos in efi_image.c
Michael Brown [Tue, 19 Mar 2013 23:16:09 +0000 (23:16 +0000)] 
[efi] Fix minor typos in efi_image.c

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[lkrnprefix] Allow relocation when no initrd is present
Michael Brown [Fri, 15 Mar 2013 15:22:57 +0000 (15:22 +0000)] 
[lkrnprefix] Allow relocation when no initrd is present

Commit 2629b7e ("[pcbios] Inhibit all calls to INT 15,e820 and INT
15,e801 during POST") introduced a regression into .lkrn images when
used with no corresponding initrd.

Specifically, the semantics of the "maximum address for relocation"
value passed to install_prealloc() in %ebp changed so that zero became
a special value meaning "inhibit use of INT 15,e820 and INT 15,e801".
The %ebp value meaing "no upper limit on relocation" was changed from
zero to 0xffffffff, and all prefixes providing fixed values for %ebp
were updated to match the new semantics.

The .lkrn prefix provides the initrd base address as the maximum
address for relocation.  When no initrd is present, this address will
be zero, and so will unintentionally trigger the "inhibit INT 15,e820
and INT 15,e801" behaviour.

Fix by explicitly setting %ebp to 0xffffffff if no initrd is present
before calling install_prealloc().

Reported-by: Ján ONDREJ (SAL) <ondrejj@salstar.sk>
Tested-by: Ján ONDREJ (SAL) <ondrejj@salstar.sk>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Fix building with newer binutils
Michael Brown [Thu, 14 Mar 2013 00:20:04 +0000 (00:20 +0000)] 
[efi] Fix building with newer binutils

Newer versions of bfd.h require definitions for the PACKAGE and
PACKAGE_VERSION macros used by autotools.  Work around this by
manually defining these macros before including bfd.h.

Originally-fixed-by: Brandon Penglase <bpenglase-ipxe@spaceservices.net>
Tested-by: Brandon Penglase <bpenglase-ipxe@spaceservices.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Add our own EFI_LOAD_FILE_PROTOCOL implementation
Michael Brown [Wed, 13 Mar 2013 22:42:26 +0000 (22:42 +0000)] 
[efi] Add our own EFI_LOAD_FILE_PROTOCOL implementation

When iPXE is used as a UEFI driver, the UEFI PXE base code currently
provides the TCP/IP stack, network protocols, and user interface.
This represents a substantial downgrade from the standard BIOS iPXE
user experience.

Fix by installing our own EFI_LOAD_FILE_PROTOCOL implementation which
initiates the standard iPXE boot procedure.  This upgrades the UEFI
iPXE user experience to match the standard BIOS iPXE user experience.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Expose downloaded images via EFI_SIMPLE_FILE_SYSTEM_PROTOCOL
Michael Brown [Wed, 13 Mar 2013 22:36:32 +0000 (22:36 +0000)] 
[efi] Expose downloaded images via EFI_SIMPLE_FILE_SYSTEM_PROTOCOL

Expose iPXE's images as a UEFI file system, allowing the booted image
to access all images downloaded by iPXE.

This functionality is complementary to the custom iPXE download
protocol.  The iPXE download protocol allows a booted image to utilise
iPXE to download arbitrary URIs, but requires the booted image to
specifically support the custom iPXE download protocol.  The new
functionality limits the booted image to accessing only files that
were already downloaded by iPXE (e.g. as part of a script), but can
work with any generic UEFI image (e.g. the UEFI shell).  Both
protocols are provided simultaneously, and are attached to the SNP
device handle.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Add last_opened_snpdev()
Michael Brown [Wed, 13 Mar 2013 22:34:06 +0000 (22:34 +0000)] 
[efi] Add last_opened_snpdev()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[autoboot] Split main control flow out of main() into a new function ipxe()
Michael Brown [Mon, 11 Mar 2013 18:38:42 +0000 (18:38 +0000)] 
[autoboot] Split main control flow out of main() into a new function ipxe()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Update to latest EDK2 headers
Michael Brown [Wed, 13 Mar 2013 22:23:42 +0000 (22:23 +0000)] 
[efi] Update to latest EDK2 headers

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[romprefix] Display only one "Ctrl-B" prompt per PCI device during POST
Michael Brown [Mon, 11 Mar 2013 01:43:12 +0000 (01:43 +0000)] 
[romprefix] Display only one "Ctrl-B" prompt per PCI device during POST

If a multifunction PCI device exposes an iPXE ROM via each function,
then each function will display a "Press Ctrl-B to configure iPXE"
prompt, and delay for two seconds.  Since a single instance of iPXE
can drive all functions on the multifunction device, this simply adds
unnecessary delay to the boot process.

Fix by inhibiting the "Press Ctrl-B" prompt for all except the first
function on a PCI device.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[pcbios] Inhibit all calls to INT 15,e820 and INT 15,e801 during POST
Michael Brown [Mon, 11 Mar 2013 00:50:52 +0000 (00:50 +0000)] 
[pcbios] Inhibit all calls to INT 15,e820 and INT 15,e801 during POST

Many BIOSes do not construct the full system memory map until after
calling the option ROM initialisation entry points.  For several
years, we have added sanity checks and workarounds to accommodate
charming quirks such as BIOSes which report the entire 32-bit address
space (including all memory-mapped PCI BARs) as being usable RAM.

The IBM x3650 takes quirky behaviour to a new extreme.  Calling either
INT 15,e820 or INT 15,e801 during POST doesn't just get you invalid
data.  We could cope with invalid data.  Instead, these nominally
read-only API calls manage to trash some internal BIOS state, with the
result that the system memory map is _never_ constructed.  This tends
to confuse subsequent bootloaders and operating systems.

[ GRUB 0.97 fails in a particularly amusing way.  Someone thought it
would be a good idea for memcpy() to check that the destination memory
region is a valid part of the system memory map; if not, then memcpy()
will sulk, fail, and return NULL.  This breaks pretty much every use
of memcpy() including, for example, those inserted implicitly by gcc
to copy non-const initialisers.  Debugging is _fun_ when a simple call
to printf() manages to create an infinite recursion, exhaust the
available stack space, and shut down the CPU. ]

Fix by completely inhibiting calls to INT 15,e820 and INT 15,e801
during POST.

We do now allow relocation during POST up to the maximum address
returned by INT 15,88 (which seems so far to always be safe).  This
allows us to continue to have a reasonable size of external heap, even
if the PMM allocation is close to the 1MB mark.

The downside of allowing relocation during POST is that we may
overwrite PMM-allocated memory in use by other option ROMs.  However,
the downside of inhibiting relocation, when combined with also
inhibiting calls to INT 15,e820 and INT 15,e801, would be that we
might have no external heap available: this would make booting an OS
impossible and could prevent some devices from even completing
initialisation.

On balance, the lesser evil is probably to allow relocation during
POST (up to the limit provided by INT 15,88).  Entering iPXE during
POST is a rare operation; on the even rarer systems where doing so
happens to overwrite a PMM-allocated region, then there exists a
fairly simple workaround: if the user enters iPXE during POST and
wishes to exit iPXE, then the user must reboot.  This is an acceptable
cost, given the rarity of the situation and the simplicity of the
workaround.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[prefix] Use %cs as implicit parameter to uninstall()
Michael Brown [Fri, 8 Mar 2013 13:26:22 +0000 (13:26 +0000)] 
[prefix] Use %cs as implicit parameter to uninstall()

romprefix.S currently calls uninstall() with an invalid value in %ax.
Consequently, base memory is not freed after a ROM boot attempt (or
after entering iPXE during POST).

The uninstall() function is physically present in .text16, and so can
use %cs to determine the .text16 segment address.  The .data16 segment
address is not required, since uninstall() is called only by code
paths which set up .data16 to immediately follow .text16.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[nbiprefix] Set up real-mode stack before jumping to .text16
Michael Brown [Fri, 8 Mar 2013 13:23:58 +0000 (13:23 +0000)] 
[nbiprefix] Set up real-mode stack before jumping to .text16

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[pcbios] Add extra debugging messages when unhiding iPXE from memory
Michael Brown [Fri, 8 Mar 2013 12:22:56 +0000 (12:22 +0000)] 
[pcbios] Add extra debugging messages when unhiding iPXE from memory

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Add vmware build target
Brandon Penglase [Sun, 4 Nov 2012 18:48:08 +0000 (13:48 -0500)] 
[build] Add vmware build target

Add "make vmware" build target, to build all of the ROMs used with
VMware.

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[tftp] Allow TFTP block size to be controlled via the PXE TFTP API
Michael Brown [Wed, 6 Mar 2013 17:35:30 +0000 (17:35 +0000)] 
[tftp] Allow TFTP block size to be controlled via the PXE TFTP API

The PXE TFTP API allows the caller to request a particular TFTP block
size.  Since mid-2008, iPXE has appended a "?blksize=xxx" parameter to
the TFTP URI constructed internally; nothing has ever parsed this
parameter.  Nobody seems to have cared that this parameter has been
ignored for almost five years.

Fix by using xfer_window(), which provides a fairly natural way to
convey the block size information from the PXE TFTP API to the TFTP
protocol layer.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[menu] Prevent separators with shortcut keys from being selected
Michael Brown [Wed, 6 Mar 2013 15:05:30 +0000 (15:05 +0000)] 
[menu] Prevent separators with shortcut keys from being selected

Nothing currently prevents a menu separator from being assigned a
shortcut key, and then from being selected using that shortcut key.
This produces an inconsistency in the user interface, since separators
cannot be selected by other means of menu navigation (arrow keys, page
up/down, etc).

It would be trivial to prevent separators from being assigned shortcut
keys, but this would eliminate one potentially useful use case: having
a large menu and using shortcut keys to jump to a section within the
menu.

Fix by treating a shortcut key on a separator as equivalent to "select
the separator, then press the down arrow key".  This has the effect of
moving to the first non-separator menu item following the specified
separator, which is probably the most intuitive behaviour.  (The
existing logic for moving the selection already handles the various
nasty corner cases such as a menu ending with one or more separators.)

Reported-by: Ján ONDREJ (SAL) <ondrejj@salstar.sk>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[menu] Prevent character code zero from acting as a shortcut key
Michael Brown [Wed, 6 Mar 2013 14:41:46 +0000 (14:41 +0000)] 
[menu] Prevent character code zero from acting as a shortcut key

Unrecognised keys may be returned by getkey() as character code zero,
which currently matches against the first menu item with no shortcut
key defined.

Prevent this unintended behaviour by explicitly checking that the menu
item has a defined shortcut key.

Reported-by: Ján ONDREJ (SAL) <ondrejj@salstar.sk>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[zbin] Fix size used for memset in alloc_output_file
Daniel P. Berrange [Tue, 5 Mar 2013 15:18:20 +0000 (15:18 +0000)] 
[zbin] Fix size used for memset in alloc_output_file

The output->buf field is a pointer, not an array, so sizeof() is not
applicable.  We must use the allocated string length instead.

Identified by gcc:

  util/zbin.c: In function ‘alloc_output_file’:
  util/zbin.c:146:37: warning: argument to ‘sizeof’ in ‘memset’ call
    is the same expression as the destination; did you mean to
    dereference it? [-Wsizeof-pointer-memaccess]
  memset ( output->buf, 0xff, sizeof ( output->buf ) );

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[undi] Work around specific devices with known broken interrupt behaviour
Michael Brown [Tue, 5 Mar 2013 14:22:53 +0000 (14:22 +0000)] 
[undi] Work around specific devices with known broken interrupt behaviour

Some PXE stacks are known to claim that IRQs are supported, but then
never generate interrupts.  No satisfactory solution has been found to
this problem; the workaround is to add the PCI vendor and device IDs
to a list of devices which will be treated as simply not supporting
interrupts.

This is something of a hack, since it will generate false positives
for identical devices with a working PXE stack (e.g. those that have
been reflashed with iPXE), but it's an improvement on the current
situation.

Reported-by: Richard Moore <rich@richud.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[tg3] Fix various tg3 issues
Kevin Tran [Mon, 4 Mar 2013 21:56:24 +0000 (21:56 +0000)] 
[tg3] Fix various tg3 issues

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[netdevice] Separate VLAN support from presence of VLAN-supporting drivers
Michael Brown [Fri, 1 Mar 2013 16:32:29 +0000 (16:32 +0000)] 
[netdevice] Separate VLAN support from presence of VLAN-supporting drivers

Some NICs (e.g. Hermon) provide hardware support for stripping the
VLAN tag, but do not provide any way for this support to be disabled.
Drivers for this hardware must therefore call vlan_find() to identify
a suitable receiving network device.

Provide a weak version of vlan_find() which will always return NULL if
VLAN support has not been enabled (either directly, or by enabling
a feature such as FCoE which requires VLAN support).  This allows the
VLAN code to be omitted from builds where the user has not requested
support for VLANs.

Inspired-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[iscsi] Include 802.1Q VLAN identifier in iBFT
Stefan Hajnoczi [Fri, 1 Mar 2013 15:32:16 +0000 (16:32 +0100)] 
[iscsi] Include 802.1Q VLAN identifier in iBFT

The iBFT NIC section has a VLAN field which must be filled in so that
iSCSI booting works over VLANs.

Unfortunately it is unclear from the IBM specification linked in
ibft.c whether the VLAN field is just the 802.1Q VLAN Identifier or
the full 802.1Q TCI.  For now just fill in the VID, the Priority Code
Point and Drop Eligible Indicator could be set in the future if it
turns out they should be present too.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[netdevice] Add vlan_tag() to get the VLAN tag of a network device
Stefan Hajnoczi [Fri, 1 Mar 2013 15:32:15 +0000 (16:32 +0100)] 
[netdevice] Add vlan_tag() to get the VLAN tag of a network device

The iBFT has a VLAN field that should be filled in.  Add the
vlan_tag() function to extract the VLAN tag of a network device.

Since VLAN support is optional, define a weak function that returns 0
when iPXE is built without VLAN support.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Ensure EFI binaries comply with Authenticode requirements
Michael Brown [Mon, 25 Feb 2013 17:22:01 +0000 (17:22 +0000)] 
[efi] Ensure EFI binaries comply with Authenticode requirements

Authenticode requires that the size of the raw file must equal the
size of the OptionalHeader.SizeOfHeaders plus the sum of all sections'
SizeOfRawData.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[intel] Add Intel I210 Gigabit Ethernet PCI ID
Jens Rottmann [Wed, 6 Feb 2013 13:25:05 +0000 (14:25 +0100)] 
[intel] Add Intel I210 Gigabit Ethernet PCI ID

Signed-off-by: Jens Rottmann <JRottmann@LiPPERTembedded.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Include self-tests within "make everything"
Michael Brown [Thu, 31 Jan 2013 10:12:58 +0000 (10:12 +0000)] 
[build] Include self-tests within "make everything"

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[tls] Concatenate received non-data records before processing
Michael Brown [Wed, 30 Jan 2013 16:58:17 +0000 (16:58 +0000)] 
[tls] Concatenate received non-data records before processing

Allow non-data records to be split across multiple received I/O
buffers, to accommodate large certificate chains.

Reported-by: Nicola Volpini <Nicola.Volpini@kambi.com>
Tested-by: Nicola Volpini <Nicola.Volpini@kambi.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[src] Fix spelling in comments, debug messages and local variable names
Stefan Weil [Thu, 3 Jan 2013 15:12:32 +0000 (15:12 +0000)] 
[src] Fix spelling in comments, debug messages and local variable names

Fixes in comments and debug messages:

  existance -> existence
  unecessary -> unnecessary
  occured -> occurred
  decriptor -> descriptor
  neccessary -> necessary
  addres, adress -> address
  initilize -> initialize
  sucessfully -> successfully
  paramter -> parameter
  acess -> access
  upto -> up to
  likelyhood ->likelihood
  thru -> through
  substracting -> subtracting
  lenght -> length
  isnt -> isn't
  interupt -> interrupt
  publically -> publicly (this one was not wrong, but unusual)
  recieve -> receive
  accessable -> accessible
  seperately -> separately
  pacet -> packet
  controled -> controlled
  dectect -> detect
  indicies -> indices
  extremly -> extremely
  boundry -> boundary
  usefull -> useful
  unuseable -> unusable
  auxilliary -> auxiliary
  embeded -> embedded
  enviroment -> environment
  sturcture -> structure
  complier -> compiler
  constructes -> constructs
  supress -> suppress
  intruduced -> introduced
  compatability -> compatibility
  verfication -> verification
  ths -> the
  reponse -> response

Fixes in local variable names:

  retreive -> retrieve

Most of these fixes were made using codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Include product short name in EFI SNP device names
Michael Brown [Wed, 21 Nov 2012 03:36:07 +0000 (03:36 +0000)] 
[efi] Include product short name in EFI SNP device names

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Delegate to child device's EFI_COMPONENT_NAME2_PROTOCOL, if present
Michael Brown [Wed, 21 Nov 2012 02:37:55 +0000 (02:37 +0000)] 
[efi] Delegate to child device's EFI_COMPONENT_NAME2_PROTOCOL, if present

EFI's device naming model requires drivers to provide names for child
devices.  Allow the driver's GetControllerName() method to delegate to
an instance of EFI_COMPONENT_NAME2_PROTOCOL installed on the child
device itself (if present); this allows the SNP device to expose its
own device name via the PCI driver's GetControllerName() method.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[bzimage] Allow initrds to be rearranged in place
Michael Brown [Mon, 12 Nov 2012 16:16:31 +0000 (16:16 +0000)] 
[bzimage] Allow initrds to be rearranged in place

At present, loading a bzImage via iPXE requires enough RAM to hold two
copies of each initrd file.  Remove this constraint by rearranging the
initrds in place.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[initrd] Add ability to reshuffle initrds into image list order
Michael Brown [Mon, 12 Nov 2012 13:08:16 +0000 (13:08 +0000)] 
[initrd] Add ability to reshuffle initrds into image list order

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[libc] Relicense x86 string.h
Michael Brown [Mon, 5 Nov 2012 01:01:12 +0000 (01:01 +0000)] 
[libc] Relicense x86 string.h

No code from the original source remains within this file; relicense
under GPL2+ with a new copyright notice.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[libc] Fix and externalise memswap()
Michael Brown [Mon, 5 Nov 2012 00:58:20 +0000 (00:58 +0000)] 
[libc] Fix and externalise memswap()

Make memswap() behave correctly if called with a length of zero.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[libc] Reduce overall code size by externalising strlen()
Michael Brown [Mon, 5 Nov 2012 00:25:25 +0000 (00:25 +0000)] 
[libc] Reduce overall code size by externalising strlen()

Typical saving is 5-20 bytes in each file using strlen().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[libc] Reduce overall code size by externalising strncmp()
Michael Brown [Sun, 4 Nov 2012 23:53:59 +0000 (23:53 +0000)] 
[libc] Reduce overall code size by externalising strncmp()

Typical saving is 20-30 bytes in each file using strncmp().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[libc] Remove unnecessary "cld" instruction from memset()
Michael Brown [Sun, 4 Nov 2012 22:58:42 +0000 (22:58 +0000)] 
[libc] Remove unnecessary "cld" instruction from memset()

Saving is one byte per call to memset().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[libc] Convert memcpy() from a macro to an inline function
Michael Brown [Sun, 4 Nov 2012 22:50:27 +0000 (22:50 +0000)] 
[libc] Convert memcpy() from a macro to an inline function

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[libc] Reduce overall code size by externalising memmove()
Michael Brown [Sun, 4 Nov 2012 22:43:59 +0000 (22:43 +0000)] 
[libc] Reduce overall code size by externalising memmove()

Typical saving is 15-20 bytes in each file using memmove().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[libc] Remove obsolete implementation of memcpy()
Michael Brown [Sun, 4 Nov 2012 21:45:34 +0000 (21:45 +0000)] 
[libc] Remove obsolete implementation of memcpy()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[test] Add self-tests for string functions
Michael Brown [Mon, 12 Nov 2012 16:58:26 +0000 (16:58 +0000)] 
[test] Add self-tests for string functions

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[umalloc] Split largest_memblock() function out from init_eheap()
Michael Brown [Mon, 5 Nov 2012 23:19:16 +0000 (23:19 +0000)] 
[umalloc] Split largest_memblock() function out from init_eheap()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[uaccess] Add userptr_sub() to find the difference between two user pointers
Michael Brown [Mon, 5 Nov 2012 16:09:38 +0000 (16:09 +0000)] 
[uaccess] Add userptr_sub() to find the difference between two user pointers

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[list] Reduce overall code size by externalising many list functions
Michael Brown [Fri, 2 Nov 2012 16:12:56 +0000 (16:12 +0000)] 
[list] Reduce overall code size by externalising many list functions

Typical saving is 10-20 bytes in each file using list functions.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Make version.o depend on the git index
Thomas Miletich [Fri, 2 Nov 2012 15:00:09 +0000 (15:00 +0000)] 
[build] Make version.o depend on the git index

The version number string is currently updated only if version.o
happens to be rebuilt due to changes in its dependencies.  Add a
dependency upon the git index, so that the version number is updated
after any checkout.

Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Include version number within only a single object file
Michael Brown [Fri, 2 Nov 2012 14:46:39 +0000 (14:46 +0000)] 
[build] Include version number within only a single object file

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Inhibit .eh_frame on newer gcc versions
Michael Brown [Fri, 2 Nov 2012 12:15:36 +0000 (12:15 +0000)] 
[build] Inhibit .eh_frame on newer gcc versions

Using -fno-dwarf2-cfi-asm is not sufficient to prevent the .eh_frame
section from being generated on newer versions of gcc.  Add
-fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables;
this is sufficient to inhibit the .eh_frame section on gcc 4.7.1.

This does not affect the overall binary size, but does fix the numbers
reported by "size" for individual object files.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[build] Use -maccumulate-outgoing-args if required by gcc
Michael Brown [Fri, 2 Nov 2012 13:21:52 +0000 (13:21 +0000)] 
[build] Use -maccumulate-outgoing-args if required by gcc

Current versions of gcc require -maccumulate-outgoing-args if any
sysv_abi functions call ms_abi functions.  This requirement is likely
to be lifted in future gcc versions, so test explicitly to see if the
current version of gcc requires -maccumulate-outgoing-args.

This problem is currently masked since the implied
-fasynchronous-unwind-tables (which is the default in current gcc
versions) implies -maccumulate-outgoing-args.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[forcedeth] Increase TX ring size to prevent dropped packets
Michael Brown [Mon, 29 Oct 2012 10:14:00 +0000 (10:14 +0000)] 
[forcedeth] Increase TX ring size to prevent dropped packets

Commit 947976d ("[netdevice] Do not force a poll on net_tx()")
requires network devices to have TX rings that are sufficiently large
to allow a transmitted response to all packets received during a
single poll.

Reported-by: Robin Smidsrød <robin@smidsrod.no>
Tested-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[intel] Poll RX queue if hardware reports RX overflow
Michael Brown [Thu, 25 Oct 2012 23:09:09 +0000 (16:09 -0700)] 
[intel] Poll RX queue if hardware reports RX overflow

The Intel NIC emulation in some versions of VMware seems to suffer
from a flaw whereby the Interrupt Cause Register (ICR) fails to assert
the usual "packet received" bit (ICR.RXT0) if a receive overflow
(ICR.RXO) has also occurred.

Work around this flaw by polling for completed descriptors whenever
either ICR.RXT0 or ICR.RXO is asserted.

Reported-by: Miroslav Halas <miroslav.halas@bankofamerica.com>
Debugged-by: Miroslav Halas <miroslav.halas@bankofamerica.com>
Tested-by: Miroslav Halas <miroslav.halas@bankofamerica.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[hermon] Use PCI VPD for non-volatile option storage
Michael Brown [Mon, 15 Oct 2012 12:04:31 +0000 (13:04 +0100)] 
[hermon] Use PCI VPD for non-volatile option storage

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[readline] Allow readline_history() to return a meaningful status
Michael Brown [Thu, 25 Oct 2012 06:21:49 +0000 (23:21 -0700)] 
[readline] Allow readline_history() to return a meaningful status

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[netdevice] Clear network device setting before unregistering
Michael Brown [Thu, 25 Oct 2012 05:44:00 +0000 (22:44 -0700)] 
[netdevice] Clear network device setting before unregistering

Avoid memory leaks by clearing any (non-child) settings immediately
before unregistering the network device settings block.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[settings] Prefill existing setting value in "read" command
Michael Brown [Thu, 25 Oct 2012 03:42:21 +0000 (20:42 -0700)] 
[settings] Prefill existing setting value in "read" command

When prompting the user to enter a setting value via the "read"
command, prefill the input buffer with the setting's current value.

Requested-by: Ján Ondrej (SAL) <ondrejj@salstar.ks>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[readline] Allow a prefilled input string to be provided
Michael Brown [Thu, 25 Oct 2012 03:16:15 +0000 (20:16 -0700)] 
[readline] Allow a prefilled input string to be provided

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[settings] Add fetchf_named_setting_copy()
Michael Brown [Thu, 25 Oct 2012 03:41:39 +0000 (20:41 -0700)] 
[settings] Add fetchf_named_setting_copy()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[netdevice] Do not force a poll on net_tx()
Michael Brown [Wed, 24 Oct 2012 20:26:51 +0000 (13:26 -0700)] 
[netdevice] Do not force a poll on net_tx()

Including a netdev_poll() within net_tx() can cause the net_step()
loop to end up processing hundreds or thousands of packets within a
single step, since each received packet being processed may trigger a
response which, in turn causes a poll for further received packets.

Network devices must now ensure that the TX ring is at least as large
as the RX ring, in order to avoid running out of TX descriptors.  This
should not cause any problems; unlike the RX ring, there is no
substantial memory cost incurred by increasing the TX ring size.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[intel] Report receive overruns via network device errors
Michael Brown [Wed, 24 Oct 2012 18:21:34 +0000 (11:21 -0700)] 
[intel] Report receive overruns via network device errors

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 years ago[efi] Add EFI_COMPONENT_NAME2_PROTOCOL instance for each SNP device
Michael Brown [Tue, 23 Oct 2012 21:05:03 +0000 (14:05 -0700)] 
[efi] Add EFI_COMPONENT_NAME2_PROTOCOL instance for each SNP device

Signed-off-by: Michael Brown <mcb30@ipxe.org>