Andrew Schran [Thu, 24 Jul 2008 18:59:12 +0000 (19:59 +0100)]
[cmdline] Added configurable shell banner timeout
This change allows the time for which shell banners are displayed to
be configured in the config.h file. The ability to access the shell
can also be effectively disabled by setting this timeout to zero.
Andrew Schran [Thu, 24 Jul 2008 18:55:53 +0000 (19:55 +0100)]
[tg3] Added support for tg3-5754.
In tg3_chip_reset(), the PCI_EXPRESS change is taken from the Linux
tg3 driver. I am not sure what exactly it does (it is not documented
in the Linux driver), but it is necessary for the NIC to work
correctly.
Michael Brown [Thu, 24 Jul 2008 18:45:35 +0000 (19:45 +0100)]
[makefile] Suppress "No such file or directory" warnings at start of build
Use "-include" rather than "include" for the generated Makefile
fragments, in order to suppress the long list of warnings that
otherwise appears at the start of a clean build.
Contributed by Edward Waugh <ewaugh@netxen.com>
Michael Brown [Thu, 24 Jul 2008 18:40:10 +0000 (19:40 +0100)]
[phantom] Add new board type
Michael Brown [Thu, 17 Jul 2008 16:45:17 +0000 (17:45 +0100)]
[iSCSI] Support Windows Server 2008 direct iSCSI installation
Add yet another ugly hack to iscsiboot.c, this time to allow the user to
inhibit the shutdown/removal of the iSCSI INT13 device (and the network
devices, since they are required for the iSCSI device to function).
On the plus side, the fact that shutdown() now takes flags to
differentiate between shutdown-for-exit and shutdown-for-boot means that
another ugly hack (to allow returning via the PXE stack on BIOSes that
have broken INT 18 calls) will be easier.
I feel dirty.
Michael Brown [Thu, 17 Jul 2008 14:45:40 +0000 (15:45 +0100)]
[phantom] Guard against partially-written status descriptors
Conjecture: The hardware issues 64-bit DMA writes of status descriptors,
which some PCI bridges seem to split into two 32-bit writes in reverse
order (i.e. dword 1 first). This means that we sometimes observe a
partial status descriptor. Add an explicit check to ensure that the
descriptor is complete before processing it.
Also ensure that the RDS consumer counter is incremented only when we
know that we have actually consumed an RX descriptor.
Michael Brown [Tue, 15 Jul 2008 22:19:59 +0000 (23:19 +0100)]
[int13] Pairwise swap drive numbers, instead of shifting all drive numbers
Shifting all INT13 drive numbers causes problems on systems that use a
sparse drive number space (e.g. qemu BIOS, which uses 0xe0 for the CD-ROM
drive).
The strategy now is:
Each drive is assigned a "natural" drive number, being the next
available drive number in the system (based on the BIOS drive count).
Each drive is accessed using its specified drive number. If the
specified drive number is -1, the natural drive number will be used.
Accesses to the specified drive number will be delivered to the
emulated drive, masking out any preexisting drive using this number.
Accesses to the natural drive number, if different, will be remapped to
the masked-out drive.
The overall upshot is that, for examples:
System has no drives. Emulated INT13 drive gets natural number 0x80
and specified number 0x80. Accesses to drive 0x80 go to the emulated
drive, and there is no remapping.
System has one drive. Emulated INT13 drive gets natural number 0x81
and specified number 0x80. Accesses to drive 0x80 go to the emulated
drive. Accesses to drive 0x81 get remapped to the original drive 0x80.
Michael Brown [Thu, 10 Jul 2008 03:21:10 +0000 (04:21 +0100)]
[udp] Avoid reusing auto-allocated ports after connection close.
This duplicates a fix made to tcp.c in commit
d5735c631cf26d8e1bcf7b5e635623b52d6b48aa.
Michael Brown [Thu, 10 Jul 2008 03:11:09 +0000 (04:11 +0100)]
[dhcp] Verify DHCP server source port
Verifying server ID and DHCP transaction ID is insufficient to
differentiate between DHCPACK and ProxyDHCPACK when the DHCP server and
Proxy DHCP server are the same machine.
Andrew Schran [Thu, 10 Jul 2008 00:19:08 +0000 (01:19 +0100)]
[forcedeth] Add support for PCI ID 10de:0373
Michael Brown [Tue, 8 Jul 2008 23:53:03 +0000 (00:53 +0100)]
[hermon] Add support for MT26418 device
PCI ID supplied (and tested) by Frederic
Temporelli <frederic.temporelli@bull.net>
Michael Brown [Tue, 8 Jul 2008 21:37:36 +0000 (22:37 +0100)]
[phantom] Remove warning relating to now-fixed firmware bug
Michael Brown [Tue, 8 Jul 2008 21:36:07 +0000 (22:36 +0100)]
[phantom] Add NetXen dual copyright
Michael Brown [Tue, 8 Jul 2008 19:59:33 +0000 (20:59 +0100)]
[phantom] Initialise RCVPEG before reading MAC addresses
Michael Brown [Tue, 8 Jul 2008 02:50:44 +0000 (03:50 +0100)]
[image] Fail "imgexec"/"boot" if the image to execute is ambiguous
If there is more than one loaded image, refuse to automatically select
the image to execute. There are at least two possible cases, with
different "correct" answers:
1. User loads image A by mistake, then loads image B and types "boot".
User wants to execute image B.
2. User loads image A, then loads image B (which patches image A), then
types "boot". User wants to execute image A.
If a user actually wants to load multiple images, they must explicitly
specify which image is to be executed.
Michael Brown [Tue, 8 Jul 2008 02:15:02 +0000 (03:15 +0100)]
[image] Revert "clear LOADED flag" patch
Clearing the LOADED flag actually prevents users from doing clever things
such as loading an image, then loading a patch image, then executing the
first image. (image_exec() checks for IMAGE_LOADED, so this sequence of
operations will fail if the LOADED flag gets cleared.)
This reverts commit
14c080020fb37cb34fe74213393f47bd2ad8b9bc.
Michael Brown [Tue, 8 Jul 2008 02:03:48 +0000 (03:03 +0100)]
[image] Clear LOADED flag on all other images when loading a new image
Loading an image may overwrite part or all of any previously-loaded
images, so we should clear the LOADED flag for all images prior to
attempting to load a new image.
Michael Brown [Tue, 8 Jul 2008 01:10:18 +0000 (02:10 +0100)]
[settings] Allow "config" command to access root settings block
Michael Brown [Tue, 8 Jul 2008 00:30:11 +0000 (01:30 +0100)]
[bzimage] Kill off the initrd image type
We can just treat all non-kernel images as initrds, which matches our
behaviour for multiboot kernels. This allows us to eliminate initrd as
an image type, and treat the "initrd" command as just another synonym for
"imgfetch".
Michael Brown [Tue, 8 Jul 2008 00:13:59 +0000 (01:13 +0100)]
[dhcp] Allow DHCP non-option settings to be cleared
dhcppkt_store() is supposed to clear the setting if passed NULL for the
setting data. In the case of fixed-location fields (e.g. client IP
address), this requires setting the content of the field to all-zeros.
Michael Brown [Sat, 5 Jul 2008 02:38:14 +0000 (19:38 -0700)]
[phantom] Add support for NetXen Phantom NICs
Michael Brown [Wed, 2 Jul 2008 22:01:25 +0000 (15:01 -0700)]
[tftp] Strip the initial '/' to keep Windows TFTP servers happy.
Michael Brown [Tue, 1 Jul 2008 01:52:13 +0000 (18:52 -0700)]
[i386] Change semantics of __from_data16 and __from_text16
__from_data16 and __from_text16 now take a pointer to a
.data16/.text16 variable, and return the real-mode offset within the
appropriate segment. This matches the use case for every occurrence
of these macros, and prevents potential future bugs such as that fixed
in commit d51d80f. (The bug arose essentially because "&pointer" is
still syntactically valid.)
Michael Brown [Tue, 1 Jul 2008 01:35:51 +0000 (18:35 -0700)]
[pxe] Fix a typo in PXENV_GET_CACHED_INFO that broke Altiris
__from_data16 takes the value pointed to, rather than the pointer
itself. This was silently causing gPXE to return a dud buffer pointer
when the caller did not supply a buffer for PXENV_GET_CACHED_INFO.
Michael Brown [Tue, 1 Jul 2008 00:56:37 +0000 (17:56 -0700)]
[dhcp] Verify server identifier on ProxyDHCPACKs
Perform the same test for a matching DHCP_SERVER_IDENTIFIER on
ProxyDHCPACKs as we do for DHCPACKs. Otherwise, a retransmitted
DHCPACK can end up being treated as the ProxyDHCPACK.
I have a vague and unsettling memory that this test was deliberately
omitted, but I can't remember why, and can't find anything in the VC
logs.
H. Peter Anvin [Mon, 30 Jun 2008 19:16:08 +0000 (12:16 -0700)]
[Config] remove src/Config
Remove src/Config as it has no more users, and conflicts with
src/config on case-deficient filesystems.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Mon, 30 Jun 2008 19:09:21 +0000 (12:09 -0700)]
[ns8390] Use stub files instead of src/Config
ns8390.c can produce four different drivers (one PCI, three ISA.) The
ISA driver requires setting a few macros; do that by setting defines
in stub files instead of using src/Config.
Currently, all the ISA drivers are broken (they were not enabled by
default), so #if 0 them out.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Stefan Hajnoczi [Mon, 30 Jun 2008 18:53:28 +0000 (19:53 +0100)]
[lkrnprefix] Make gPXE .lkrn images conform to the zImage 2.07 format
Stefan Hajnoczi [Mon, 30 Jun 2008 18:51:41 +0000 (19:51 +0100)]
[bzImage] Support loading zImage kernels
zImage kernels require the real-mode portion to be loaded at 9000:0000
rather than 1000:0000.
Stefan Hajnoczi [Mon, 16 Jun 2008 13:42:22 +0000 (14:42 +0100)]
[GDB] Provide functions to manually enter GDB stub.
Stefan Hajnoczi [Mon, 16 Jun 2008 12:18:20 +0000 (13:18 +0100)]
[GDB] Obey flow control when GDB connects.
Stefan Hajnoczi [Fri, 13 Jun 2008 19:11:41 +0000 (20:11 +0100)]
[GDB] Remove unused DR6 debug register variable
Stefan Hajnoczi [Fri, 13 Jun 2008 16:14:12 +0000 (17:14 +0100)]
[GDB] UDP clean up and add netdev refcnt
Stefan Hajnoczi [Fri, 13 Jun 2008 09:26:49 +0000 (10:26 +0100)]
[GDB] Zero-extend 16-bit segment registers
When the 16-bit segment registers are accessed using 32-bit instructions
the high order bytes are undefined on older CPUs. We now explicitly
zero the high order bytes when snapshotting the CPU state. This ensures
that the GDB stub reports consistent values for the segment registers.
Stefan Hajnoczi [Thu, 12 Jun 2008 17:19:55 +0000 (18:19 +0100)]
[GDB] Add copyright header for gdbmach.c
Stefan Hajnoczi [Thu, 12 Jun 2008 15:56:20 +0000 (16:56 +0100)]
[GDB] Add watch and rwatch hardware watchpoints
Stefan Hajnoczi [Wed, 11 Jun 2008 11:12:46 +0000 (12:12 +0100)]
[GDB] Remote debugging over UDP
This commit implements GDB over UDP. Using UDP is more complex than
serial and has required some restructuring.
The GDB stub is now built using one or both of GDBSERIAL and GDBUDP
config.h options.
To enter the debugger, execute the gPXE shell command:
gdbstub <transport> [<options>...]
Where <transport> is "serial" or "udp". For "udp", the name of a
configured network device is required:
gdbstub udp net0
The GDB stub listens on UDP port 43770 by default.
Stefan Hajnoczi [Thu, 5 Jun 2008 19:07:23 +0000 (20:07 +0100)]
[GDB] Atomic read/write for device memory
Stefan Hajnoczi [Thu, 5 Jun 2008 14:31:48 +0000 (15:31 +0100)]
[GDB] Handle kill and detach packets.
This commit also includes a test to ensure that single stepping works,
since continue, kill, detach, and single step all share code.
Michael Brown [Sat, 28 Jun 2008 22:18:11 +0000 (23:18 +0100)]
[romprefix] Fix PMM detection start address
Commit fd0aef9 introduced a typo that caused PMM detection to start at
paragraph 0xe00 rather than 0xe000. (Detection would still work, since it
would scan until it ran out of base memory, but it would end up scanning
an unnecessarily large portion of base memory.)
Spotted by Sebastian Herbszt <herbszt@gmx.de>.
Michael Brown [Tue, 24 Jun 2008 18:32:21 +0000 (11:32 -0700)]
[nvs] Add support for ST M25P32 SPI flash devices
Michael Brown [Fri, 27 Jun 2008 21:35:26 +0000 (22:35 +0100)]
[misc] Fix building on OpenBSD
OpenBSD throws compiler warnings that we can't reproduce on Linux, for
some reason.
Original patch from Dewey Hylton <dewey@hyltown.com>.
H. Peter Anvin [Fri, 27 Jun 2008 21:29:13 +0000 (22:29 +0100)]
[a20] Send a null command to the KBC after changing A20
Send a null command, specifically "pulse outputs" with no outputs
selected, to the KBC after changing A20. This was apparently done by DOS,
presumably as a synchronization hack, and the authors of the UHCI spec
thought it was inherent. Therefore, there are systems out there (e.g. HP
DL360 G5) which will stop responsing to "legacy USB" unless they see the
null command, 0xFF, written to port 0x64 at the end of the A20 toggling
sequence.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Michael Brown [Fri, 20 Jun 2008 10:40:08 +0000 (11:40 +0100)]
[libc] Remove unused le32_to_cpup(x) and cpu_to_le16p() macros
If we ever need these macros, they should be defined in
include/{big,little}_bswap.h, and the whole family should be defined.
Steven Walter [Tue, 17 Jun 2008 21:37:43 +0000 (17:37 -0400)]
[tg3] Recognize the BCM5789
Add an entry to tg3_nics for the BCM5789
Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
Michael Brown [Fri, 27 Jun 2008 20:50:18 +0000 (21:50 +0100)]
[cmdline] Fix image command-line construction for zero-length argument lists
This fixes a bug introduced in commit 4c85017.
Michael Brown [Tue, 17 Jun 2008 23:43:58 +0000 (00:43 +0100)]
[script] Remove arbitrary limit on script line lengths
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>
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>
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
Michael Brown [Thu, 12 Jun 2008 12:15:53 +0000 (13:15 +0100)]
[cleanup] Remove long-obsolete gpxe/async.h header file
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.
Michael Brown [Thu, 12 Jun 2008 01:12:10 +0000 (02:12 +0100)]
[cmdline] Remove arbitrary limit on the length of image command lines
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>
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Marty Connor [Mon, 9 Jun 2008 12:44:11 +0000 (08:44 -0400)]
[Makefile] Add $(BIN)/undionly.kpxe as default build target
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.
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.
Michael Brown [Thu, 5 Jun 2008 14:43:34 +0000 (15:43 +0100)]
[DHCP] Add "dhcp-server" setting to help end-user diagnostics
Stefan Hajnoczi [Mon, 2 Jun 2008 16:51:43 +0000 (17:51 +0100)]
[GDB] Test suite for the GDB stub
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.
Stefan Hajnoczi [Wed, 4 Jun 2008 20:00:46 +0000 (21:00 +0100)]
[Serial] Split serial console from serial driver
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.
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.
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.)
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.
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.
Michael Brown [Fri, 23 May 2008 01:35:20 +0000 (02:35 +0100)]
[Makefile] Remove obsolete SRCDIRS
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.
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.
Stefan Hajnoczi [Tue, 20 May 2008 18:06:56 +0000 (19:06 +0100)]
[Contribs] Fix multi-line POSIX errno definitions.
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.
Stefan Hajnoczi [Sat, 10 May 2008 17:42:29 +0000 (18:42 +0100)]
[Contribs] Add simple IRC bot for looking up error codes.
Stefan Hajnoczi [Sat, 10 May 2008 14:06:21 +0000 (15:06 +0100)]
[Contribs] Add README, license text, and invert error code dictionaries.
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.
Stefan Hajnoczi [Sat, 10 May 2008 11:57:13 +0000 (12:57 +0100)]
[Contribs] Add command-line utility for looking up gPXE error codes.
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.
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>
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).
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
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.
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.
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.
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.
Michael Brown [Tue, 22 Apr 2008 01:15:36 +0000 (02:15 +0100)]
[Infiniband] Fix event queue doorbell ringing on Arbel
Michael Brown [Tue, 22 Apr 2008 00:37:00 +0000 (01:37 +0100)]
[Infiniband] Add multiport support for Arbel cards
Michael Brown [Mon, 21 Apr 2008 12:23:11 +0000 (13:23 +0100)]
[Infiniband] Move event-queue process from driver to Infiniband core
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).
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.