people/mcb30/gpxe.git
13 years agoAdded "priority" and "root-path" options
Michael Brown [Fri, 8 Dec 2006 16:30:14 +0000 (16:30 +0000)]
Added "priority" and "root-path" options

13 years agoAdd placeholder ibft.h
Michael Brown [Fri, 8 Dec 2006 16:16:21 +0000 (16:16 +0000)]
Add placeholder ibft.h

13 years agoUse root-path option (as per RFC 4173) rather than filename option to
Michael Brown [Fri, 8 Dec 2006 15:53:49 +0000 (15:53 +0000)]
Use root-path option (as per RFC 4173) rather than filename option to
determine iSCSI boot parameters.

13 years agoAlso request root-path.
Michael Brown [Fri, 8 Dec 2006 15:49:46 +0000 (15:49 +0000)]
Also request root-path.

13 years agoIncluding the final (char *)NULL is the responsibility of the caller
Michael Brown [Fri, 8 Dec 2006 09:15:12 +0000 (09:15 +0000)]
Including the final (char *)NULL is the responsibility of the caller
of execl().

13 years agoD'oh d'oh d'oh d'oh d'oh d'oh d'oh d'oh d'oh
Michael Brown [Fri, 8 Dec 2006 03:07:15 +0000 (03:07 +0000)]
D'oh d'oh d'oh d'oh d'oh d'oh d'oh d'oh d'oh

13 years agoAdded "exit" back in as a standardised command.
Michael Brown [Fri, 8 Dec 2006 01:40:06 +0000 (01:40 +0000)]
Added "exit" back in as a standardised command.

13 years agocmdlinelib.c now calls system() rather than doing its own tokenisation
Michael Brown [Fri, 8 Dec 2006 01:26:11 +0000 (01:26 +0000)]
cmdlinelib.c now calls system() rather than doing its own tokenisation
(which was extremely heavy on calls to malloc()).

Moved include/command.h to include/gpxe/command.h, since it's
gPXE-specific.

13 years agoAdded execv() and system().
Michael Brown [Fri, 8 Dec 2006 01:23:11 +0000 (01:23 +0000)]
Added execv() and system().

13 years agoAdded missing include of stdint.h
Michael Brown [Fri, 8 Dec 2006 01:21:13 +0000 (01:21 +0000)]
Added missing include of stdint.h

13 years agoAdded strdup()
Michael Brown [Fri, 8 Dec 2006 00:34:47 +0000 (00:34 +0000)]
Added strdup()

13 years agoAdded missing prototype
Michael Brown [Fri, 8 Dec 2006 00:21:08 +0000 (00:21 +0000)]
Added missing prototype

13 years agoAdded a functional version of getopt() and getopt_long(), ready for use
Michael Brown [Thu, 7 Dec 2006 03:54:57 +0000 (03:54 +0000)]
Added a functional version of getopt() and getopt_long(), ready for use
in our commands.

14 years agoAdd support for non-volatile stored options in the RTL8139 EEPROM.
Michael Brown [Wed, 6 Dec 2006 20:45:44 +0000 (20:45 +0000)]
Add support for non-volatile stored options in the RTL8139 EEPROM.

14 years agoinet_aton() has a non-traditional return value
Michael Brown [Wed, 6 Dec 2006 20:44:29 +0000 (20:44 +0000)]
inet_aton() has a non-traditional return value

14 years agoA cleaner method of handling login redirection; just use the existing
Michael Brown [Wed, 6 Dec 2006 19:53:56 +0000 (19:53 +0000)]
A cleaner method of handling login redirection; just use the existing
reconnection mechanism.  This avoids the problems of trying to reuse
the TCP connection structure before the old connection has cleanly exited.

14 years agoAdded write support for three-wire devices (e.g. the RTL8139 EEPROM)
Michael Brown [Wed, 6 Dec 2006 19:51:58 +0000 (19:51 +0000)]
Added write support for three-wire devices (e.g. the RTL8139 EEPROM)

14 years agoVerify data after writing
Michael Brown [Wed, 6 Dec 2006 18:51:31 +0000 (18:51 +0000)]
Verify data after writing

14 years agoWork around another confused-by-RST bug
Michael Brown [Wed, 6 Dec 2006 18:09:33 +0000 (18:09 +0000)]
Work around another confused-by-RST bug

14 years agoSupport PXE and iSCSI by default
Michael Brown [Tue, 5 Dec 2006 23:26:07 +0000 (23:26 +0000)]
Support PXE and iSCSI by default

14 years agoWork around another instance of the port re-use bug.
Michael Brown [Tue, 5 Dec 2006 23:15:35 +0000 (23:15 +0000)]
Work around another instance of the port re-use bug.

14 years agoTweaked retry messages
Michael Brown [Tue, 5 Dec 2006 23:12:54 +0000 (23:12 +0000)]
Tweaked retry messages

14 years agoAdded debug messages
Michael Brown [Tue, 5 Dec 2006 22:53:49 +0000 (22:53 +0000)]
Added debug messages

14 years agoCall closed() method only when the connection is genuinely in the
Michael Brown [Tue, 5 Dec 2006 22:53:28 +0000 (22:53 +0000)]
Call closed() method only when the connection is genuinely in the
TCP_CLOSED state (i.e. after the final FIN/ACK exchange), and has been
removed from the list of TCP connections.

14 years agoEnsure that tcp_rx() always frees its received packet buffer.
Michael Brown [Tue, 5 Dec 2006 21:23:23 +0000 (21:23 +0000)]
Ensure that tcp_rx() always frees its received packet buffer.

14 years agoKilled off spurious <stdio.h> inclusion
Michael Brown [Tue, 5 Dec 2006 21:16:52 +0000 (21:16 +0000)]
Killed off spurious <stdio.h> inclusion

14 years agoAvoid calling NULL methods!
Michael Brown [Tue, 5 Dec 2006 21:09:37 +0000 (21:09 +0000)]
Avoid calling NULL methods!

14 years agoUpdate ftp.c to work with Nikhil's TCP stack.
Michael Brown [Tue, 5 Dec 2006 19:07:47 +0000 (19:07 +0000)]
Update ftp.c to work with Nikhil's TCP stack.

Remove the now-totally-obsolete sockaddr_in field from tcp.h.

14 years agoThe VPD engine is broken and can't actually handle placing VPD
Michael Brown [Tue, 5 Dec 2006 17:56:13 +0000 (17:56 +0000)]
The VPD engine is broken and can't actually handle placing VPD
anywhere other than offset 0 within the EEPROM, so we have to put our
settings at 0x100 instead.

14 years agoAdjust EEPROM/flash detection to fit expected manufacturing practice.
Michael Brown [Tue, 5 Dec 2006 16:00:06 +0000 (16:00 +0000)]
Adjust EEPROM/flash detection to fit expected manufacturing practice.

14 years agoAdded options listed in
Michael Brown [Tue, 5 Dec 2006 15:40:28 +0000 (15:40 +0000)]
Added options listed in
http://www.microsoft.com/whdc/winlogo/hwrequirements.mspx as required
for iSCSI boot.  Note that options 204-206 are listed in the document
but don't seem to be defined anywhere on the web.

14 years agoTidy up some more output. The command-line code needs some severe
Michael Brown [Tue, 5 Dec 2006 10:27:16 +0000 (10:27 +0000)]
Tidy up some more output.  The command-line code needs some severe
overhauling, but this is not the time to do it.

14 years agoSlightly tidied up console messages.
Michael Brown [Tue, 5 Dec 2006 10:14:58 +0000 (10:14 +0000)]
Slightly tidied up console messages.

14 years agoChange some debugging messages to use DBG()
Michael Brown [Tue, 5 Dec 2006 10:01:00 +0000 (10:01 +0000)]
Change some debugging messages to use DBG()

14 years agoAvoid draining the keyboard buffer during gateA20_set(). It shouldn't
Michael Brown [Tue, 5 Dec 2006 09:45:39 +0000 (09:45 +0000)]
Avoid draining the keyboard buffer during gateA20_set().  It shouldn't
technically be necessary, because the "enable A20" command requires
only that the keyboard controller is ready to accept input (i.e. that
its input buffer is empty), and shouldn't also require that the
keyboard is ready to send output (i.e. that its output buffer is also
empty).  See http://www.smsc.com/main/tools/io-bios/42i.pdf section
3.1 ("Command Invocation") for a justification.

gateA20_set() is called on every real-mode transition (in case some
idiot piece of external code such as Intel's PXE stack decided it
would be fun to re-disable A20), so draining the keyboard buffer means
that we end up losing keypresses on some systems.  In particular, this
makes typing at the command line almost impossible, and causes
Etherboot to ignore Ctrl-Alt-Del.

We should really implement a gateA20_test() function to verify that
gate A20 has been correctly enabled, and think about adding other
commonly-used methods such as Fast Gate A20.

14 years agoTied NVO commands into the human-interactable settings code that I
Michael Brown [Tue, 5 Dec 2006 02:40:03 +0000 (02:40 +0000)]
Tied NVO commands into the human-interactable settings code that I
completely forgot I'd written ages ago.

14 years agoHandle TargetAddress
Michael Brown [Tue, 5 Dec 2006 01:41:32 +0000 (01:41 +0000)]
Handle TargetAddress

14 years agoHandle strings as complete units, instead of a byte at a time.
Michael Brown [Tue, 5 Dec 2006 01:08:56 +0000 (01:08 +0000)]
Handle strings as complete units, instead of a byte at a time.

14 years agoAdd iscsi_rx_buffered_data() and supporting infrastructure.
Michael Brown [Tue, 5 Dec 2006 00:39:05 +0000 (00:39 +0000)]
Add iscsi_rx_buffered_data() and supporting infrastructure.

14 years agoAdded more debug messages
Michael Brown [Mon, 4 Dec 2006 23:47:44 +0000 (23:47 +0000)]
Added more debug messages

14 years agoAdded quick and dirty commands for testing the new NVO code.
Michael Brown [Mon, 4 Dec 2006 23:40:35 +0000 (23:40 +0000)]
Added quick and dirty commands for testing the new NVO code.

14 years agoAdded debug statements
Michael Brown [Mon, 4 Dec 2006 23:20:56 +0000 (23:20 +0000)]
Added debug statements

14 years agoAdded nvs_write(). This shares a lot of code in common with nvs_read();
Michael Brown [Mon, 4 Dec 2006 22:06:54 +0000 (22:06 +0000)]
Added nvs_write().  This shares a lot of code in common with nvs_read();
this can probably be optimised down quite a lot.

14 years agoAdded nvo_save()
Michael Brown [Mon, 4 Dec 2006 22:04:10 +0000 (22:04 +0000)]
Added nvo_save()

14 years agoAdd the concept of a fragment list for non-volatile stored options.
Michael Brown [Mon, 4 Dec 2006 21:46:13 +0000 (21:46 +0000)]
Add the concept of a fragment list for non-volatile stored options.

14 years agoFixed two logic errors that were cancelling each other out.
Michael Brown [Mon, 4 Dec 2006 21:12:52 +0000 (21:12 +0000)]
Fixed two logic errors that were cancelling each other out.

14 years agoMigrated etherfabric driver to using generic SPI layer.
Michael Brown [Mon, 4 Dec 2006 20:47:51 +0000 (20:47 +0000)]
Migrated etherfabric driver to using generic SPI layer.

14 years agoAdded the generic block-splitting code to nvs.c
Michael Brown [Mon, 4 Dec 2006 19:06:07 +0000 (19:06 +0000)]
Added the generic block-splitting code to nvs.c

14 years agoAdded generic SPI protocol handler with read and write support.
Michael Brown [Mon, 4 Dec 2006 18:32:55 +0000 (18:32 +0000)]
Added generic SPI protocol handler with read and write support.

14 years agoAbstracted out part of the concept of an SPI device to a generalised NVS
Michael Brown [Mon, 4 Dec 2006 18:23:06 +0000 (18:23 +0000)]
Abstracted out part of the concept of an SPI device to a generalised NVS
device.

Separated the mechanisms of non-volatile storage access and non-volatile
stored options.

14 years agoChanged length parameter in SPI methods to be a byte length, rather than
Michael Brown [Mon, 4 Dec 2006 16:09:59 +0000 (16:09 +0000)]
Changed length parameter in SPI methods to be a byte length, rather than
a word length.

14 years agoGeneralised the SPI abstraction layer to also be able to handle interfaces
Michael Brown [Mon, 4 Dec 2006 15:36:51 +0000 (15:36 +0000)]
Generalised the SPI abstraction layer to also be able to handle interfaces
that don't provide the full flexibility of a bit-bashing interface.

Temporarily hacked rtl8139.c to use the new interface.

14 years agoForce syntax-checking on assertions even in non-asserting builds.
Michael Brown [Mon, 4 Dec 2006 15:09:57 +0000 (15:09 +0000)]
Force syntax-checking on assertions even in non-asserting builds.

14 years agoMove ANSI C standard prototypes to stdlib.h; leave the gPXE-specific
Michael Brown [Sat, 2 Dec 2006 20:10:21 +0000 (20:10 +0000)]
Move ANSI C standard prototypes to stdlib.h; leave the gPXE-specific
function prototypes (e.g. malloc_dma()) in malloc.h.

14 years agoBasic non-volatile storage support
Michael Brown [Wed, 29 Nov 2006 02:41:08 +0000 (02:41 +0000)]
Basic non-volatile storage support

14 years agoMake the "drive number" option apply to iSCSI as well as AoE
Michael Brown [Wed, 29 Nov 2006 00:27:10 +0000 (00:27 +0000)]
Make the "drive number" option apply to iSCSI as well as AoE

14 years agoMerged changes from Solarflare
Michael Brown [Tue, 28 Nov 2006 13:25:23 +0000 (13:25 +0000)]
Merged changes from Solarflare

14 years agoCreate "username" and "password" DHCP options, ready for placing this
Michael Brown [Tue, 28 Nov 2006 02:14:20 +0000 (02:14 +0000)]
Create "username" and "password" DHCP options, ready for placing this
information in NVS.

14 years agoUpdated to use asynchronous operation model for iSCSI requests
Michael Brown [Tue, 28 Nov 2006 00:29:02 +0000 (00:29 +0000)]
Updated to use asynchronous operation model for iSCSI requests

Added CHAP authentication

14 years agoMarked memcmp/strcmp as "pure" functions, to allow gcc to optimise
Michael Brown [Mon, 27 Nov 2006 23:50:24 +0000 (23:50 +0000)]
Marked memcmp/strcmp as "pure" functions, to allow gcc to optimise
away code such as

  if ( strcmp ( some_string, "some_value" ) != 0 ) {
     DBG ( "Bad value received!" );
  }

14 years agoImplemented realloc(), and changed the semantics of malloc(0) to allow
Michael Brown [Fri, 24 Nov 2006 16:51:18 +0000 (16:51 +0000)]
Implemented realloc(), and changed the semantics of malloc(0) to allow
for realloc(0) being a valid way to free memory.

14 years agoFixed off-by-one error
Michael Brown [Wed, 22 Nov 2006 04:54:17 +0000 (04:54 +0000)]
Fixed off-by-one error

14 years agoAdded "name" field to digest algorithms
Michael Brown [Tue, 21 Nov 2006 16:14:50 +0000 (16:14 +0000)]
Added "name" field to digest algorithms

14 years agoAdded debug statements.
Michael Brown [Tue, 21 Nov 2006 16:14:17 +0000 (16:14 +0000)]
Added debug statements.

Don't crash when called on an uninitialised chap structure; this
allows us to avoid extra checks within iscsi.c to make sure that we
receive the CHAP_XXX keys in a sensible order.

14 years agoReduce from 157 to 123 bytes
Michael Brown [Tue, 21 Nov 2006 16:01:12 +0000 (16:01 +0000)]
Reduce from 157 to 123 bytes

14 years agoAdded generic CHAP layer, independent of iSCSI
Michael Brown [Tue, 21 Nov 2006 13:26:59 +0000 (13:26 +0000)]
Added generic CHAP layer, independent of iSCSI

14 years agoMade it temporarily possible to call MD5 routines directly from external
Michael Brown [Wed, 15 Nov 2006 04:22:22 +0000 (04:22 +0000)]
Made it temporarily possible to call MD5 routines directly from external
code, rather than going through the digest layer.

Removed a spurious line of constants.

14 years agoNote to self: do not write code late at night
Michael Brown [Wed, 15 Nov 2006 04:16:26 +0000 (04:16 +0000)]
Note to self: do not write code late at night

14 years agoMay as well add octal support to strtoul()
Michael Brown [Wed, 15 Nov 2006 02:57:24 +0000 (02:57 +0000)]
May as well add octal support to strtoul()

14 years agoFixed endp bug in strtoul()
Michael Brown [Wed, 15 Nov 2006 02:54:28 +0000 (02:54 +0000)]
Fixed endp bug in strtoul()

14 years agoExtend strtoul() to cope with hex as well as decimal. Doesn't cope
Michael Brown [Wed, 15 Nov 2006 02:52:06 +0000 (02:52 +0000)]
Extend strtoul() to cope with hex as well as decimal.  Doesn't cope
with octal yet, but we can probably live without that.

14 years agoSplit login into security negotation and operational parameter
Michael Brown [Tue, 3 Oct 2006 09:17:38 +0000 (09:17 +0000)]
Split login into security negotation and operational parameter
negotiation phases, to allow inclusion of CHAP authentication.

14 years agoInhibit compiler warnings on DBG() when building a non-debug object,
Michael Brown [Wed, 27 Sep 2006 11:09:56 +0000 (11:09 +0000)]
Inhibit compiler warnings on DBG() when building a non-debug object,
while retaining the format string checking.

14 years agoWe don't actually have a stdio.h header file. Our printf() functions are
Michael Brown [Wed, 27 Sep 2006 10:58:14 +0000 (10:58 +0000)]
We don't actually have a stdio.h header file.  Our printf() functions are
defined in vsprintf.h.  (This may change, since vsprintf.h is a
non-standard name, but for now it's the one to use.)

There should be no need to include vsprintf.h just for DBG() statements,
since include/compiler.h forces it in for a debug build anyway.

14 years agoadded stdio.h to includes for DBG compilation
Marty Connor [Wed, 27 Sep 2006 05:57:06 +0000 (05:57 +0000)]
added stdio.h to includes for DBG compilation

14 years agoinclude stdio.h to suppress printf warning, general warnings fixups
Marty Connor [Wed, 27 Sep 2006 04:04:55 +0000 (04:04 +0000)]
include stdio.h to suppress printf warning, general warnings fixups

14 years agoeth_ntoa and warnings cleanup
Marty Connor [Wed, 27 Sep 2006 03:05:21 +0000 (03:05 +0000)]
eth_ntoa and warnings cleanup

14 years agoeth_ntoa cleanup. still has warnings. needs work.
Marty Connor [Wed, 27 Sep 2006 03:00:21 +0000 (03:00 +0000)]
eth_ntoa cleanup.  still has warnings.  needs work.

14 years agoeth_ntoa and warnings cleanup
Marty Connor [Wed, 27 Sep 2006 02:18:07 +0000 (02:18 +0000)]
eth_ntoa and warnings cleanup

14 years agoeth_ntoa and warnings cleanup
Marty Connor [Wed, 27 Sep 2006 02:07:59 +0000 (02:07 +0000)]
eth_ntoa and warnings cleanup

14 years agocompilation warnings cleanup
Marty Connor [Tue, 26 Sep 2006 22:18:00 +0000 (22:18 +0000)]
compilation warnings cleanup

14 years agoeth_ntoa cleanup
Marty Connor [Tue, 26 Sep 2006 22:11:45 +0000 (22:11 +0000)]
eth_ntoa cleanup

14 years agowarnings cleanup (still gives lots of compilation warnings from unused functions...
Marty Connor [Tue, 26 Sep 2006 22:09:03 +0000 (22:09 +0000)]
warnings cleanup (still gives lots of compilation warnings from unused functions and missing legacy support)

14 years agowarnings cleanup
Marty Connor [Tue, 26 Sep 2006 22:04:33 +0000 (22:04 +0000)]
warnings cleanup

14 years agocompilation warnings cleanup
Marty Connor [Tue, 26 Sep 2006 21:58:08 +0000 (21:58 +0000)]
compilation warnings cleanup

14 years agoeth_ntoa and compilation warnings fixes
Marty Connor [Tue, 26 Sep 2006 21:33:12 +0000 (21:33 +0000)]
eth_ntoa and compilation warnings fixes

14 years agoeth_ntoa fixes
Marty Connor [Tue, 26 Sep 2006 21:06:29 +0000 (21:06 +0000)]
eth_ntoa fixes

14 years agoMinor fix
Michael Brown [Mon, 25 Sep 2006 14:41:54 +0000 (14:41 +0000)]
Minor fix

14 years agoeth_ntoa and warnings fixups, memcpy compilation fix
Marty Connor [Mon, 25 Sep 2006 09:06:50 +0000 (09:06 +0000)]
eth_ntoa and warnings fixups, memcpy compilation fix

14 years agoeth_ntoa and warnings fixups
Marty Connor [Mon, 25 Sep 2006 03:52:01 +0000 (03:52 +0000)]
eth_ntoa and warnings fixups

14 years agoeth_ntoa and warnings fixups
Marty Connor [Mon, 25 Sep 2006 03:21:25 +0000 (03:21 +0000)]
eth_ntoa and warnings fixups

14 years agoeth_ntoa and warnings fixups
Marty Connor [Mon, 25 Sep 2006 02:55:13 +0000 (02:55 +0000)]
eth_ntoa and warnings fixups

14 years agoeth_ntoa and warnings fixups
Marty Connor [Mon, 25 Sep 2006 02:47:50 +0000 (02:47 +0000)]
eth_ntoa and warnings fixups

14 years agoeth_ntoa and warnings fixups
Marty Connor [Mon, 25 Sep 2006 02:41:46 +0000 (02:41 +0000)]
eth_ntoa and warnings fixups

14 years agoeth_ntoa and warnings fixups
Marty Connor [Mon, 25 Sep 2006 02:18:11 +0000 (02:18 +0000)]
eth_ntoa and warnings fixups

14 years agoeth_ntoa and warnings fixups
Marty Connor [Mon, 25 Sep 2006 02:11:52 +0000 (02:11 +0000)]
eth_ntoa and warnings fixups

14 years agoeth_ntoa fixups
Marty Connor [Wed, 20 Sep 2006 00:20:37 +0000 (00:20 +0000)]
eth_ntoa fixups

14 years agoeth_ntoa fixups
Marty Connor [Wed, 20 Sep 2006 00:06:52 +0000 (00:06 +0000)]
eth_ntoa fixups

14 years agoeth_ntoa fixups
Marty Connor [Wed, 20 Sep 2006 00:00:44 +0000 (00:00 +0000)]
eth_ntoa fixups

14 years agoeth_ntoa fixups
Marty Connor [Tue, 19 Sep 2006 16:33:46 +0000 (16:33 +0000)]
eth_ntoa fixups