people/balajirrao/gpxe.git
13 years ago[USB] Improve UHCI port reset logic to include proper debounce. experimental
Balaji Rao [Thu, 10 Jul 2008 12:34:12 +0000 (18:04 +0530)]
[USB] Improve UHCI port reset logic to include proper debounce.

13 years ago[USB] Use SPD (Sort Packet Detect) for control transfers as well. USB 2.0 devices
Balaji Rao [Thu, 10 Jul 2008 03:07:30 +0000 (08:37 +0530)]
[USB] Use SPD (Sort Packet Detect) for control transfers as well. USB 2.0 devices
are now configured.

13 years ago[USB] Fix uhci port reset code.
Balaji Rao [Thu, 10 Jul 2008 02:57:12 +0000 (08:27 +0530)]
[USB] Fix uhci port reset code.

13 years agoRevert "[USB] Fixed USB 2.0 device detection bug. Moved device initialization and"
Balaji Rao [Thu, 10 Jul 2008 02:52:53 +0000 (08:22 +0530)]
Revert "[USB] Fixed USB 2.0 device detection bug. Moved device initialization and"

This reverts commit b0394265d3a7b9c507bc12a5f697ceca8c3a574a.

13 years ago[USB] Fixed USB 2.0 device detection bug. Moved device initialization and
Balaji Rao [Wed, 9 Jul 2008 00:58:41 +0000 (06:28 +0530)]
[USB] Fixed USB 2.0 device detection bug. Moved device initialization and
configuration code away from uhci_hcd.c into usbcore.c.

13 years ago[USB] Timeout if synch control message takes too much time.
Balaji Rao [Mon, 7 Jul 2008 14:30:24 +0000 (20:00 +0530)]
[USB] Timeout if synch control message takes too much time.

13 years ago[USB] Initialize a variable in pegasus.c to avoid compiler complaints.
Balaji Rao [Mon, 7 Jul 2008 12:55:10 +0000 (18:25 +0530)]
[USB] Initialize a variable in pegasus.c to avoid compiler complaints.

13 years ago[USB] Fix set_register function in pegasus to use size of 1 instead of 0.
Balaji Rao [Mon, 7 Jul 2008 07:30:29 +0000 (13:00 +0530)]
[USB] Fix set_register function in pegasus to use size of 1 instead of 0.

13 years ago[USB] asix USB driver ready. Works only with DLink DUB E 100 but not with
Balaji Rao [Fri, 4 Jul 2008 00:56:49 +0000 (06:26 +0530)]
[USB] asix USB driver ready. Works only with DLink DUB E 100 but not with
Belklin F5D055 gigabit adapter.

13 years ago[USB] Added asix driver. Only probe function written. MAC address read
Balaji Rao [Wed, 2 Jul 2008 01:35:15 +0000 (07:05 +0530)]
[USB] Added asix driver. Only probe function written. MAC address read
successfully.

13 years ago[USB] pegasus driver completed. Works. Tested with QEMU.
Balaji Rao [Mon, 30 Jun 2008 20:27:57 +0000 (01:57 +0530)]
[USB] pegasus driver completed. Works. Tested with QEMU.

13 years ago[USB] Simplify dm9601 transmit code.
Balaji Rao [Mon, 30 Jun 2008 00:30:41 +0000 (06:00 +0530)]
[USB] Simplify dm9601 transmit code.

13 years ago[USB] Quick and dirty hack to include dm9601 and pegasus as drivers.
Balaji Rao [Sun, 29 Jun 2008 23:15:13 +0000 (04:45 +0530)]
[USB] Quick and dirty hack to include dm9601 and pegasus as drivers.

13 years ago[USB] Cleanup source code to use proper error handling. Some minor changes in
Balaji Rao [Thu, 26 Jun 2008 20:33:11 +0000 (02:03 +0530)]
[USB] Cleanup source code to use proper error handling. Some minor changes in
synchronous control URB submission.

13 years ago[USB] Cleanup code to handle errors graciously. Still a work in progress.
Balaji Rao [Thu, 26 Jun 2008 12:42:50 +0000 (18:12 +0530)]
[USB] Cleanup code to handle errors graciously. Still a work in progress.

13 years ago[USB] Added support for pegasus usb nic driver. Only the transmit part works.
Balaji Rao [Wed, 25 Jun 2008 21:58:25 +0000 (03:28 +0530)]
[USB] Added support for pegasus usb nic driver. Only the transmit part works.

13 years ago[USB] Added support for FSBR. Added some optimizations in the rx path.
Balaji Rao [Fri, 20 Jun 2008 17:48:01 +0000 (23:18 +0530)]
[USB] Added support for FSBR. Added some optimizations in the rx path.

13 years agoMerge commit 'origin/master' into usb
Balaji Rao [Fri, 20 Jun 2008 17:47:31 +0000 (23:17 +0530)]
Merge commit 'origin/master' into usb

13 years ago[USB] Use zero copy in dm9601 rx part. Data now comes directly into io_buffer.
Balaji Rao [Fri, 20 Jun 2008 11:58:55 +0000 (17:28 +0530)]
[USB] Use zero copy in dm9601 rx part. Data now comes directly into io_buffer.

13 years ago[USB] Add rx code to dm9601 and add routines to cleanup URBS. Also fixed
Balaji Rao [Thu, 19 Jun 2008 18:15:36 +0000 (23:45 +0530)]
[USB] Add rx code to dm9601 and add routines to cleanup URBS. Also fixed
improper toggle bit handling. Now we use SPD (Short Packet Detect) for TDs.

13 years ago[script] Remove arbitrary limit on script line lengths
Michael Brown [Tue, 17 Jun 2008 23:43:58 +0000 (00:43 +0100)]
[script] Remove arbitrary limit on script line lengths

13 years ago[USB] Added routines to get URB status. This may be used by drivers to check
Balaji Rao [Tue, 17 Jun 2008 12:27:14 +0000 (17:57 +0530)]
[USB] Added routines to get URB status. This may be used by drivers to check
for tx, rx completion.

13 years ago[USB] Introduced two lists in struct usbnet and two fields in struct urb to
Balaji Rao [Mon, 16 Jun 2008 22:58:44 +0000 (04:28 +0530)]
[USB] Introduced two lists in struct usbnet and two fields in struct urb to
allow it be enqueued in various queues.

13 years ago[USB] Change first_td to last_td. It is the last_td that tells us about the
Balaji Rao [Mon, 16 Jun 2008 22:19:42 +0000 (03:49 +0530)]
[USB] Change first_td to last_td. It is the last_td that tells us about the
status of the whole URB.

13 years ago[USB] Cleanup uhci_hcd.c to remove some unnecessary debugging code.
Balaji Rao [Mon, 16 Jun 2008 22:15:03 +0000 (03:45 +0530)]
[USB] Cleanup uhci_hcd.c to remove some unnecessary debugging code.

13 years agoReduced synchronous control message completion wait time to 50ms from 100ms.
Balaji Rao [Mon, 16 Jun 2008 22:03:37 +0000 (03:33 +0530)]
Reduced synchronous control message completion wait time to 50ms from 100ms.

13 years ago[DRIVERS] Added a device driver for DM9601 (USB Ehernet Fast Adapter). Only the
Balaji Rao [Mon, 16 Jun 2008 12:06:08 +0000 (17:36 +0530)]
[DRIVERS] Added a device driver for DM9601 (USB Ehernet Fast Adapter). Only the
transmit part works now.

13 years ago[USB] Changed UHCI port reset logic to allow time for debounce after reset.
Balaji Rao [Mon, 16 Jun 2008 12:02:43 +0000 (17:32 +0530)]
[USB] Changed UHCI port reset logic to allow time for debounce after reset.

13 years ago[USB] Add support for bulk URBs.
Balaji Rao [Mon, 16 Jun 2008 19:19:36 +0000 (00:49 +0530)]
[USB] Add support for bulk URBs.

13 years ago[USB] Changed the semantics of submit_control_urb. We now allocate a qh per
Balaji Rao [Mon, 16 Jun 2008 19:03:58 +0000 (00:33 +0530)]
[USB] Changed the semantics of submit_control_urb. We now allocate a qh per
endpoint. This allows transactions from/to different endpoints to be executed
in parallel.

13 years agoCorrected the uhci_print_td_info to properly extract Vf field.
Balaji Rao [Mon, 16 Jun 2008 18:56:03 +0000 (00:26 +0530)]
Corrected the uhci_print_td_info to properly extract Vf field.

13 years ago[legacy] Align legacy drivers' __shared data to the maximum possible
Michael Brown [Sat, 14 Jun 2008 19:01:14 +0000 (20:01 +0100)]
[legacy] Align legacy drivers' __shared data to the maximum possible

Some drivers that still use the legacy-driver wrapper (tg3 in particular)
apparently do not specify their alignment constraints properly.  This
hack forces any __shared data to be maximally aligned.

Note that this provides only 16-byte alignment; it is not possible to
request alignment to any greater than 16 bytes using
__attribute__((aligned)), since the relocation code will preserve only 16
byte alignment (and operation under -DKEEP_IT_REAL cannot preserve more
that 16 byte alignment).

Idea proposed by Tim Hockin <thockin@google.com>

13 years ago[prefix] When we have to hook INT 19, chain to original handler if possible
Michael Brown [Sat, 14 Jun 2008 12:49:26 +0000 (13:49 +0100)]
[prefix] When we have to hook INT 19, chain to original handler if possible

When the BIOS doesn't support BBS, hooking INT 19 is the only way to add
ourselves as a boot device.  If we have to do this, we should at least
try to chain to the original INT 19 vector if our boot fails.

Idea suggested by Andrew Schran <aschran@google.com>

13 years ago[via-rhine] Fix erroneous uses of memory I/O instead of port I/O
Stefan Hajnoczi [Thu, 12 Jun 2008 14:21:42 +0000 (15:21 +0100)]
[via-rhine] Fix erroneous uses of memory I/O instead of port I/O

13 years ago[cleanup] Remove long-obsolete gpxe/async.h header file
Michael Brown [Thu, 12 Jun 2008 12:15:53 +0000 (13:15 +0100)]
[cleanup] Remove long-obsolete gpxe/async.h header file

13 years ago[bzimage] Support kernel command lines of greater than 256 characters
Michael Brown [Thu, 12 Jun 2008 01:19:10 +0000 (02:19 +0100)]
[bzimage] Support kernel command lines of greater than 256 characters

2.6.22+ kernels have an extra field in the bzimage_header structure to
indicate the maximum permitted command-line length.  Use this if it is
available.

13 years ago[cmdline] Remove arbitrary limit on the length of image command lines
Michael Brown [Thu, 12 Jun 2008 01:12:10 +0000 (02:12 +0100)]
[cmdline] Remove arbitrary limit on the length of image command lines

13 years ago[USB] Modified the endpoint descriptor code to use only Bluk and Control Endpoints.
Balaji Rao [Wed, 11 Jun 2008 15:25:40 +0000 (20:55 +0530)]
[USB] Modified the endpoint descriptor code to use only Bluk and Control Endpoints.

Changed the uhci schedule structure. In addition to two skeleton QHs for
control and bulk xfer types, we now have one QH for every Bulk endpoint.

13 years ago[smbios] Fix SMBIOS string fetching
Michael Brown [Wed, 11 Jun 2008 12:43:58 +0000 (13:43 +0100)]
[smbios] Fix SMBIOS string fetching

A bug in read_smbios_string() was causing the starting offset of the
SMBIOS structure to be added twice, resulting in completely the wrong
strings being returned.

Bug identified by Martin Herweg <m.herweg@gmx.de>

13 years ago[slam] Add support for SLAM window lengths of greater than one packet
Michael Brown [Wed, 11 Jun 2008 12:16:02 +0000 (13:16 +0100)]
[slam] Add support for SLAM window lengths of greater than one packet

Add the definition of SLAM_MAX_BLOCKS_PER_NACK, which is roughly
equivalent to a TCP window size; it represents the maximum number of
packets that will be requested in a single NACK.

Note that, to keep the code size down, we still limit ourselves to
requesting only a single range per NACK; if the missing-block list is
discontiguous then we may request fewer than SLAM_MAX_BLOCKS_PER_NACK
blocks.

13 years ago[USB] Added code to obtain the configuration, interface and endpoint descriptors
Balaji Rao [Wed, 11 Jun 2008 12:04:38 +0000 (17:34 +0530)]
[USB] Added code to obtain the configuration, interface and endpoint descriptors
from the device.

13 years ago[console] Call cpu_nap() only if there is no input waiting
Michael Brown [Wed, 11 Jun 2008 11:06:10 +0000 (12:06 +0100)]
[console] Call cpu_nap() only if there is no input waiting

Avoid calling cpu_nap() until after we have determined that there is
no input ready to read.  This avoids delaying for one timer interrupt
(~50ms) in the case of

  if ( iskey() )
     char = getkey()

which happens to be present in monojob.c, which is where we spend most
of our time looping (e.g. during any download).

This should eliminate the irritating tendency of gPXE to lose
keypresses.

Discovered on a Dell system where the serial port seems to send in a
constant stream of 0xff characters; this wouldn't be a problem in
itself except that each one triggers the 50ms delay (as mentioned
above), which really kills performance.

13 years ago[slam] Implement SLAM flow control
Michael Brown [Wed, 11 Jun 2008 08:41:31 +0000 (09:41 +0100)]
[slam] Implement SLAM flow control

On any fast network, or with any driver that may drop packets
(e.g. Infiniband, which has very small RX rings), the traditional
usage of the SLAM protocol will result in enormous numbers of packet
drops and a consequent large number of retransmissions.

By adapting the client behaviour, we can force the server to act more
like a multicast TFTP server, with flow control provided by a single
master client.

This behaviour should interoperate with any traditional SLAM client
(e.g. Etherboot 5.4) on the network.  The SLAM protocol isn't actually
documented anywhere, so it's hard to define either behaviour as
compliant or otherwise.

13 years ago[retry] Add start_timer_fixed()
Michael Brown [Wed, 11 Jun 2008 08:37:58 +0000 (09:37 +0100)]
[retry] Add start_timer_fixed()

Allow for timers to be started with fixed timeouts.

13 years ago[dhcp] Do not transition to DHCPREQUEST without a valid DHCPOFFER
Michael Brown [Wed, 11 Jun 2008 05:20:49 +0000 (06:20 +0100)]
[dhcp] Do not transition to DHCPREQUEST without a valid DHCPOFFER

A missing test for dhcp->dhcpoffer in dhcp_timer_expired() was causing
the client to transition to DHCPREQUEST after timing out on waiting
for ProxyDHCP even if no DHCPOFFERs had been received.

13 years ago[USB] Some minor code cleanup. Changed device detection code semantics a bit.
Balaji Rao [Tue, 10 Jun 2008 14:53:15 +0000 (20:23 +0530)]
[USB] Some minor code cleanup. Changed device detection code semantics a bit.
We first call GET DESCRIPTOR, get endpoint zero's MaxPacket size and then call
SET ADDRESS.

13 years ago[slam] Request all remaining blocks if we run out of space for the blocklist
Michael Brown [Tue, 10 Jun 2008 11:30:43 +0000 (12:30 +0100)]
[slam] Request all remaining blocks if we run out of space for the blocklist

In a SLAM NACK packet, if we run out of space to represent the
missing-block list, then indicate all remaining blocks as missing.
This avoids the need to wait for the one-second timeout before
receiving the blocks that otherwise wouldn't have been requested due
to running out of space.

13 years ago[slam] Speed up NACK transmission by restricting the block-list length
Michael Brown [Tue, 10 Jun 2008 10:23:34 +0000 (11:23 +0100)]
[slam] Speed up NACK transmission by restricting the block-list length

Shorter NACK packets take less time to construct and spew out less
debug output, and there's a limit to how useful it is to send a
complete missing-block list anyway; if the loss rate is high then
we're going to have to retransmit an updated missing-block list
anyway.

Also add pretty debugging output to show the list of requested blocks.

13 years ago[slam] Fix multicast address parsing
Michael Brown [Tue, 10 Jun 2008 09:03:31 +0000 (10:03 +0100)]
[slam] Fix multicast address parsing

slam_parse_multicast_address() was failing to strip the initial "/"
from the URI path.

13 years ago[undi] Ask for promiscuous packet reception when using UNDI driver
Michael Brown [Tue, 10 Jun 2008 07:56:44 +0000 (08:56 +0100)]
[undi] Ask for promiscuous packet reception when using UNDI driver

We never set up specific multicast filters; native drivers will ask
the card to receive all multicast packets.  The only way to achieve
this via the UNDI API is to enable promiscuous mode.

13 years ago[slam] Add Scalable Local Area Multicast (SLAM) protocol support
Michael Brown [Mon, 9 Jun 2008 23:04:19 +0000 (00:04 +0100)]
[slam] Add Scalable Local Area Multicast (SLAM) protocol support

Tested against the mini-slamd server located in contrib/mini-slamd
with a single client, on a lossy network.

13 years ago[udp] Verify local socket address (if specified) for UDP sockets
Michael Brown [Mon, 9 Jun 2008 21:56:48 +0000 (22:56 +0100)]
[udp] Verify local socket address (if specified) for UDP sockets

UDP sockets can be used for multicast, at which point it becomes
plausible that we could receive packets that aren't destined for us
but that still match on a port number.

13 years agoAdded support for SET_ADDRESS transaction. Device successfully accepts new
Balaji Rao [Mon, 9 Jun 2008 13:05:33 +0000 (18:35 +0530)]
Added support for SET_ADDRESS transaction. Device successfully accepts new
address as verified by calling GET_DESCRIPTOR on the new device address.

13 years ago[ELF] Add ability to boot ELF images generated by wraplinux and mkelfImage
Michael Brown [Mon, 9 Jun 2008 12:11:46 +0000 (13:11 +0100)]
[ELF] Add ability to boot ELF images generated by wraplinux and mkelfImage

Delete ELF as a generic image type.  The method for invoking an
ELF-based image (as well as any tables that must be set up to allow it
to boot) will always depend on the specific architecture.  core/elf.c
now only provides the elf_load() function, to avoid duplicating
functionality between ELF-based image types.

Add arch/i386/image/elfboot.c, to handle the generic case of 32-bit
x86 ELF images.  We don't currently set up any multiboot tables, ELF
notes, etc.  This seems to be sufficient for loading kernels generated
using both wraplinux and coreboot's mkelfImage.

Note that while Etherboot 5.4 allowed ELF images to return, we don't.
There is no callback mechanism for the loaded image to shut down gPXE,
which means that we have to shut down before invoking the image.  This
means that we lose device state, protection against being trampled on,
etc.  It is not safe to continue afterwards.

13 years ago[Makefile] Add $(BIN)/undionly.kpxe as default build target
Marty Connor [Mon, 9 Jun 2008 12:44:11 +0000 (08:44 -0400)]
[Makefile] Add $(BIN)/undionly.kpxe as default build target

13 years agoWrote macros to use linker table mechanism for searching for usb drivers. It
Balaji Rao [Mon, 9 Jun 2008 06:29:52 +0000 (11:59 +0530)]
Wrote macros to use linker table mechanism for searching for usb drivers. It
does not work yet.

A network driver for dm9601 is also created to test the driver/device
probing mechanism.

13 years ago[USB] Some minor fixes to enable successful completion of Control transactions. The
Balaji Rao [Sun, 8 Jun 2008 20:23:39 +0000 (01:53 +0530)]
[USB] Some minor fixes to enable successful completion of Control transactions. The
device descriptor can be now retreived from the device. This enables us to
fetch the vendor:product from the device.

13 years agoSome minox fixes. Added debugging routines for dumping TD, QH, UHCI and PORT
Balaji Rao [Sun, 8 Jun 2008 06:25:18 +0000 (11:55 +0530)]
Some minox fixes. Added debugging routines for dumping TD, QH, UHCI and PORT
status registers.

The Host Controller begins execution of the schedule. TDs are ending up in
a CRC/Timeout error though.

13 years ago[Makefile] Add "+" to end of version string for git-generated images
Marty Connor [Fri, 6 Jun 2008 20:40:16 +0000 (16:40 -0400)]
[Makefile] Add "+" to end of version string for git-generated images

This "+" should be removed when a tarball release is done.

13 years agoCleaned up the code.Changed printfs into DBGs, created errfile defenitions etc.
Balaji Rao [Fri, 6 Jun 2008 18:21:52 +0000 (23:51 +0530)]
Cleaned up the code.Changed printfs into DBGs, created errfile defenitions etc.

13 years ago[Makefile] Use .PRECIOUS instead of .SECONDARY for bin/%.tmp targets
Michael Brown [Fri, 6 Jun 2008 13:25:25 +0000 (14:25 +0100)]
[Makefile] Use .PRECIOUS instead of .SECONDARY for bin/%.tmp targets

Revert "Use .SECONDARY instead of .PRECIOUS for bin/%.tmp targets."

This reverts commit de29e5a39c5ae0ca91b61eaa139a277943dfc7fc.

.SECONDARY doesn't seem to work properly with the target patterns of
implicit rules.  In particular, a "make clean ; make bin/rtl8139.dsk"
will correctly leave the bin/rtl8139.dsk.tmp file present when .PRECIOUS
is used, but not when .SECONDARY is used.

This is slightly irritating since we don't want the
"do-not-delete-if-interrupted" semantics of .PRECIOUS, but it seems to be
the best compromise.

13 years agoBasic support for transactions in place. Only control type
Balaji Rao [Fri, 6 Jun 2008 11:54:54 +0000 (17:24 +0530)]
Basic support for transactions in place. Only control type
supported at the moment. Added wrappers to fetch descriptors from
the device.

It is still buggy. The code compiles, but does not work as expected.

13 years ago[DHCP] Add "dhcp-server" setting to help end-user diagnostics
Michael Brown [Thu, 5 Jun 2008 14:43:34 +0000 (15:43 +0100)]
[DHCP] Add "dhcp-server" setting to help end-user diagnostics

13 years ago[GDB] Test suite for the GDB stub
Stefan Hajnoczi [Mon, 2 Jun 2008 16:51:43 +0000 (17:51 +0100)]
[GDB] Test suite for the GDB stub

13 years ago[GDB] Add GDB stub for remote debugging
Stefan Hajnoczi [Wed, 4 Jun 2008 20:09:59 +0000 (21:09 +0100)]
[GDB] Add GDB stub for remote debugging

See http://etherboot.org/wiki/dev/gdbstub for documentation.

13 years ago[Serial] Split serial console from serial driver
Stefan Hajnoczi [Wed, 4 Jun 2008 20:00:46 +0000 (21:00 +0100)]
[Serial] Split serial console from serial driver

13 years ago[util] config-local.h to avoid accidental commits
Stefan Hajnoczi [Wed, 4 Jun 2008 19:56:20 +0000 (20:56 +0100)]
[util] config-local.h to avoid accidental commits

During development it is often handy to change the config.h options from
their defaults, for example to enable debugging features.

To prevent accidental commits of debugging config.h changes, mdc
suggested having a config-local.h that is excluded from source control.
This file acts as a temporary config.h and can override any of the
defaults.

This commit is an attempt to implement the config-local.h feature.

The config.h file now has the following as its last line:
/* @TRYSOURCE config-local.h */

The @TRYSOURCE directive causes config-local.h to be included at that
point in the file.  If config-local.h does not exist, no error will be
printed and parsing will continue as normal.  Therefore, mkconfig.pl is
"trying" to "source" config-local.h.

13 years ago[GDBSYM] Remove unused gdbsym.c
Stefan Hajnoczi [Wed, 4 Jun 2008 19:52:38 +0000 (20:52 +0100)]
[GDBSYM] Remove unused gdbsym.c

The GDBSYM config.h option was an attempt at QEMU GDB debugging.  I have
removed the code since it is unused and may confuse people wanting to
use the GDB stub.

13 years ago[TCP] Avoid shrinking TCP window
Michael Brown [Wed, 4 Jun 2008 23:28:17 +0000 (00:28 +0100)]
[TCP] Avoid shrinking TCP window

Maintain state for the advertised window length, and only ever increase
it (instead of calculating it afresh on each transmit).  This avoids
triggering "treason uncloaked" messages on Linux peers.

Respond to zero-length TCP keepalives (i.e. empty data packets
transmitted outside the window).  Even if the peer wouldn't otherwise
expect an ACK (because its packet consumed no sequence space), force an
ACK if it was outside the window.

We don't yet generate TCP keepalives.  It could be done, but it's unclear
what benefit this would have.  (Linux, for example, doesn't start sending
keepalives until the connection has been idle for two hours.)

13 years ago[embed] Add missing register_image() to image/embedded.c
Michael Brown [Tue, 3 Jun 2008 23:02:23 +0000 (00:02 +0100)]
[embed] Add missing register_image() to image/embedded.c

When the embedded image is a script, the unregister_image() performed by
image/script.c corrupts memory, since image/embedded.c omitted the call
to register_image().

This is the first bug fixed using Stefan Hajnoczi's gdb stub for gPXE.

13 years ago[iSCSI] Produce meaningful errors on login failure
Michael Brown [Tue, 3 Jun 2008 22:46:36 +0000 (23:46 +0100)]
[iSCSI] Produce meaningful errors on login failure

Return the most appropriate of EACCES, EPERM, ENODEV, ENOTSUP, EIO or
EINVAL depending on the exact error returned by the target, rather than
just always returning EPERM.

Also, ensure that error strings exist for these errors.

13 years agoWrote a PCI driver for UHCI USB host controller. Number of
Balaji Rao [Tue, 27 May 2008 21:02:34 +0000 (02:32 +0530)]
Wrote a PCI driver for UHCI USB host controller. Number of
ports detected correctly.

13 years ago[Makefile] Remove obsolete SRCDIRS
Michael Brown [Fri, 23 May 2008 01:35:20 +0000 (02:35 +0100)]
[Makefile] Remove obsolete SRCDIRS

13 years ago[prefix] Prompt for entering gPXE shell during POST
Michael Brown [Thu, 22 May 2008 14:14:33 +0000 (15:14 +0100)]
[prefix] Prompt for entering gPXE shell during POST

The ROM prefix now prompts the user to enter the gPXE shell during POST;
this allows for configuring gPXE without needing to attempt to boot from
it.  (It also slows down system boot by three seconds per gPXE ROM, but
hey.)

This is apparently a certain OEM's requirement for option ROMs.

13 years ago[prefix] Add PCI bus:dev.fn to ROM product string
Michael Brown [Wed, 21 May 2008 17:43:58 +0000 (18:43 +0100)]
[prefix] Add PCI bus:dev.fn to ROM product string

This allows multiple gPXE ROMs in a system to be disambiguated at boot
time; the PCI ID will show up in the boot menu for a BBS-compliant BIOS.

13 years ago[Contribs] Fix multi-line POSIX errno definitions.
Stefan Hajnoczi [Tue, 20 May 2008 18:06:56 +0000 (19:06 +0100)]
[Contribs] Fix multi-line POSIX errno definitions.

13 years ago[Contribs] Fix parsing bug in errcode.py
Stefan Hajnoczi [Sun, 18 May 2008 10:37:18 +0000 (11:37 +0100)]
[Contribs] Fix parsing bug in errcode.py

Make sure parser doesn't choke on line with space at end.

13 years ago[Contribs] Add simple IRC bot for looking up error codes.
Stefan Hajnoczi [Sat, 10 May 2008 17:42:29 +0000 (18:42 +0100)]
[Contribs] Add simple IRC bot for looking up error codes.

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 <stefanha@gmail.com>

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 <dancab@utfpr.edu.br>

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 <viswa.krish@gmail.com>

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 <alessandro.iurlano@gmail.com> 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
128).

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
register_ibdev().

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
  DHCPOFFER and a ProxyDHCPOFFER.

  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