people/xl0/gpxe.git
14 years agoThe null crypto algorithm should at least copy data...
Michael Brown [Wed, 31 Jan 2007 03:42:07 +0000 (03:42 +0000)]
The null crypto algorithm should at least copy data...

14 years agoTidy up debug messages
Michael Brown [Wed, 31 Jan 2007 03:05:49 +0000 (03:05 +0000)]
Tidy up debug messages

14 years agoAdd insert_filter() function
Michael Brown [Wed, 31 Jan 2007 03:04:56 +0000 (03:04 +0000)]
Add insert_filter() function

14 years agoAdd null crypto algorithm
Michael Brown [Wed, 31 Jan 2007 03:04:31 +0000 (03:04 +0000)]
Add null crypto algorithm

14 years agoChanged to use the generic stream API.
Michael Brown [Wed, 31 Jan 2007 02:09:13 +0000 (02:09 +0000)]
Changed to use the generic stream API.

14 years agoFirst sketch of stream API
Michael Brown [Wed, 31 Jan 2007 00:40:35 +0000 (00:40 +0000)]
First sketch of stream API

14 years agoPlaceholder
Michael Brown [Tue, 30 Jan 2007 22:55:19 +0000 (22:55 +0000)]
Placeholder

14 years agoAdded blocksize for the benefit of HMAC code
Michael Brown [Tue, 30 Jan 2007 22:54:43 +0000 (22:54 +0000)]
Added blocksize for the benefit of HMAC code

14 years agoAdded cipher wrapper functions
Michael Brown [Tue, 30 Jan 2007 22:54:20 +0000 (22:54 +0000)]
Added cipher wrapper functions

14 years agoMissing check-in
Michael Brown [Tue, 30 Jan 2007 22:53:59 +0000 (22:53 +0000)]
Missing check-in

14 years agoGeneralise digest_algorithm to crypto_algorithm.
Michael Brown [Tue, 30 Jan 2007 14:55:17 +0000 (14:55 +0000)]
Generalise digest_algorithm to crypto_algorithm.

14 years agoLow-overhead filter streams
Michael Brown [Tue, 30 Jan 2007 12:17:03 +0000 (12:17 +0000)]
Low-overhead filter streams

14 years agoDefinition of a (hopefully) generic stream API
Michael Brown [Tue, 30 Jan 2007 12:16:36 +0000 (12:16 +0000)]
Definition of a (hopefully) generic stream API

14 years agoUse "dbg_stream" rather than "stream" as a variable name in
Michael Brown [Tue, 30 Jan 2007 10:12:19 +0000 (10:12 +0000)]
Use "dbg_stream" rather than "stream" as a variable name in
DBG_AC_IF(), to avoid namespace collisions.

14 years agoDon't call PXENV_STOP_UNDI in the kpxeprefix. This slighy breaks the
Michael Brown [Mon, 29 Jan 2007 15:21:10 +0000 (15:21 +0000)]
Don't call PXENV_STOP_UNDI in the kpxeprefix.  This slighy breaks the
clean separation between loading and starting, but does mean that more
PXE stacks survive the process.

14 years agoSplit bootsector execution code out into bootsector.c.
Michael Brown [Mon, 29 Jan 2007 04:21:38 +0000 (04:21 +0000)]
Split bootsector execution code out into bootsector.c.

Added basic El Torito ISO image boot capability

14 years agoKeep HTTP progress updated, and display a progress indicator during the
Michael Brown [Mon, 29 Jan 2007 04:19:45 +0000 (04:19 +0000)]
Keep HTTP progress updated, and display a progress indicator during the
download

14 years agoAdded async_block_progress() and default SIGUPDATE handler.
Michael Brown [Mon, 29 Jan 2007 04:15:24 +0000 (04:15 +0000)]
Added async_block_progress() and default SIGUPDATE handler.

14 years agoMoved most buffer debug messages to DBG2.
Michael Brown [Mon, 29 Jan 2007 04:12:29 +0000 (04:12 +0000)]
Moved most buffer debug messages to DBG2.

Make expand_buffer() a non-inline function, so that we can add debug
messages.

Expandable buffers now don't *always* round up to the next power of two.
This allows e.g. loading a 137MB ISO image on a machine with only 256MB
RAM...

14 years agoShould be correct for building RSA
Michael Brown [Sun, 28 Jan 2007 19:50:43 +0000 (19:50 +0000)]
Should be correct for building RSA

14 years agoHandle (64-bit) / (32-bit) = (64-bit), i.e. one step beyond that
Michael Brown [Sun, 28 Jan 2007 19:34:17 +0000 (19:34 +0000)]
Handle (64-bit) / (32-bit) = (64-bit), i.e. one step beyond that
provided by the divl instruction.

14 years agoAdd matrixssl directory
Michael Brown [Fri, 26 Jan 2007 04:36:50 +0000 (04:36 +0000)]
Add matrixssl directory

14 years agoAvoid barfing on gcc's implicit memcpy()s
Michael Brown [Fri, 26 Jan 2007 04:14:25 +0000 (04:14 +0000)]
Avoid barfing on gcc's implicit memcpy()s

14 years agoAllow MatrixSSL code to compile inside gPXE
Michael Brown [Fri, 26 Jan 2007 03:50:17 +0000 (03:50 +0000)]
Allow MatrixSSL code to compile inside gPXE

14 years agoMove tolower() etc to ctype.h as per ISO C
Michael Brown [Fri, 26 Jan 2007 03:25:19 +0000 (03:25 +0000)]
Move tolower() etc to ctype.h as per ISO C

14 years agoAdd 64-bit rotates
Michael Brown [Fri, 26 Jan 2007 02:53:30 +0000 (02:53 +0000)]
Add 64-bit rotates

14 years agoBuild external axtls code
Michael Brown [Fri, 26 Jan 2007 02:03:34 +0000 (02:03 +0000)]
Build external axtls code

14 years agoAdd aes.c and required headers from axtls tree
Michael Brown [Fri, 26 Jan 2007 01:59:37 +0000 (01:59 +0000)]
Add aes.c and required headers from axtls tree

14 years agoEnable the axtls code to at least build within gPXE
Michael Brown [Fri, 26 Jan 2007 01:55:34 +0000 (01:55 +0000)]
Enable the axtls code to at least build within gPXE

14 years ago#if 0 out for now
Michael Brown [Fri, 26 Jan 2007 01:42:16 +0000 (01:42 +0000)]
#if 0 out for now

14 years agoYet more synonyms that people tend to use.
Michael Brown [Fri, 26 Jan 2007 01:30:16 +0000 (01:30 +0000)]
Yet more synonyms that people tend to use.

14 years agoHelp quick testing of building Linux code inside gPXE
Michael Brown [Wed, 24 Jan 2007 23:38:05 +0000 (23:38 +0000)]
Help quick testing of building Linux code inside gPXE

14 years agoAdd Linux-compatible rol32/ror32 functions. Amazingly, gcc will
Michael Brown [Wed, 24 Jan 2007 23:31:58 +0000 (23:31 +0000)]
Add Linux-compatible rol32/ror32 functions.  Amazingly, gcc will
optimise these down to the correct single "roll"/"rorl" instruction.

14 years agoUse base "0" in strtoul for consistency with "mem="
Michael Brown [Wed, 24 Jan 2007 22:54:08 +0000 (22:54 +0000)]
Use base "0" in strtoul for consistency with "mem="

14 years ago"vga=" is specified in decimal, not hex.
Michael Brown [Mon, 22 Jan 2007 23:56:24 +0000 (23:56 +0000)]
"vga=" is specified in decimal, not hex.

14 years agoMisread the definition of the type_of_loader field; it should include a
Michael Brown [Fri, 19 Jan 2007 15:40:01 +0000 (15:40 +0000)]
Misread the definition of the type_of_loader field; it should include a
version.

14 years agoAdded SIGKILL handler
Michael Brown [Fri, 19 Jan 2007 15:19:52 +0000 (15:19 +0000)]
Added SIGKILL handler

14 years agoZeroing out memory before using it can be so important.
Michael Brown [Fri, 19 Jan 2007 14:44:59 +0000 (14:44 +0000)]
Zeroing out memory before using it can be so important.

14 years agoActually, it's probably safer *not* to leave child processes hanging
Michael Brown [Fri, 19 Jan 2007 14:20:41 +0000 (14:20 +0000)]
Actually, it's probably safer *not* to leave child processes hanging
around which still hold pointers to variables belonging to our parent...

14 years agoNote that the SIGCHLD handler could be re-entered.
Michael Brown [Fri, 19 Jan 2007 14:10:13 +0000 (14:10 +0000)]
Note that the SIGCHLD handler could be re-entered.

14 years agoPropagate return status code from last child to fail.
Michael Brown [Fri, 19 Jan 2007 14:00:51 +0000 (14:00 +0000)]
Propagate return status code from last child to fail.

14 years agoHandle structured error codes.
Michael Brown [Fri, 19 Jan 2007 13:52:50 +0000 (13:52 +0000)]
Handle structured error codes.

14 years agoIntroduce structured error codes.
Michael Brown [Fri, 19 Jan 2007 13:15:26 +0000 (13:15 +0000)]
Introduce structured error codes.

14 years agoAdd POSIX prototypes for time functions, to allow external code to build
Michael Brown [Fri, 19 Jan 2007 03:09:22 +0000 (03:09 +0000)]
Add POSIX prototypes for time functions, to allow external code to build
more easily within gPXE.

Note that we don't have function bodies for these functions yet.

14 years agoSplit random number generation out into core/random.c, and create the
Michael Brown [Fri, 19 Jan 2007 02:02:59 +0000 (02:02 +0000)]
Split random number generation out into core/random.c, and create the
correct prototypes for srandom(), rand() and srand().

14 years agovsprintf.h is gPXE-specific; move it to include/gpxe
Michael Brown [Fri, 19 Jan 2007 01:17:23 +0000 (01:17 +0000)]
vsprintf.h is gPXE-specific; move it to include/gpxe

14 years agoUse stdio.h instead of vsprintf.h
Michael Brown [Fri, 19 Jan 2007 01:13:12 +0000 (01:13 +0000)]
Use stdio.h instead of vsprintf.h

14 years agoFinally move the prototypes for printf() and friends to stdio.h
Michael Brown [Fri, 19 Jan 2007 00:58:49 +0000 (00:58 +0000)]
Finally move the prototypes for printf() and friends to stdio.h

14 years ago4.3BSD says that bcopy and bzero are defined in strings.h, not string.h
Michael Brown [Fri, 19 Jan 2007 00:51:13 +0000 (00:51 +0000)]
4.3BSD says that bcopy and bzero are defined in strings.h, not string.h

14 years agoTypo
Michael Brown [Fri, 19 Jan 2007 00:48:13 +0000 (00:48 +0000)]
Typo

14 years agoAdd missing prerequisite include
Michael Brown [Fri, 19 Jan 2007 00:39:12 +0000 (00:39 +0000)]
Add missing prerequisite include

14 years agoA working name resolution framework
Michael Brown [Thu, 18 Jan 2007 22:38:13 +0000 (22:38 +0000)]
A working name resolution framework

14 years agoWhen an async operation dies, orphan its children.
Michael Brown [Thu, 18 Jan 2007 22:36:57 +0000 (22:36 +0000)]
When an async operation dies, orphan its children.

14 years agoHave DHCP set the nameserver, rather than DNS read the DHCP nameserver
Michael Brown [Thu, 18 Jan 2007 21:22:03 +0000 (21:22 +0000)]
Have DHCP set the nameserver, rather than DNS read the DHCP nameserver
value.

14 years agoUse total free memory as advertised window. This seems to be sufficient
Michael Brown [Thu, 18 Jan 2007 20:39:17 +0000 (20:39 +0000)]
Use total free memory as advertised window.  This seems to be sufficient
to avoid drops even on slow NICs.

14 years agoMove include/malloc.h to include/gpxe/malloc.h, since everything in there
Michael Brown [Thu, 18 Jan 2007 20:11:04 +0000 (20:11 +0000)]
Move include/malloc.h to include/gpxe/malloc.h, since everything in there
is now gPXE-specific.  (The standard malloc() et al have been in stdlib.h
for a while).

Add free memory counter.

14 years agoInclude stdlib.h rather than malloc.h
Michael Brown [Thu, 18 Jan 2007 20:06:03 +0000 (20:06 +0000)]
Include stdlib.h rather than malloc.h

14 years agoconsole.h is no longer needed for debugging
Michael Brown [Thu, 18 Jan 2007 19:13:25 +0000 (19:13 +0000)]
console.h is no longer needed for debugging

14 years agoAllow truly arbitrary debug levels to be specified via DEBUG=
Michael Brown [Thu, 18 Jan 2007 19:00:09 +0000 (19:00 +0000)]
Allow truly arbitrary debug levels to be specified via DEBUG=

14 years agoDeclaring the CPU architecture in the middle of an assembly file is
Michael Brown [Thu, 18 Jan 2007 18:53:32 +0000 (18:53 +0000)]
Declaring the CPU architecture in the middle of an assembly file is
somewhat redundant, and also causes gas to complain when we include
the profiling code (which uses an i586 instruction).

14 years agoAdd DBGLVL_PROFILE
Michael Brown [Thu, 18 Jan 2007 17:59:59 +0000 (17:59 +0000)]
Add DBGLVL_PROFILE

14 years agoRemove the one-packet-per-poll-cycle limit; it seems to no longer be
Michael Brown [Thu, 18 Jan 2007 16:50:35 +0000 (16:50 +0000)]
Remove the one-packet-per-poll-cycle limit; it seems to no longer be
needed now that performance is up.

14 years agoIncrease window size to 64kB. Line rate downloads on a 100Mbps link,
Michael Brown [Thu, 18 Jan 2007 16:39:55 +0000 (16:39 +0000)]
Increase window size to 64kB.  Line rate downloads on a 100Mbps link,
anyone?

14 years agoAccelerate memcpy() by around 32% on large, dword-aligned copies.
Michael Brown [Thu, 18 Jan 2007 15:18:02 +0000 (15:18 +0000)]
Accelerate memcpy() by around 32% on large, dword-aligned copies.

14 years agoAllow buffers to be pre-expanded on demand.
Michael Brown [Thu, 18 Jan 2007 15:13:41 +0000 (15:13 +0000)]
Allow buffers to be pre-expanded on demand.

14 years agoPresize the download buffer when we see the Content-Length header;
Michael Brown [Thu, 18 Jan 2007 13:26:57 +0000 (13:26 +0000)]
Presize the download buffer when we see the Content-Length header;
this saves around 70us per received packet (which is around 50% of the
overall packet processing time).

14 years agoReorder functions to more closely reflect the flow of control
Michael Brown [Thu, 18 Jan 2007 13:10:26 +0000 (13:10 +0000)]
Reorder functions to more closely reflect the flow of control

14 years agoDon't always zero memory in malloc(). This saves around 2us on a
Michael Brown [Thu, 18 Jan 2007 12:54:18 +0000 (12:54 +0000)]
Don't always zero memory in malloc().  This saves around 2us on a
full-length PKB allocation.

14 years agoSwitch from calloc() to malloc()+memset() to match the practices used
Michael Brown [Thu, 18 Jan 2007 12:45:58 +0000 (12:45 +0000)]
Switch from calloc() to malloc()+memset() to match the practices used
almost everywhere else.

14 years agoRespect the RX quota. This improves poll time by about 0.7us when the
Michael Brown [Thu, 18 Jan 2007 12:34:12 +0000 (12:34 +0000)]
Respect the RX quota.  This improves poll time by about 0.7us when the
quota is 1.

14 years agoHTTP/DNS now working fully asynchronously. HTTP/IP addresses and any
Michael Brown [Thu, 18 Jan 2007 03:39:45 +0000 (03:39 +0000)]
HTTP/DNS now working fully asynchronously.  HTTP/IP addresses and any
other protocol won't work at the moment.

14 years agoReplacement for fetch() which operates asynchronously and identifies
Michael Brown [Thu, 18 Jan 2007 03:37:05 +0000 (03:37 +0000)]
Replacement for fetch() which operates asynchronously and identifies
protocols by URI scheme.

14 years agoUse struct sockaddr rather than struct sockaddr_tcpip
Michael Brown [Thu, 18 Jan 2007 03:35:00 +0000 (03:35 +0000)]
Use struct sockaddr rather than struct sockaddr_tcpip

Tidy up code

14 years agoAdded async_uninit() to simplify failure paths.
Michael Brown [Thu, 18 Jan 2007 03:29:40 +0000 (03:29 +0000)]
Added async_uninit() to simplify failure paths.

14 years agoAdd utility function to parse port from URI
Michael Brown [Thu, 18 Jan 2007 03:28:55 +0000 (03:28 +0000)]
Add utility function to parse port from URI

14 years agoEnsure that struct sockaddr is long enough...
Michael Brown [Thu, 18 Jan 2007 03:28:29 +0000 (03:28 +0000)]
Ensure that struct sockaddr is long enough...

14 years agoObsolete
Michael Brown [Thu, 18 Jan 2007 01:05:09 +0000 (01:05 +0000)]
Obsolete

14 years agoRename e{malloc,realloc,free} to u{malloc,realloc,free}, to more obviously
Michael Brown [Tue, 16 Jan 2007 08:36:42 +0000 (08:36 +0000)]
Rename e{malloc,realloc,free} to u{malloc,realloc,free}, to more obviously
reflect the fact that they allocate and deallocate user memory (i.e.
things reached through a userptr_t).

14 years agoCreate and use async_block() macro; it cuts down on the visual overhead
Michael Brown [Tue, 16 Jan 2007 08:10:54 +0000 (08:10 +0000)]
Create and use async_block() macro; it cuts down on the visual overhead
of blocking on asynchronous operations, when that isn't an important
aspect of the code.

14 years agoWhen a network device is specified to tcpip_tx() or it's children, treat
Michael Brown [Tue, 16 Jan 2007 04:09:13 +0000 (04:09 +0000)]
When a network device is specified to tcpip_tx() or it's children, treat
it as a fallback network device rather than an explicitly forced network
device.

Clear routing table entries before re-attempting DHCP.

14 years agoImprove debugging
Michael Brown [Tue, 16 Jan 2007 03:29:15 +0000 (03:29 +0000)]
Improve debugging

14 years agoImprove debug messages
Michael Brown [Tue, 16 Jan 2007 03:19:40 +0000 (03:19 +0000)]
Improve debug messages

14 years agoImproved debugging
Michael Brown [Tue, 16 Jan 2007 03:10:37 +0000 (03:10 +0000)]
Improved debugging

14 years agoQuickly hack in DNS resolution as a proof of concept mcb-xen-demo
Michael Brown [Mon, 15 Jan 2007 17:32:52 +0000 (17:32 +0000)]
Quickly hack in DNS resolution as a proof of concept

14 years agoA working DNS resolver (not yet tied in to anything)
Michael Brown [Mon, 15 Jan 2007 17:31:35 +0000 (17:31 +0000)]
A working DNS resolver (not yet tied in to anything)

14 years agoUpdate TFTP and FTP to take the same temporary URI scheme as HTTP
Michael Brown [Mon, 15 Jan 2007 09:58:26 +0000 (09:58 +0000)]
Update TFTP and FTP to take the same temporary URI scheme as HTTP

14 years agoProtocol's get() method no longer takes ownership of the URI. HTTP is the
Michael Brown [Mon, 15 Jan 2007 09:18:06 +0000 (09:18 +0000)]
Protocol's get() method no longer takes ownership of the URI.  HTTP is the
exception rather than the rule; we may as well keep things clean for other
protocols.

14 years agoMust free http on the error path; nothing else will do it
Michael Brown [Mon, 15 Jan 2007 09:08:40 +0000 (09:08 +0000)]
Must free http on the error path; nothing else will do it

14 years agoUnmaintained example code is probably worse than useless.
Michael Brown [Mon, 15 Jan 2007 09:06:12 +0000 (09:06 +0000)]
Unmaintained example code is probably worse than useless.

14 years agoGave asynchronous operations approximate POSIX signal semantics. This
Michael Brown [Mon, 15 Jan 2007 08:49:10 +0000 (08:49 +0000)]
Gave asynchronous operations approximate POSIX signal semantics.  This
will enable us to cascade async operations, which is necessary in order to
properly support DNS.  (For example, an HTTP request may have to redirect
to a new location and will have to perform a new DNS lookup, so we can't
just rely on doing the name lookup at the time of parsing the initial
URL).

Anything other than HTTP is probably broken right now; I'll fix the others
up asap.

14 years agoAdd missing include
Michael Brown [Mon, 15 Jan 2007 08:44:05 +0000 (08:44 +0000)]
Add missing include

14 years agoAdd ETIMEDOUT
Michael Brown [Mon, 15 Jan 2007 02:46:56 +0000 (02:46 +0000)]
Add ETIMEDOUT

14 years agoAdded a URI parser that should be standards conformant. (It can certainly
Michael Brown [Sun, 14 Jan 2007 23:48:31 +0000 (23:48 +0000)]
Added a URI parser that should be standards conformant.  (It can certainly
handle something as convoluted as

  ftp://joe:secret@insecure.org:8081/hidden/path/to?what=is#this

14 years agoSplit DBG() statement containing two inet_ntoa() statements; they
Michael Brown [Sun, 14 Jan 2007 19:58:41 +0000 (19:58 +0000)]
Split DBG() statement containing two inet_ntoa() statements; they
return a static buffer.

14 years agoDump buffer and packet information in PXENV_UDP_READ as well
Michael Brown [Sun, 14 Jan 2007 18:22:37 +0000 (18:22 +0000)]
Dump buffer and packet information in PXENV_UDP_READ as well

14 years agoMake TCP give up immediately when it receives -ENETUNREACH from
Michael Brown [Sun, 14 Jan 2007 16:47:03 +0000 (16:47 +0000)]
Make TCP give up immediately when it receives -ENETUNREACH from
tcpip_tx().  This avoids the irritating wait when you accidentally type
"kernel pxelinux.0" before bringing up the network interface.

Add ENETUNREACH to strerror()'s list.

14 years agoUse -ENETUNREACH to mean "no reachable network device exists, don't bother
Michael Brown [Sun, 14 Jan 2007 16:22:10 +0000 (16:22 +0000)]
Use -ENETUNREACH to mean "no reachable network device exists, don't bother
retrying".

14 years agoAdd the "initrd" command
Michael Brown [Sun, 14 Jan 2007 16:09:48 +0000 (16:09 +0000)]
Add the "initrd" command

14 years agoWe can now load an initrd as well as a kernel
Michael Brown [Sun, 14 Jan 2007 16:09:01 +0000 (16:09 +0000)]
We can now load an initrd as well as a kernel

14 years agoMake the getmemsize() prototype available in memsizes.h, for code that
Michael Brown [Sun, 14 Jan 2007 15:32:25 +0000 (15:32 +0000)]
Make the getmemsize() prototype available in memsizes.h, for code that
doesn't want to go to the hassle of processing a full memory map.