13 years ago[Contribs] Add README, license text, and invert error code dictionaries.
Stefan Hajnoczi [Sat, 10 May 2008 14:06:21 +0000 (15:06 +0100)]
[Contribs] Add README, license text, and invert error code dictionaries.

13 years ago[Contribs] Add a web interface for looking up error codes.
Stefan Hajnoczi [Sat, 10 May 2008 13:29:40 +0000 (14:29 +0100)]
[Contribs] Add a web interface for looking up error codes.

Add a PHP script to act as a web interface for looking up error codes.

13 years ago[Contribs] Add command-line utility for looking up gPXE error codes.
Stefan Hajnoczi [Sat, 10 May 2008 11:57:13 +0000 (12:57 +0100)]
[Contribs] Add command-line utility for looking up gPXE error codes.

13 years ago[SMBIOS] Interpret UUIDs as being in network-endian order
Michael Brown [Tue, 20 May 2008 17:41:36 +0000 (18:41 +0100)]
[SMBIOS] Interpret UUIDs as being in network-endian order

Various specification documents disagree about the byte ordering of
UUIDs.  However, SMBIOS seems to use the standard in which everything is
in network-endian order.

This doesn't affect anything sent on the wire; only what gets printed on
the screen when the "uuid" variable is displayed.

13 years ago[libc] Fix isdigit(), islower() and isupper().
Michael Brown [Mon, 19 May 2008 15:34:17 +0000 (16:34 +0100)]
[libc] Fix isdigit(), islower() and isupper().

From: Stefan Hajnoczi <>

13 years ago[tg3] Add support for tg3-5721
Michael Brown [Mon, 19 May 2008 15:22:13 +0000 (16:22 +0100)]
[tg3] Add support for tg3-5721

From: Daniel Mealha Cabrita <>

I've added tg3-5721 support for gPXE, the patch (against gpxe-0.9.3) is
attached to this message.

This chipset is present in HP ML150 G2 servers (possibly other HP machines
as well).

13 years ago[IPv4] Fix multicast address checking
Michael Brown [Mon, 19 May 2008 15:19:46 +0000 (16:19 +0100)]
[IPv4] Fix multicast address checking

From: Viswanath Krishnamurthy <>

The current ipv4 incorrectly checks the IP address for multicast address.
This causes valid IPv4 unicast address to be trated as multicast address

For e.g if the PXE/tftp server IP address is 192.168.4.XXX where XXX is
224 or greater, it gets treated as multicast address and a ethernet
multicast address is sent out on the wire causing timeouts

13 years ago[iSCSI] Offer CHAP authentication only if we have a username and password origin/HEAD origin/master
Michael Brown [Thu, 24 Apr 2008 12:48:29 +0000 (13:48 +0100)]
[iSCSI] Offer CHAP authentication only if we have a username and password

Some EMC targets will fail if we advertise that we can authenticate with
CHAP, but the target is configured to allow unauthenticated access to that
target.  We advertise AuthMethod=CHAP,None; the target should (I think)
select AuthMethod=None for unprotected targets.  IETD does this, but an
EMC Celerra NS83 doesn't.

Fix by offering only AuthMethod=None if the user hasn't supplied a
username and password; this means that we won't be offering CHAP
authentication unless the user is expecting to use it (in which case the
target is presumably configured appropriately).

Many thanks to Alessandro Iurlano <> for
reporting and helping to diagnose this problem.

13 years ago[Makefile] Quick hack: always define pci_{vendor,device}_id
Michael Brown [Wed, 23 Apr 2008 15:24:00 +0000 (16:24 +0100)]
[Makefile] Quick hack: always define pci_{vendor,device}_id

ROMs will refuse to build unless pci_vendor_id and pci_device_id are
defined.  We probably ought to fix up the Makefile (and the ROM prefix) so
that they're required only for PCI ROMs, but this will do for now.

13 years ago[MTNIC] Minor cleanups of vendor-provided driver for Mellanox 10GigE cards
Michael Brown [Tue, 22 Apr 2008 16:49:29 +0000 (17:49 +0100)]
[MTNIC] Minor cleanups of vendor-provided driver for Mellanox 10GigE cards

Drivers are not allowed to call printf().  Converted eprintf() to DBG(),
and removed spurious startup banner.

Fixed hardcoded inclusion of little_bswap.h

Use EIO rather than 1 as an error number.

13 years ago[NETDEV] Add notion of link state
Michael Brown [Tue, 22 Apr 2008 16:40:50 +0000 (17:40 +0100)]
[NETDEV] Add notion of link state

Add ability for network devices to flag link up/down state to the
networking core.

Autobooting code will now wait for link-up before attempting DHCP.

IPoIB reflects the Infiniband link state as the network device link state
(which is not strictly correct; we also need a succesful IPoIB IPv4
broadcast group join), but is probably more informative.

13 years ago[Infiniband] Fix event queue doorbell ringing on Arbel
Michael Brown [Tue, 22 Apr 2008 01:15:36 +0000 (02:15 +0100)]
[Infiniband] Fix event queue doorbell ringing on Arbel

13 years ago[Infiniband] Add multiport support for Arbel cards
Michael Brown [Tue, 22 Apr 2008 00:37:00 +0000 (01:37 +0100)]
[Infiniband] Add multiport support for Arbel cards

13 years ago[Infiniband] Move event-queue process from driver to Infiniband core
Michael Brown [Mon, 21 Apr 2008 12:23:11 +0000 (13:23 +0100)]
[Infiniband] Move event-queue process from driver to Infiniband core

13 years ago[Hermon] Fix event queue doorbells.
Michael Brown [Fri, 18 Apr 2008 04:33:39 +0000 (05:33 +0100)]
[Hermon] Fix event queue doorbells.

Event queue doorbells must use UAR pages 0-127 depending on event queue
number; other doorbells must use pages 128+ (and we choose to use page

13 years ago[Infiniband] Add preliminary multiple port support for Hermon cards
Michael Brown [Fri, 18 Apr 2008 01:50:48 +0000 (02:50 +0100)]
[Infiniband] Add preliminary multiple port support for Hermon cards

Infiniband devices no longer block waiting for link-up in

Hermon driver needs to create an event queue and poll for link-up events.

Infiniband core needs to reread MAD parameters when link state changes.

IPoIB needs to cope with Infiniband link parameters being only partially
available at probe and open time.

13 years ago[HCI] Display "Not an executable image" when appropriate
Michael Brown [Tue, 8 Apr 2008 15:28:00 +0000 (16:28 +0100)]
[HCI] Display "Not an executable image" when appropriate

PXE is a catch-all image format with no signature checks.  If an
unsupported image file is loaded, it will be treated as a PXE image.  In
most cases, the image will be too large to be loaded as a PXE image (which
has to fit in base memory), so the error returned to the user will be that
the segment could not fit within the memory region.

Add an explicit check to pxe_image.c to reject images larger than base
memory with ENOEXEC.

Add ENOEXEC to the error string table.

13 years ago[Drivers-r8169] Add support for newer rtl8169 variants from Hilko Bengen
Marty Connor [Mon, 31 Mar 2008 13:14:23 +0000 (09:14 -0400)]
[Drivers-r8169] Add support for newer rtl8169 variants from Hilko Bengen

03-19-2008, Hilko Bengen, Cleanups and fixes for newer cards
(successfully tested with 8110SC-d onboard NIC)

13 years ago[http] gPXE is a HTTP/1.0 client, not a HTTP/1.1 client
H. Peter Anvin [Mon, 31 Mar 2008 12:01:08 +0000 (05:01 -0700)]
[http] gPXE is a HTTP/1.0 client, not a HTTP/1.1 client

gPXE is not compliant with the HTTP/1.1 specification (RFC 2616),
since it lacks support for "Transfer-Encoding: chunked".  gPXE is,
however, compliant with the HTTP/1.0 specification (RFC 1945), which
does not require "Transfer-Encoding: chunked" to be supported.

The only HTTP/1.1 feature that gPXE uses is the "Host:" header, but
servers universally accept that one from HTTP/1.0 clients as an
optional extension (it is obligatory for HTTP/1.1).  gPXE does not,
for example, appear to support connection caching.  Advertising as a
HTTP/1.0 client will typically make the server close the connection
immediately upon sending the last data, which is actually beneficial
if we aren't going to keep the connection alive anyway.

13 years ago[Settings] Expose SMBIOS via settings API
Michael Brown [Fri, 28 Mar 2008 15:35:06 +0000 (15:35 +0000)]
[Settings] Expose SMBIOS via settings API

In particular, expose the system UUID as a setting ("smbios/uuid").

13 years ago[DHCP] Add support for ProxyDHCP requests
Michael Brown [Thu, 27 Mar 2008 16:31:31 +0000 (16:31 +0000)]
[DHCP] Add support for ProxyDHCP requests

The PXE spec is (as usual) unclear on precisely when ProxyDHCPREQUESTs
should be issued.  We adapt the following, slightly paranoid approach:

  If an offer contains an IP address, then it is a normal DHCPOFFER.

  If an offer contains an option #60 "PXEClient", then it is a
  ProxyDHCPOFFER.  Note that the same packet can be both a normal

  After receiving the normal DHCPACK, if we have received a
  ProxyDHCPOFFER, we unicast a ProxyDHCPREQUEST back to the ProxyDHCP
  server on port 4011.  If we time out waiting for a ProxyDHCPACK, we
  treat this as a non-fatal error.

13 years ago[Settings] find_child_settings() accepts a NULL parent
Michael Brown [Thu, 27 Mar 2008 06:07:19 +0000 (06:07 +0000)]
[Settings] find_child_settings() accepts a NULL parent

13 years ago[DHCP] Treat empty fields in DHCP packets as non-existent.
Michael Brown [Thu, 27 Mar 2008 06:06:36 +0000 (06:06 +0000)]
[DHCP] Treat empty fields in DHCP packets as non-existent.

This avoids confusing other code by insisting that we have e.g. a
filename consisting of 128 zero bytes.

13 years ago[usr] Offer user a second chance to enter the shell on boot failure
Michael Brown [Wed, 26 Mar 2008 23:16:20 +0000 (23:16 +0000)]
[usr] Offer user a second chance to enter the shell on boot failure

13 years ago[libc] Whitespace cleanup in errno.h
Michael Brown [Wed, 26 Mar 2008 22:57:25 +0000 (22:57 +0000)]
[libc] Whitespace cleanup in errno.h

13 years ago[PXEXT] Update documentation
H. Peter Anvin [Wed, 26 Mar 2008 22:14:55 +0000 (15:14 -0700)]
[PXEXT] Update documentation

Add documentation for the FILE_EXEC and FILE_CHECK_API extension
calls, and update the documentation for the FILE_READ call.

13 years ago[PXEXT] Change the PXE return code for EWOULDBLOCK
H. Peter Anvin [Wed, 26 Mar 2008 22:12:19 +0000 (15:12 -0700)]
[PXEXT] Change the PXE return code for EWOULDBLOCK

Change the PXE return code for EWOULDBLOCK from PXENV_STATUS_FAILURE
to PXENV_STATUS_TFTP_OPEN.  This code is only used by the FILE_READ
PXEXT call, and is necessary to distinguish "error" from "no data" in
that call.

(The only other nonblocking call is UDP_READ, where the caller doesn't
care about the distinction, however, gPXE doesn't use EWOULDBLOCK
internally to represent this condition in that code.)

13 years ago[PXEXT] Add FILE_API_CHECK API function
H. Peter Anvin [Wed, 26 Mar 2008 22:10:56 +0000 (15:10 -0700)]

Add FILE_API_CHECK to the PXEXT API so the NBP can query the
availability and status of the API.

13 years ago[DHCP] Save precious packet-aligned memory by copying DHCP responses
Michael Brown [Wed, 26 Mar 2008 12:25:59 +0000 (12:25 +0000)]
[DHCP] Save precious packet-aligned memory by copying DHCP responses

Copy DHCP responses to a standard malloc()ed buffer, rather than
retaining the I/O buffer that they arrived in.

13 years ago[PXEXT] Avoid queueing zero-length buffers in posix_io.c
Michael Brown [Tue, 25 Mar 2008 21:10:21 +0000 (21:10 +0000)]
[PXEXT] Avoid queueing zero-length buffers in posix_io.c

read_user() assumes that zero-length buffers don't exist, and optimises
around this.

13 years ago[Settings] Remove assumption that all settings have DHCP tag values
Michael Brown [Tue, 25 Mar 2008 20:46:16 +0000 (20:46 +0000)]
[Settings] Remove assumption that all settings have DHCP tag values

Allow for settings to be described by something other than a DHCP option
tag if desirable.  Currently used only for the MAC address setting.

Separate out fake DHCP packet creation code from dhcp.c to fakedhcp.c.

Remove notion of settings from dhcppkt.c.

Rationalise dhcp.c to use settings API only for final registration of the
DHCP options, rather than using {store,fetch}_setting throughout.

13 years ago[PXEXT] Avoid returning a false EOF when we have an empty buffer queued
Michael Brown [Tue, 25 Mar 2008 20:29:42 +0000 (20:29 +0000)]
[PXEXT] Avoid returning a false EOF when we have an empty buffer queued

13 years ago[DHCP] Fix DHCP state confusion.
Michael Brown [Tue, 25 Mar 2008 16:38:01 +0000 (16:38 +0000)]
[DHCP] Fix DHCP state confusion.

DHCP code was using an incorrect check for whether to construct a

13 years ago[Settings] Add named setting for next-server
Michael Brown [Mon, 24 Mar 2008 00:48:06 +0000 (00:48 +0000)]
[Settings] Add named setting for next-server

It's probably easier to have a named setting for next-server, rather
than to explain to people why they need to pretend it is option 175.3.

13 years ago[Makefile] Use -MM instead of -M in dependency generation
Michael Brown [Mon, 24 Mar 2008 00:28:55 +0000 (00:28 +0000)]
[Makefile] Use -MM instead of -M in dependency generation

Using -MM strips out any system header files from the dependency list,
which means that we could safely use an external stdarg.h if we wanted

13 years ago[libc] Use __builtin_va_list et al in stdarg.h
Michael Brown [Mon, 24 Mar 2008 00:23:11 +0000 (00:23 +0000)]
[libc] Use __builtin_va_list et al in stdarg.h

The home-grown versions don't work properly for static variadic
functions, when gcc can choose to use a non-standard calling convention.

13 years ago[Settings] copy_settings() should not fail if some settings are missing!
Michael Brown [Sun, 23 Mar 2008 23:28:21 +0000 (23:28 +0000)]
[Settings] copy_settings() should not fail if some settings are missing!

13 years ago[IPv4] Use default netmasks when no subnet mask is specified.
Michael Brown [Sun, 23 Mar 2008 22:20:47 +0000 (22:20 +0000)]
[IPv4] Use default netmasks when no subnet mask is specified.

13 years ago[IPv4] Tidy up some header files.
Michael Brown [Sun, 23 Mar 2008 22:05:29 +0000 (22:05 +0000)]
[IPv4] Tidy up some header files.

13 years ago[DHCP] Fix up fake-packet creation as used by PXENV_GET_CACHED_INFO
Michael Brown [Sun, 23 Mar 2008 21:58:05 +0000 (21:58 +0000)]
[DHCP] Fix up fake-packet creation as used by PXENV_GET_CACHED_INFO

Add dedicated functions create_dhcpdiscover(), create_dhcpack() and
create_proxydhcpack() for use by external code such as the PXE preboot

Register ProxyDHCP options under the global scope "proxydhcp".

Unregister previously-acquired DHCP and ProxyDHCP settings when DHCP

13 years ago[DHCP] FIXME: quick temporary settings fix, needs update for new API
Marty Connor [Sat, 22 Mar 2008 03:37:02 +0000 (23:37 -0400)]
[DHCP] FIXME: quick temporary settings fix, needs update for new API

13 years agoMerge branch 'master' of
Michael Brown [Sat, 22 Mar 2008 00:50:06 +0000 (00:50 +0000)]
Merge branch 'master' of

13 years ago[Settings] Bugfix: store_setting() now applies changes even on root block
Michael Brown [Sat, 22 Mar 2008 00:40:33 +0000 (00:40 +0000)]
[Settings] Bugfix: store_setting() now applies changes even on root block

13 years ago[Settings] Implement simple_settings backed with extensible DHCP options
Michael Brown [Sat, 22 Mar 2008 00:24:50 +0000 (00:24 +0000)]
[Settings] Implement simple_settings backed with extensible DHCP options

13 years ago[Settings] DHCP is now working using the new settings API.
Michael Brown [Fri, 21 Mar 2008 22:55:59 +0000 (22:55 +0000)]
[Settings] DHCP is now working using the new settings API.

13 years ago[Settings] Migrate DHCP and NVO code to the new settings API (untested)
Michael Brown [Fri, 21 Mar 2008 22:15:31 +0000 (22:15 +0000)]
[Settings] Migrate DHCP and NVO code to the new settings API (untested)

13 years ago[DHCP] Kill off some no-longer-used DHCP functions
Michael Brown [Fri, 21 Mar 2008 00:50:12 +0000 (00:50 +0000)]
[DHCP] Kill off some no-longer-used DHCP functions

13 years ago[Settings] Use a settings applicator in ibft.c
Michael Brown [Fri, 21 Mar 2008 00:49:44 +0000 (00:49 +0000)]
[Settings] Use a settings applicator in ibft.c

13 years ago[Settings] Use a settings applicator to set the default TFTP URI.
Michael Brown [Fri, 21 Mar 2008 00:26:29 +0000 (00:26 +0000)]
[Settings] Use a settings applicator to set the default TFTP URI.

13 years ago[Misc] Kill off long-redundant tests/dhcptest.c
Michael Brown [Fri, 21 Mar 2008 00:07:36 +0000 (00:07 +0000)]
[Misc] Kill off long-redundant tests/dhcptest.c

13 years ago[IPv4] Add a config option for IPv4
Michael Brown [Fri, 21 Mar 2008 00:06:28 +0000 (00:06 +0000)]
[IPv4] Add a config option for IPv4

IPv4 may not always be dragged into the link, so add a specific
configuration option for it.

13 years ago[Settings] Use a settings applicator to configure IPv4 routes.
Michael Brown [Fri, 21 Mar 2008 00:01:27 +0000 (00:01 +0000)]
[Settings] Use a settings applicator to configure IPv4 routes.

13 years ago[Settings] Convert code in src/usr to use settings API.
Michael Brown [Thu, 20 Mar 2008 23:42:11 +0000 (23:42 +0000)]
[Settings] Convert code in src/usr to use settings API.

13 years ago[Settings] Introduce settings applicators.
Michael Brown [Thu, 20 Mar 2008 23:15:48 +0000 (23:15 +0000)]
[Settings] Introduce settings applicators.

Convert DHCP option applicators in dns.c and iscsi.c to settings

Kill off DHCP option applicators.

13 years ago[Settings] Add per-netdevice settings block
Michael Brown [Thu, 20 Mar 2008 21:06:03 +0000 (21:06 +0000)]
[Settings] Add per-netdevice settings block

Add a configuration settings block for each net device.  This will
provide the parent scope for settings applicable only to that network
device (e.g. non-volatile options stored on the NIC, options obtained via
DHCP, etc.).

Expose the MAC address as a setting.

13 years ago[Settings] Add settings hierarchy
Michael Brown [Thu, 20 Mar 2008 21:01:32 +0000 (21:01 +0000)]
[Settings] Add settings hierarchy

Add the notion of the settings hierarchy, complete with
register/unregister routines.

Rename set->store and get->fetch to avoid naming conflicts with get/put
as used in reference counting.

13 years ago[Settings] Start revamping the configuration settings API.
Michael Brown [Thu, 20 Mar 2008 04:06:07 +0000 (04:06 +0000)]
[Settings] Start revamping the configuration settings API.

Add the concept of an abstract configuration setting, comprising a (DHCP)
tag value and an associated byte sequence.

Add the concept of a settings namespace.

Add functions for extracting string, IPv4 address, and signed and
unsigned integer values from configuration settings (analogous to
dhcp_snprintf(), dhcp_ipv4_option(), etc.).

Update functions for parsing and formatting named/typed options to work
with new settings API.

Update NVO commands and config UI to use new settings API.

13 years ago]Drivers] Update licensing for cs89x0.[ch] and cs89x0.txt
Marty Connor [Wed, 19 Mar 2008 02:31:26 +0000 (22:31 -0400)]
]Drivers] Update licensing for cs89x0.[ch] and cs89x0.txt
Russ Nelson sent an email requesting the license change to
GPL Version 2.

13 years ago[Contribs] Add updated wake-on-LAN patch from Bill <>
Michael Brown [Wed, 19 Mar 2008 01:08:38 +0000 (01:08 +0000)]
[Contribs] Add updated wake-on-LAN patch from Bill <>

13 years ago[Settings] Allow named settings to have their type specified explicitly
Michael Brown [Tue, 18 Mar 2008 15:51:03 +0000 (15:51 +0000)]
[Settings] Allow named settings to have their type specified explicitly

Allow setting names such as "ip:hex".

13 years ago[Timers] Initialise timers on first use
Michael Brown [Tue, 18 Mar 2008 15:23:10 +0000 (15:23 +0000)]
[Timers] Initialise timers on first use

Timers are sometimes required before the call to initialise(), so we
cannot rely on initialise() to set up the timers before use.

Also fix a potential integer overflow issue in generic_currticks_udelay()

13 years ago[Timers] Miscellaneous timer system fixes
Michael Brown [Tue, 18 Mar 2008 14:48:28 +0000 (14:48 +0000)]
[Timers] Miscellaneous timer system fixes

Add missing comments to timer code.

Lock system if no suitable timer source is found.

Fix initialisation order so that timers are initialised before code that
needs to use them.

13 years ago[Settings] Allow encapsulated options to be specified as named settings
Michael Brown [Tue, 18 Mar 2008 04:13:11 +0000 (04:13 +0000)]
[Settings] Allow encapsulated options to be specified as named settings

Allow encapsulated options to be specified as e.g. "175.3".  As a
side-effect, change the separator character for the type field from "." to
":"; for example, the IP address pseudo-option is now "175.3:ipv4".

13 years ago[Settings] Add int16, int32 and hex-string configuration setting types
Michael Brown [Tue, 18 Mar 2008 03:23:36 +0000 (03:23 +0000)]
[Settings] Add int16, int32 and hex-string configuration setting types

Add parse and display routines for 16-bit and 32-bit integer configuration

Add parse and display routines for hex-string configuration settings.

Assume hex-string as a configuration setting type if no type is explicitly

13 years ago[libc] Fix a validation bug in strtoul()
Michael Brown [Tue, 18 Mar 2008 03:14:05 +0000 (03:14 +0000)]
[libc] Fix a validation bug in strtoul()

strtoul() was accepting the characters immediately above ASCII 0..9 as
valid hex digits, due to a missing comparison.

13 years ago[Settings] show_setting() functions return snprintf()-style length.
Michael Brown [Tue, 18 Mar 2008 00:48:23 +0000 (00:48 +0000)]
[Settings] show_setting() functions return snprintf()-style length.

show_setting() and related functions now return an "actual length" in the
style of snprintf().  This is to allow consumers to allocate buffers large
enough to hold the formatted setting.

13 years agoMerge branch 'pxerom-pmm'
Michael Brown [Tue, 11 Mar 2008 16:11:51 +0000 (16:11 +0000)]
Merge branch 'pxerom-pmm'

13 years ago[PXE] PMM now tested and working
Michael Brown [Tue, 11 Mar 2008 16:08:04 +0000 (16:08 +0000)]
[PXE] PMM now tested and working

Minor bugfix: 4 x 2 = 8, not 16

13 years ago[prefix] Cope with image source addresses outside base memory
Michael Brown [Tue, 11 Mar 2008 13:26:46 +0000 (13:26 +0000)]
[prefix] Cope with image source addresses outside base memory

When PMM is used, the gPXE image source will no longer be in base memory.
Decompression of .text16 and .data16 can therefore no longer be done in
real mode.

13 years ago[PXE] Improve PnP/BBS detection
Michael Brown [Tue, 11 Mar 2008 12:02:12 +0000 (12:02 +0000)]
[PXE] Improve PnP/BBS detection

Use BBS installation check to see if we need to hook INT19 even on a PnP

Verify that $PnP signature is paragraph-aligned; bochs/qemu BIOS provides
a dummy $PnP signature with no valid entry point, and deliberately
unaligns the signature to indicate that it is not properly valid.

Print message if INT19 is hooked.

Attempt to use PMM even if BBS check failed.

13 years ago[prefix] Add printing functions to libprefix.S
Michael Brown [Tue, 11 Mar 2008 11:32:19 +0000 (11:32 +0000)]
[prefix] Add printing functions to libprefix.S

Move the printing functions from pxeprefix.S into libprefix.S, so they
are available for debug from any prefix.

13 years agoMerge branch 'xl0-timer'
Michael Brown [Mon, 10 Mar 2008 13:02:53 +0000 (13:02 +0000)]
Merge branch 'xl0-timer'

13 years ago[PXE] Work around a buffer-size bug in WinPE
Michael Brown [Mon, 10 Mar 2008 11:46:55 +0000 (11:46 +0000)]
[PXE] Work around a buffer-size bug in WinPE

WinPE's pxeboot.n12 takes the BufferLimit returned by gPXE (indicating
the size of gPXE's internal DHCP packet buffers) and erroneously passes
it in as BufferSize (indicating the size of pxeboot.n12's DHCP packet
buffer).  If these don't match, then pxeboot.n12 ends up instructing gPXE
to overwrite parts of its data segment.

Change gPXE's internal DHCP packet buffers to be exactly
sizeof(BOOTPLAYER_t) bytes to work around this problem.

13 years ago[PXE] Add PMM support to romprefix.S (untested)
Michael Brown [Sun, 9 Mar 2008 22:13:07 +0000 (22:13 +0000)]
[PXE] Add PMM support to romprefix.S (untested)

ROM initialisation vector now attempts to allocate a 2MB block using
PMM.  If successful, it copies the ROM image to this block, then
shrinks the ROM image to allow for more option ROMs.  If unsuccessful,
it leaves the ROM as-is.

ROM BEV now attempts to return to the BIOS, resorting to INT 18 only
if the BIOS stack has been corrupted.

13 years ago[Makefile] Use bin/VVVVDDDD.rom instead of bin/pci_VVVV_DDDD.rom
Michael Brown [Thu, 6 Mar 2008 15:37:34 +0000 (15:37 +0000)]
[Makefile] Use bin/VVVVDDDD.rom instead of bin/pci_VVVV_DDDD.rom

The generate-by-PCI-device-ID rules (bin/pci_VVVV_DDDD.rom) are generally
used for building actual ROM images to be burned, and the burning
utilities generally run under some DOS variant.  Change the filename from
pci_VVVV_DDDD.rom to VVVVDDDD.rom so that it is compatible with the DOS
8.3-character filename limit.

13 years ago[tg3] Added device ID for rebranded HP card.
Michael Brown [Thu, 6 Mar 2008 13:19:42 +0000 (13:19 +0000)]
[tg3] Added device ID for rebranded HP card.

13 years agoUse plain C in timer_rdtsc for division instead of inline asssembly.
Alexey Zaytsev [Thu, 6 Mar 2008 13:06:58 +0000 (16:06 +0300)]
Use plain C in timer_rdtsc for division instead of inline asssembly.

This also fixes a bug in rdtsc_currticks when the result did not fix in %eax

Signed-off-by: Alexey Zaytsev <>
13 years ago[PXEXT] Add PXENV_FILE_EXEC call to PXE extensions API.
Michael Brown [Tue, 4 Mar 2008 18:16:30 +0000 (18:16 +0000)]
[PXEXT] Add PXENV_FILE_EXEC call to PXE extensions API.

This allows pxelinux to execute arbitrary gPXE commands.  This is
remarkably unsafe (not least because some of the commands will assume
full ownership of memory and do nasty things like edit the e820 map
underneath the calling pxelinux), but it does allow access to the
"sanboot" command.

13 years ago[Command] Add "sanboot" command.
Michael Brown [Tue, 4 Mar 2008 17:59:26 +0000 (17:59 +0000)]
[Command] Add "sanboot" command.

13 years ago[Timers] Move TIMER_BIOS and TIMER_RDTSC to their own config.h section.
Michael Brown [Sun, 2 Mar 2008 02:33:54 +0000 (02:33 +0000)]
[Timers] Move TIMER_BIOS and TIMER_RDTSC to their own config.h section.

13 years ago[Timers] Do not enable serial console by default; this change should not
Michael Brown [Sun, 2 Mar 2008 02:32:12 +0000 (02:32 +0000)]
[Timers] Do not enable serial console by default; this change should not
be propagated to master.

13 years agofix the rdtsc namimg
Alexey Zaytsev [Sun, 2 Mar 2008 02:19:29 +0000 (05:19 +0300)]
fix the rdtsc namimg

13 years agoCleanups
Alexey Zaytsev [Sun, 2 Mar 2008 01:36:50 +0000 (04:36 +0300)]

Replace a printf with a DBG in timer_rtdsc.c
Replace a printf in timer.c with assert
Return proper error codes from timer drivers

Signed-off-by: Alexey Zaytsev <>
13 years agoModify gPXE core and drivers to work with the new timer subsystem
Alexey Zaytsev [Sun, 2 Mar 2008 00:41:10 +0000 (03:41 +0300)]
Modify gPXE core and drivers to work with the new timer subsystem

Signed-off-by: Alexey Zaytsev <>
13 years agoIntroduce the new timer subsystem.
Alexey Zaytsev [Sat, 1 Dec 2007 04:07:01 +0000 (07:07 +0300)]
Introduce the new timer subsystem.

Timer subsystem initialization code in core/timer.c

Split the BIOS and RTDSC timer drivers from i386_timer.c

Split arch/i386/firmware/pcbios/bios.c into the RTSDC
timer driver and arch/i386/core/nap.c

Split the headers properly:
include/unistd.h - delay functions to be used by the
gPXE core and drivers.

include/gpxe/timer.h - the fimer subsystem interface
to be used by the timer drivers
and currticks() to be used by
the code gPXE subsystems.

include/latch.h - removed
include/timer.h - scheduled for removal. Some driver
are using currticks, which is
only for core subsystems.

Signed-off-by: Alexey Zaytsev <>
13 years ago[DHCP] Fix RFC4390 client identifier constructions.
Michael Brown [Wed, 27 Feb 2008 16:55:46 +0000 (16:55 +0000)]
[DHCP] Fix RFC4390 client identifier constructions.

RFC 4390 provides for the DHCP client identifier to contain the link-layer
hardware type and MAC address when the MAC address exceeds 16 bytes.
However, the hardware type field is only 8 bits; we were assuming 16 bits.

13 years ago[Infiniband] Add preliminary support for multi-port devices.
Michael Brown [Wed, 27 Feb 2008 13:59:56 +0000 (13:59 +0000)]
[Infiniband] Add preliminary support for multi-port devices.

Arbel and Hermon cards both have multiple ports.  Add the
infrastructure required to register each port as a separate IB
device.  Don't yet register more than one port, since registration
will currently fail unless a valid link is detected.

Use ib_*_{set,get}_{drv,owner}data wrappers to access driver- and
owner-private data on Infiniband structures.

13 years ago[Infiniband] Centralise MAD operations
Michael Brown [Tue, 26 Feb 2008 22:56:19 +0000 (22:56 +0000)]
[Infiniband] Centralise MAD operations

Pull out common code for handling management datagrams from arbel.c
and hermon.c into infiniband.c.

Add port number to struct ib_device.

Add open(), close() and mad() methods to struct ib_device_operations.

13 years ago[Hermon] Donate joint copyright on Hermon driver to Mellanox.
Michael Brown [Sat, 23 Feb 2008 11:05:46 +0000 (11:05 +0000)]
[Hermon] Donate joint copyright on Hermon driver to Mellanox.

13 years ago[Hermon] Add driver for Mellanox Hermon (ConnectX) cards.
Michael Brown [Sat, 23 Feb 2008 10:51:38 +0000 (10:51 +0000)]
[Hermon] Add driver for Mellanox Hermon (ConnectX) cards.

13 years ago[Infiniband] Fix typo in debug statement
Michael Brown [Sat, 23 Feb 2008 10:36:52 +0000 (10:36 +0000)]
[Infiniband] Fix typo in debug statement

13 years ago[Infiniband] Add missing list_del()s in ib_create_qp() failure path.
Michael Brown [Sat, 23 Feb 2008 04:03:31 +0000 (04:03 +0000)]
[Infiniband] Add missing list_del()s in ib_create_qp() failure path.

13 years agoAdd DBGLVL_IO to trace all memory-mapped I/O.
Michael Brown [Thu, 21 Feb 2008 12:39:00 +0000 (12:39 +0000)]
Add DBGLVL_IO to trace all memory-mapped I/O.

13 years agoRemove reference to COFF support. I can find no trace of ever having supported it.
Michael Brown [Thu, 21 Feb 2008 04:11:56 +0000 (04:11 +0000)]
Remove reference to COFF support.  I can find no trace of ever having supported it.

13 years agoMake tarball generation quieter gpxe-0.9.3-release
Marty Connor [Thu, 14 Feb 2008 22:40:45 +0000 (17:40 -0500)]
Make tarball generation quieter

Deleting bin/deps after "make veryclean" keeps deps from being
regenerated in the tarball.

13 years agoUpdated $(VERSION) for release. Change tarball generation.
Marty Connor [Thu, 14 Feb 2008 22:26:47 +0000 (17:26 -0500)]
Updated $(VERSION) for release. Change tarball generation.

Added 'install' and 'configure' targets for those who are used
to other build setups.

13 years agoRemove obsolete files (INSTALL, RELNOTES)
Marty Connor [Thu, 14 Feb 2008 21:42:38 +0000 (16:42 -0500)]
Remove obsolete files (INSTALL, RELNOTES)

Copyrights was renamed to COPYRIGHTS to match case with other top-level files

13 years agoUpdate VERSION for 0.9.3
Marty Connor [Thu, 14 Feb 2008 21:34:49 +0000 (16:34 -0500)]
Update VERSION for 0.9.3

13 years agoUpdate LOG for 0.9.3 release
Marty Connor [Thu, 14 Feb 2008 21:33:43 +0000 (16:33 -0500)]
Update LOG for 0.9.3 release

13 years agoRename Copyrights to COPYRIGHTS for consistency with other filenames
Marty Connor [Thu, 14 Feb 2008 21:21:51 +0000 (16:21 -0500)]
Rename Copyrights to COPYRIGHTS for consistency with other filenames