people/lynusvaz/gpxe.git
14 years agoAdded tunctl (since it is difficult to find for many distros).
Michael Brown [Sat, 13 May 2006 09:27:54 +0000 (09:27 +0000)]
Added tunctl (since it is difficult to find for many distros).

14 years agoPreserve the whole of %esp across prot_call(). We have to split this
Michael Brown [Sat, 6 May 2006 19:44:23 +0000 (19:44 +0000)]
Preserve the whole of %esp across prot_call().  We have to split this
between the low half stored in the static variable rm_sp, and the high
half stored on the prot_call() stack, because:

  Just using the stack would screw up when a prot_call()ed routine
  executes a real_call(); it would have no way to find the current top of
  the RM stack.

  Extending rm_sp to rm_esp would not be safe, because the guarantee that
  rm_sp must return to the correct value by the time an external
  real-mode call returns applies only to %sp, not to %esp.

14 years agoAllow access to variables in .text16 as well as .data16. Chained
Michael Brown [Sat, 6 May 2006 18:57:31 +0000 (18:57 +0000)]
Allow access to variables in .text16 as well as .data16.  Chained
interrupt vectors, for example, will be easiest to handle if placed in
.text16.

14 years agoPreserve GDT across prot_call().
Michael Brown [Sat, 6 May 2006 18:52:27 +0000 (18:52 +0000)]
Preserve GDT across prot_call().

14 years agoThis line should not have been checked in
Michael Brown [Thu, 4 May 2006 23:22:42 +0000 (23:22 +0000)]
This line should not have been checked in

14 years agoAdd infrastructure to support access to .data16 (and .text16) variables
Michael Brown [Thu, 4 May 2006 23:14:06 +0000 (23:14 +0000)]
Add infrastructure to support access to .data16 (and .text16) variables
from protected-mode code.

Set up %ds to point to .data16 in prot_to_real, so that code specified
via REAL_EXEC() and friends can access variables in .data16.

Move most real-mode librm variables from .text16 to .data16.

14 years agoAdded methods for efficiently declaring and accessing variables in
Michael Brown [Thu, 4 May 2006 17:00:20 +0000 (17:00 +0000)]
Added methods for efficiently declaring and accessing variables in
.data16.  librm will need to supply "char *data16", i.e. the virtual
address of the start of .data16.

14 years agoBSS is now zeroed by libprefix (along with the otherwise non-zeroable
Michael Brown [Tue, 2 May 2006 21:10:45 +0000 (21:10 +0000)]
BSS is now zeroed by libprefix (along with the otherwise non-zeroable
portions such as the stack) during the installation process.

init_fns() are called from main().  We need to think about initial
control flow some more.

14 years agoTypo
Michael Brown [Tue, 2 May 2006 21:09:29 +0000 (21:09 +0000)]
Typo

14 years agoCreate two easy-to-use entry points in libprefix: install and
Michael Brown [Tue, 2 May 2006 20:51:07 +0000 (20:51 +0000)]
Create two easy-to-use entry points in libprefix: install and
install_prealloc.  I *think* these will suffice for all the 16-bit
prefixes.

14 years ago<name>_size variable is no longer needed, since we don't copy the code.
Michael Brown [Tue, 2 May 2006 16:38:46 +0000 (16:38 +0000)]
<name>_size variable is no longer needed, since we don't copy the code.
However, it's worth adding a .size directive so that objdump reports the
correct sizes for the code fragments.

14 years agoTowards a(nother) new real-mode infrastructure, in which we take
Michael Brown [Tue, 2 May 2006 15:41:21 +0000 (15:41 +0000)]
Towards a(nother) new real-mode infrastructure, in which we take
advantage of the fact that we have to have a permanently-resident block
in base memory.

14 years agoMove stack out to separate object, so that having a stack doesn't drag in
Michael Brown [Tue, 2 May 2006 14:57:48 +0000 (14:57 +0000)]
Move stack out to separate object, so that having a stack doesn't drag in
setup.S.

14 years agoVerified as working
Michael Brown [Tue, 2 May 2006 14:04:21 +0000 (14:04 +0000)]
Verified as working

14 years agoThis should be much more elegant: we use flat real mode for the
Michael Brown [Mon, 1 May 2006 22:35:19 +0000 (22:35 +0000)]
This should be much more elegant: we use flat real mode for the
highmem data, so decompress16 will be able to unpack blocks bigger
than 64kB.

14 years agoChecking in because I don't want to lose this rather neat code for
Michael Brown [Mon, 1 May 2006 21:26:44 +0000 (21:26 +0000)]
Checking in because I don't want to lose this rather neat code for
running the decompresser in 16:16 protected mode using the real-mode
stack.  However, there's an even simpler way to do it...

14 years agoTypo
Michael Brown [Sun, 30 Apr 2006 18:19:39 +0000 (18:19 +0000)]
Typo

14 years agoMerge TCP aborted(), timedout() and closed() methods into a single
Michael Brown [Sun, 30 Apr 2006 16:59:45 +0000 (16:59 +0000)]
Merge TCP aborted(), timedout() and closed() methods into a single
closed() method with a reason code.

14 years agoHalf-way tidy
Michael Brown [Sun, 30 Apr 2006 15:23:29 +0000 (15:23 +0000)]
Half-way tidy

14 years agoMake all TCP methods optional; at least FTP data is a read-only
Michael Brown [Sun, 30 Apr 2006 13:20:40 +0000 (13:20 +0000)]
Make all TCP methods optional; at least FTP data is a read-only
connection and so legitimately ignores acked() and senddata().

14 years agoProof-of-concept FTP implementation
Michael Brown [Sun, 30 Apr 2006 12:02:07 +0000 (12:02 +0000)]
Proof-of-concept FTP implementation

14 years agoAdd a temporary snprintf, so that safely-written code can at least
Michael Brown [Sun, 30 Apr 2006 12:01:31 +0000 (12:01 +0000)]
Add a temporary snprintf, so that safely-written code can at least
compile, even if it won't yet be safe.

14 years agoFix up prototype of strtoul() to match POSIX.
Michael Brown [Sun, 30 Apr 2006 11:45:38 +0000 (11:45 +0000)]
Fix up prototype of strtoul() to match POSIX.

14 years agoCreated net/tcp and moved hello.c there
Michael Brown [Sun, 30 Apr 2006 09:34:11 +0000 (09:34 +0000)]
Created net/tcp and moved hello.c there

14 years agoMake tcp_connect() void; it will eventually have no failure case.
Michael Brown [Sun, 30 Apr 2006 02:13:52 +0000 (02:13 +0000)]
Make tcp_connect() void; it will eventually have no failure case.

14 years agoPut the TCP connection periodic processing in tcp.c, where it belongs.
Michael Brown [Sun, 30 Apr 2006 02:08:42 +0000 (02:08 +0000)]
Put the TCP connection periodic processing in tcp.c, where it belongs.

14 years agoConsistency
Michael Brown [Sun, 30 Apr 2006 01:35:01 +0000 (01:35 +0000)]
Consistency

14 years agoMoved uIP and tcp.c from proto/ to net/
Michael Brown [Sun, 30 Apr 2006 01:16:37 +0000 (01:16 +0000)]
Moved uIP and tcp.c from proto/ to net/

14 years agoMove init.h to gpxe/init.h.
Michael Brown [Sun, 30 Apr 2006 01:08:52 +0000 (01:08 +0000)]
Move init.h to gpxe/init.h.

14 years agoChange semantics of network API so that packet-absorbing calls *always*
Michael Brown [Sat, 29 Apr 2006 17:17:43 +0000 (17:17 +0000)]
Change semantics of network API so that packet-absorbing calls *always*
take ownership of the packet, rather than doing so only if they return
success.  This breaks semantic compatibility with Linux's
hard_start_xmit() method, but means that we don't have to worry so much
about error cases.

Split mechanism of processing received packets (net_rx_process()) out
from policy (net_step()), preparatory to putting net_step() in a separate
object.

14 years agoAdded basic code for implementing co-operative multitasking.
Michael Brown [Sat, 29 Apr 2006 16:42:09 +0000 (16:42 +0000)]
Added basic code for implementing co-operative multitasking.

Yes, you really can do it in 65 bytes.

14 years agoGive uIP a static IP address for proof-of-concept testing
Michael Brown [Fri, 28 Apr 2006 14:15:21 +0000 (14:15 +0000)]
Give uIP a static IP address for proof-of-concept testing

14 years agoNetwork layer now works as a proof of concept
Michael Brown [Fri, 28 Apr 2006 14:13:50 +0000 (14:13 +0000)]
Network layer now works as a proof of concept

14 years agoFix a couple of broken assertions, and align the buffer correctly.
Michael Brown [Fri, 28 Apr 2006 14:09:31 +0000 (14:09 +0000)]
Fix a couple of broken assertions, and align the buffer correctly.

14 years agoTransmit the buffer contents, not the buffer descriptor...
Michael Brown [Fri, 28 Apr 2006 14:08:41 +0000 (14:08 +0000)]
Transmit the buffer contents, not the buffer descriptor...

14 years agoAdd an explicit failure debug message
Michael Brown [Fri, 28 Apr 2006 14:07:41 +0000 (14:07 +0000)]
Add an explicit failure debug message

14 years agoExclude bin directory from tags generation.
Michael Brown [Fri, 28 Apr 2006 14:07:08 +0000 (14:07 +0000)]
Exclude bin directory from tags generation.

Create something that might be usable as a symbol list for bochs'
internal debugger.

14 years agoGave up on adding POSIX errno's as required, and just added (almost) all
Michael Brown [Fri, 28 Apr 2006 13:44:34 +0000 (13:44 +0000)]
Gave up on adding POSIX errno's as required, and just added (almost) all
of them in one go.

EBADIMG has been replaced by ENOEXEC, and EIMGRET by ECANCELED.

14 years agoUpdated instructions to reflect current reality.
Michael Brown [Wed, 26 Apr 2006 00:40:27 +0000 (00:40 +0000)]
Updated instructions to reflect current reality.

14 years agoHardcoded paths to ../../src/bin avoid one step in the instructions.
Michael Brown [Wed, 26 Apr 2006 00:31:04 +0000 (00:31 +0000)]
Hardcoded paths to ../../src/bin avoid one step in the instructions.

14 years agoAvoid the need for a symlink to the BIOS directory; just use the locally
Michael Brown [Wed, 26 Apr 2006 00:25:28 +0000 (00:25 +0000)]
Avoid the need for a symlink to the BIOS directory; just use the locally
checked-out copy.

14 years agoMuch safer to use a TAP device statically allocated with tunctl.
Michael Brown [Wed, 26 Apr 2006 00:15:41 +0000 (00:15 +0000)]
Much safer to use a TAP device statically allocated with tunctl.

14 years agoUpdated to syntax required by latest bochs CVS.
Michael Brown [Wed, 26 Apr 2006 00:14:19 +0000 (00:14 +0000)]
Updated to syntax required by latest bochs CVS.

14 years agoUpdated to current bochs CVS
Michael Brown [Wed, 26 Apr 2006 00:09:52 +0000 (00:09 +0000)]
Updated to current bochs CVS

14 years agoGlenn managed to shrink .text by 5 more bytes.
Michael Brown [Tue, 25 Apr 2006 21:48:16 +0000 (21:48 +0000)]
Glenn managed to shrink .text by 5 more bytes.

14 years agoD'oh
Michael Brown [Tue, 25 Apr 2006 12:56:18 +0000 (12:56 +0000)]
D'oh

14 years agoAdded missing ssize_t
Michael Brown [Tue, 25 Apr 2006 12:55:23 +0000 (12:55 +0000)]
Added missing ssize_t

14 years agoActually, it's probably a good idea to have packet buffers avoid 4kB
Michael Brown [Tue, 25 Apr 2006 12:11:36 +0000 (12:11 +0000)]
Actually, it's probably a good idea to have packet buffers avoid 4kB
crossings.

14 years agoUpdate to use POSIX-like API.
Michael Brown [Tue, 25 Apr 2006 12:04:07 +0000 (12:04 +0000)]
Update to use POSIX-like API.

14 years agoFixed erroneous comparison
Michael Brown [Tue, 25 Apr 2006 11:54:58 +0000 (11:54 +0000)]
Fixed erroneous comparison

14 years agoRemoved incorrect comment; malloc() is inefficient only when the
Michael Brown [Tue, 25 Apr 2006 10:41:49 +0000 (10:41 +0000)]
Removed incorrect comment; malloc() is inefficient only when the
alignment and size are both powers of two, and there's no way to
specify an alignment through the malloc() interface anyway.

14 years agoNow passes trivial tests. free_memblock() needs neatening up.
Michael Brown [Tue, 25 Apr 2006 04:01:58 +0000 (04:01 +0000)]
Now passes trivial tests.  free_memblock() needs neatening up.

14 years agoUpdated memory allocator to improve support for unaligned or partially
Michael Brown [Tue, 25 Apr 2006 03:30:46 +0000 (03:30 +0000)]
Updated memory allocator to improve support for unaligned or partially
aligned blocks.

Moved header to include/malloc.h, since we now also provide the
POSIX-like malloc()/free() pair.

Not yet tested.

14 years agoAdd __constant_flsl(), because it's useful for finding out the next
Michael Brown [Mon, 24 Apr 2006 23:00:32 +0000 (23:00 +0000)]
Add __constant_flsl(), because it's useful for finding out the next
power-of-two up from a given constant via
  ( 1 << fls ( constant - 1 ) )

fls(), flsl(), ffs() and ffsl() appear in strings.h according to
POSIX.

14 years agoAdded missing headers required for compilation in Etherboot.
Michael Brown [Mon, 24 Apr 2006 19:35:10 +0000 (19:35 +0000)]
Added missing headers required for compilation in Etherboot.

14 years agoAdded pkb_reserve().
Michael Brown [Mon, 24 Apr 2006 19:34:51 +0000 (19:34 +0000)]
Added pkb_reserve().

14 years agoWe have our own ARP layer now.
Michael Brown [Mon, 24 Apr 2006 19:19:13 +0000 (19:19 +0000)]
We have our own ARP layer now.

14 years agoAdd missing {register,free}_netdev().
Michael Brown [Mon, 24 Apr 2006 18:44:50 +0000 (18:44 +0000)]
Add missing {register,free}_netdev().

Tie into existing driver API; we'll fix that up soon.

14 years agogcc is rather over-aggressive about optimising out static data structures
Michael Brown [Mon, 24 Apr 2006 18:31:37 +0000 (18:31 +0000)]
gcc is rather over-aggressive about optimising out static data structures
even when __atribute__ (( unused )) is correctly set...

14 years ago(librm_base-1b) is already an offset; no need to apply OFFSET().
Michael Brown [Mon, 24 Apr 2006 18:29:47 +0000 (18:29 +0000)]
(librm_base-1b) is already an offset; no need to apply OFFSET().
Doing so, in fact, seems to expose an assembler bug; (a-b-0) is
apparently not the same as (a-b).  Go figure.

14 years agoHeader rearrangement.
Michael Brown [Mon, 24 Apr 2006 15:42:49 +0000 (15:42 +0000)]
Header rearrangement.

I want to get to the point where any header in include/ reflects a
standard user-level header (e.g. a POSIX header), while everything that's
specific to gPXE lives in include/gpxe/.  Headers that reflect a Linux
header (e.g. if_ether.h) should also be in include/gpxe/, with the same
name as the Linux header and, preferably, the same names used for the
definitions.

14 years agoNetwork API now allows for multiple network devices (although the
Michael Brown [Mon, 24 Apr 2006 15:38:53 +0000 (15:38 +0000)]
Network API now allows for multiple network devices (although the
implementation allows for only one, and does so without compromising on
the efficiency of static allocation).

Link-layer protocols are cleanly separated from the device drivers.

Network-layer protocols are cleanly separated from individual network
devices.

Link-layer and network-layer protocols are cleanly separated from each
other.

14 years agoNetwork API now allows for multiple network devices (although the
Michael Brown [Mon, 24 Apr 2006 15:33:06 +0000 (15:33 +0000)]
Network API now allows for multiple network devices (although the
implementation allows for only one, and does so without compromising on
the efficiency of static allocation).

Link-layer protocols are cleanly separated from the device drivers.

Network-layer protocols are cleanly separated from individual network
devices.

Link-layer and network-layer protocols are cleanly separated from each
other.

14 years agoObviate uip_init(); our bss is zeroed at startup already.
Michael Brown [Mon, 24 Apr 2006 15:31:02 +0000 (15:31 +0000)]
Obviate uip_init(); our bss is zeroed at startup already.

14 years agoDon't bother poisoning lists; it costs code size.
Michael Brown [Mon, 24 Apr 2006 15:28:56 +0000 (15:28 +0000)]
Don't bother poisoning lists; it costs code size.

14 years agoPrototype now clashes with the macro in arch/i386.
Michael Brown [Mon, 24 Apr 2006 15:27:58 +0000 (15:27 +0000)]
Prototype now clashes with the macro in arch/i386.

14 years agoAdded __constant_memcpy() based on version in Linux's string.h.
Michael Brown [Mon, 24 Apr 2006 15:25:25 +0000 (15:25 +0000)]
Added __constant_memcpy() based on version in Linux's string.h.

Added memswap().

14 years agoFirst draft of a dynamic memory allocator
Michael Brown [Mon, 24 Apr 2006 15:21:18 +0000 (15:21 +0000)]
First draft of a dynamic memory allocator

14 years agoAdd "net" directory.
Michael Brown [Mon, 24 Apr 2006 15:20:01 +0000 (15:20 +0000)]
Add "net" directory.

Avoid including debug information in bin/%.s output, since the whole
point is to have easy-to-read assembler.

14 years agoFirst sketch of a new net device API.
Michael Brown [Wed, 19 Apr 2006 12:07:46 +0000 (12:07 +0000)]
First sketch of a new net device API.

14 years agoRemove the concept of the media-independent link-layer header and replace
Michael Brown [Wed, 19 Apr 2006 11:32:24 +0000 (11:32 +0000)]
Remove the concept of the media-independent link-layer header and replace
it with metadata in the pkb structure.  This is required since UNDI will
want to be able to parse the link-layer header without destroying it.

14 years agoUpdated to remove obsolete constants
Michael Brown [Wed, 19 Apr 2006 02:11:56 +0000 (02:11 +0000)]
Updated to remove obsolete constants

14 years agoAdded the concept of a network interface (a network-layer concept) as
Michael Brown [Wed, 19 Apr 2006 02:09:08 +0000 (02:09 +0000)]
Added the concept of a network interface (a network-layer concept) as
separate from a network device (a link-layer concept).

14 years agoTypo
Michael Brown [Wed, 19 Apr 2006 02:08:27 +0000 (02:08 +0000)]
Typo

14 years agoFirst version, based on include/linux/list.h, stripped down to just
Michael Brown [Wed, 19 Apr 2006 02:05:50 +0000 (02:05 +0000)]
First version, based on include/linux/list.h, stripped down to just
those functions we are likely to need.

Still need to come up with a way of getting the linker to create
static lists using this linking mechanism.

14 years agoUpdate now that if_ether.h has moved.
Michael Brown [Wed, 19 Apr 2006 01:56:10 +0000 (01:56 +0000)]
Update now that if_ether.h has moved.

14 years agoAdded ENOENT and EAFNOSUPPORT
Michael Brown [Wed, 19 Apr 2006 01:54:53 +0000 (01:54 +0000)]
Added ENOENT and EAFNOSUPPORT

14 years agoAdded pkb_unput() and pkb_len().
Michael Brown [Wed, 19 Apr 2006 01:54:24 +0000 (01:54 +0000)]
Added pkb_unput() and pkb_len().

14 years agoMake flags more efficient.
Michael Brown [Wed, 19 Apr 2006 01:53:49 +0000 (01:53 +0000)]
Make flags more efficient.

Add 'raw' net_addr facility (needed for ARP).

14 years agoMoved if_ether.h and if_arp.h to include/gpxe, for consistency with Linux
Michael Brown [Wed, 19 Apr 2006 01:52:41 +0000 (01:52 +0000)]
Moved if_ether.h and if_arp.h to include/gpxe, for consistency with Linux
kernel.

Removed obsolete struct arprequest from if_arp.h and put it in nic.c so
that nic.c will still compile.  ARP will very shortly be handled by
net/arp.c instead.

14 years agoFirst version. ARP protocol independence in less than the size of uIP's
Michael Brown [Wed, 19 Apr 2006 01:43:56 +0000 (01:43 +0000)]
First version.  ARP protocol independence in less than the size of uIP's
Ethernet-and-IPv4-only ARP module.  :)

14 years agoAdd missing prototype
Michael Brown [Wed, 19 Apr 2006 01:42:33 +0000 (01:42 +0000)]
Add missing prototype

14 years agoFirst version
Michael Brown [Wed, 19 Apr 2006 01:42:03 +0000 (01:42 +0000)]
First version

14 years agoFirst sketch
Michael Brown [Tue, 18 Apr 2006 17:52:51 +0000 (17:52 +0000)]
First sketch

14 years agoFirst version
Michael Brown [Tue, 18 Apr 2006 17:49:51 +0000 (17:49 +0000)]
First version

14 years agoFirst version, based on the concepts in linux/skbuff.h
Michael Brown [Tue, 18 Apr 2006 17:47:01 +0000 (17:47 +0000)]
First version, based on the concepts in linux/skbuff.h

14 years agoAdded netmask and gateway global options.
Michael Brown [Wed, 5 Apr 2006 11:46:18 +0000 (11:46 +0000)]
Added netmask and gateway global options.

Added iSCSI testing.

14 years agoFirst draft of iSCSI protocol support. Is capable of retrieving disk
Michael Brown [Wed, 5 Apr 2006 11:44:56 +0000 (11:44 +0000)]
First draft of iSCSI protocol support.  Is capable of retrieving disk
blocks.

14 years agoMake pcap_inject non-static, so that its prototype doesn't conflict with
Michael Brown [Wed, 5 Apr 2006 11:44:05 +0000 (11:44 +0000)]
Make pcap_inject non-static, so that its prototype doesn't conflict with
the real pcap_inject in the case where we do have it.

14 years agoAdded tcp_buffer, to give applications a zero-cost place to build data to
Michael Brown [Wed, 5 Apr 2006 11:43:01 +0000 (11:43 +0000)]
Added tcp_buffer, to give applications a zero-cost place to build data to
be transmitted.

14 years agoAdded set_netmask() and set_gateway()
Michael Brown [Wed, 5 Apr 2006 11:41:15 +0000 (11:41 +0000)]
Added set_netmask() and set_gateway()

14 years agoWe don't need to know anything about ARP
Michael Brown [Fri, 24 Mar 2006 17:39:05 +0000 (17:39 +0000)]
We don't need to know anything about ARP

14 years agoAllow specifying the local IP address via --from.
Michael Brown [Fri, 24 Mar 2006 17:28:40 +0000 (17:28 +0000)]
Allow specifying the local IP address via --from.

14 years agoSplit non-TCP portions of the stack out into ip.[ch].
Michael Brown [Fri, 24 Mar 2006 17:22:09 +0000 (17:22 +0000)]
Split non-TCP portions of the stack out into ip.[ch].

Added set_ipaddr().

14 years agoPut in a substitute pcap_inject() function, since earlier versions of
Michael Brown [Fri, 24 Mar 2006 16:43:12 +0000 (16:43 +0000)]
Put in a substitute pcap_inject() function, since earlier versions of
libpcap are lacking the function.  For now, we always use the
substitute version, since there's no easy way to determine whether or
not we need it.

14 years agoMoved "hello world" protocol implementation out of prototester.c and into
Michael Brown [Thu, 23 Mar 2006 22:37:05 +0000 (22:37 +0000)]
Moved "hello world" protocol implementation out of prototester.c and into
the first standalong uIP-based protocol module.

14 years agoAdded container_of(). This seems about the best place to put it, since
Michael Brown [Thu, 23 Mar 2006 22:07:21 +0000 (22:07 +0000)]
Added container_of().  This seems about the best place to put it, since
the definition of it uses offsetof(), and the two concepts are related.

14 years agoPick up the gPXE include files when building prototester.
Michael Brown [Thu, 23 Mar 2006 21:35:20 +0000 (21:35 +0000)]
Pick up the gPXE include files when building prototester.

14 years agoAdded prototype for inet_ntoa, even though we don't have the function
Michael Brown [Thu, 23 Mar 2006 21:34:25 +0000 (21:34 +0000)]
Added prototype for inet_ntoa, even though we don't have the function
yet, in order to allow prototester.c to compile.  It might be worth
changing all the uses of "%@" in printf to use "%s" and inet_ntoa
instead, in order to improve the portability of our code.

14 years agoMoved uIP wrapper out of prototester.c and into proto/tcp.c.
Michael Brown [Thu, 23 Mar 2006 21:32:03 +0000 (21:32 +0000)]
Moved uIP wrapper out of prototester.c and into proto/tcp.c.