people/dverkamp/gpxe.git
13 years agoUse dhcp(), imgfetch() etc. to boot rather than dhcp_test().
Michael Brown [Fri, 12 Jan 2007 10:08:27 +0000 (10:08 +0000)]
Use dhcp(), imgfetch() etc. to boot rather than dhcp_test().

13 years agoAdded missing declaration.
Michael Brown [Fri, 12 Jan 2007 10:07:56 +0000 (10:07 +0000)]
Added missing declaration.

13 years agoMake DEBUG=script echo the commands as they are executed
Michael Brown [Fri, 12 Jan 2007 10:06:59 +0000 (10:06 +0000)]
Make DEBUG=script echo the commands as they are executed

13 years agoAdd "dhcp" command
Michael Brown [Fri, 12 Jan 2007 09:53:28 +0000 (09:53 +0000)]
Add "dhcp" command

13 years agoLet ifmgmt.c take care of calling efree(), since it's the once which
Michael Brown [Fri, 12 Jan 2007 09:46:10 +0000 (09:46 +0000)]
Let ifmgmt.c take care of calling efree(), since it's the once which
took out the contract to eventually call efree() when it called fetch().

Maintain the most recently loaded image at the start of the list, so that
imgautoselect() will pick it.

13 years agoAdded dhcp() user-level command.
Michael Brown [Fri, 12 Jan 2007 09:20:11 +0000 (09:20 +0000)]
Added dhcp() user-level command.

13 years agoUse systematic names for XXX_IMAGE.
Michael Brown [Fri, 12 Jan 2007 09:00:48 +0000 (09:00 +0000)]
Use systematic names for XXX_IMAGE.

Add scripts as an image format (since it's trivial to do).

13 years agoDon't print "<NULL>" when we use imgautoselect().
Michael Brown [Fri, 12 Jan 2007 08:59:25 +0000 (08:59 +0000)]
Don't print "<NULL>" when we use imgautoselect().

13 years agoRearrange struct image to reflect usage of the fields
Michael Brown [Fri, 12 Jan 2007 08:58:16 +0000 (08:58 +0000)]
Rearrange struct image to reflect usage of the fields

13 years agoAdd debug message
Michael Brown [Fri, 12 Jan 2007 08:57:51 +0000 (08:57 +0000)]
Add debug message

13 years agoIgnore comment lines.
Michael Brown [Fri, 12 Jan 2007 08:56:48 +0000 (08:56 +0000)]
Ignore comment lines.

Avoid returning errors for comments and empty lines.

13 years agoAPI change: the raw image will no longer be (hypothetically) discarded
Michael Brown [Fri, 12 Jan 2007 08:15:25 +0000 (08:15 +0000)]
API change: the raw image will no longer be (hypothetically) discarded
after a call to load().

13 years agoForce probing of multiboot before ELF.
Michael Brown [Fri, 12 Jan 2007 08:10:35 +0000 (08:10 +0000)]
Force probing of multiboot before ELF.

13 years agofetch() now knows nothing about struct image; it simply loads a file and
Michael Brown [Fri, 12 Jan 2007 08:02:27 +0000 (08:02 +0000)]
fetch() now knows nothing about struct image; it simply loads a file and
returns the allocated buffer.

13 years agoAllow "imgexec" with no arguments to boot the file that was loaded with
Michael Brown [Fri, 12 Jan 2007 07:32:46 +0000 (07:32 +0000)]
Allow "imgexec" with no arguments to boot the file that was loaded with
"kernel".

13 years agoCleaner separation between imgXXX() functions and image_cmd.c
Michael Brown [Fri, 12 Jan 2007 07:22:20 +0000 (07:22 +0000)]
Cleaner separation between imgXXX() functions and image_cmd.c

13 years agoAdd free_image
Michael Brown [Fri, 12 Jan 2007 06:26:59 +0000 (06:26 +0000)]
Add free_image

13 years agoAdd basic "fetch" and "imgstat" commands.
Michael Brown [Fri, 12 Jan 2007 06:05:27 +0000 (06:05 +0000)]
Add basic "fetch" and "imgstat" commands.

13 years agoAdded IMAGE_LOADED flag and find_image()
Michael Brown [Fri, 12 Jan 2007 06:03:02 +0000 (06:03 +0000)]
Added IMAGE_LOADED flag and find_image()

13 years agoBe silent if there are no network interfaces
Michael Brown [Fri, 12 Jan 2007 05:48:22 +0000 (05:48 +0000)]
Be silent if there are no network interfaces

13 years agoAdded missing declaration.
Michael Brown [Fri, 12 Jan 2007 05:27:02 +0000 (05:27 +0000)]
Added missing declaration.

13 years agoPlace command-line inline, to save on memory allocation hassles.
Michael Brown [Fri, 12 Jan 2007 05:26:19 +0000 (05:26 +0000)]
Place command-line inline, to save on memory allocation hassles.

13 years agoAdded basename() to make automatically naming images easier.
Michael Brown [Fri, 12 Jan 2007 05:24:51 +0000 (05:24 +0000)]
Added basename() to make automatically naming images easier.

13 years agoBuild automatically expanding buffers from struct buffer and erealloc().
Michael Brown [Fri, 12 Jan 2007 03:51:04 +0000 (03:51 +0000)]
Build automatically expanding buffers from struct buffer and erealloc().

13 years agoFix the only bug (which was to use DBGC() in place of DBG()!) and add 4kB
Michael Brown [Fri, 12 Jan 2007 03:28:03 +0000 (03:28 +0000)]
Fix the only bug (which was to use DBGC() in place of DBG()!) and add 4kB
alignment.

13 years agoQuick and dirty test for emalloc()
Michael Brown [Fri, 12 Jan 2007 03:27:05 +0000 (03:27 +0000)]
Quick and dirty test for emalloc()

13 years agoFirst version of an external memory allocator (not tested)
Michael Brown [Fri, 12 Jan 2007 03:15:29 +0000 (03:15 +0000)]
First version of an external memory allocator (not tested)

13 years agoRename copy_user() to memcpy_user(). Add memmove_user() and
Michael Brown [Fri, 12 Jan 2007 03:14:15 +0000 (03:14 +0000)]
Rename copy_user() to memcpy_user().  Add memmove_user() and
userptr_add().

13 years agoAllow external code to update hidden memory regions.
Michael Brown [Fri, 12 Jan 2007 03:13:04 +0000 (03:13 +0000)]
Allow external code to update hidden memory regions.

13 years agoNothing (not even hidemem.c) uses this file!
Michael Brown [Fri, 12 Jan 2007 02:45:46 +0000 (02:45 +0000)]
Nothing (not even hidemem.c) uses this file!

13 years agoLong since obsoleted by arch/i386/scripts/i386.lds
Michael Brown [Fri, 12 Jan 2007 02:43:10 +0000 (02:43 +0000)]
Long since obsoleted by arch/i386/scripts/i386.lds

13 years agoObsoleted by arch/i386/interface/pxe/pxe_call.c
Michael Brown [Fri, 12 Jan 2007 02:42:14 +0000 (02:42 +0000)]
Obsoleted by arch/i386/interface/pxe/pxe_call.c

13 years agoWe *do* have a __data16_array after all!
Michael Brown [Fri, 12 Jan 2007 02:37:47 +0000 (02:37 +0000)]
We *do* have a __data16_array after all!

13 years agoAdd UNULL
Michael Brown [Fri, 12 Jan 2007 01:40:12 +0000 (01:40 +0000)]
Add UNULL

13 years agoFix typo
Michael Brown [Fri, 12 Jan 2007 01:37:38 +0000 (01:37 +0000)]
Fix typo

13 years agoWe may be required to page-align modules, so let's make sure we catch
Michael Brown [Fri, 12 Jan 2007 00:09:16 +0000 (00:09 +0000)]
We may be required to page-align modules, so let's make sure we catch
it if we don't.

13 years agoAllow for named images.
Michael Brown [Thu, 11 Jan 2007 23:45:18 +0000 (23:45 +0000)]
Allow for named images.

13 years agoProvide registration mechanism for loaded images, so that we can e.g.
Michael Brown [Thu, 11 Jan 2007 23:43:29 +0000 (23:43 +0000)]
Provide registration mechanism for loaded images, so that we can e.g.
refer to them by name from the command line, or build them into a
multiboot module list.

Use setting image->type to disambiguate between "not my image" and "bad
image"; this avoids relying on specific values of the error code.

13 years agoalloca() can be useful in some (limited) circumstances.
Michael Brown [Thu, 11 Jan 2007 23:19:31 +0000 (23:19 +0000)]
alloca() can be useful in some (limited) circumstances.

13 years agoPopulate multiboot information structure before calling OS.
Michael Brown [Thu, 11 Jan 2007 21:21:02 +0000 (21:21 +0000)]
Populate multiboot information structure before calling OS.

13 years agoWhoever put together the grub multiboot.h header is insane.
Michael Brown [Thu, 11 Jan 2007 21:20:27 +0000 (21:20 +0000)]
Whoever put together the grub multiboot.h header is insane.

13 years agoAdd command line that can be passed to executed images.
Michael Brown [Thu, 11 Jan 2007 21:19:29 +0000 (21:19 +0000)]
Add command line that can be passed to executed images.

13 years agoAvoid namespace clashes
Michael Brown [Thu, 11 Jan 2007 19:42:26 +0000 (19:42 +0000)]
Avoid namespace clashes

13 years agoAdded fields present in the documentation but not in the header file.
Michael Brown [Thu, 11 Jan 2007 19:41:13 +0000 (19:41 +0000)]
Added fields present in the documentation but not in the header file.

13 years agoCapable of starting a multiboot kernel (albeit without the multiboot
Michael Brown [Thu, 11 Jan 2007 18:41:15 +0000 (18:41 +0000)]
Capable of starting a multiboot kernel (albeit without the multiboot
information table yet).

13 years agoAdd PHYS_CODE, for use as in __asm__ ( PHYS_CODE ( ... ) ), comparable
Michael Brown [Thu, 11 Jan 2007 18:40:46 +0000 (18:40 +0000)]
Add PHYS_CODE, for use as in __asm__ ( PHYS_CODE ( ... ) ), comparable
to the REAL_CODE interface.

13 years agoCapable of loading a multiboot image into memory
Michael Brown [Thu, 11 Jan 2007 17:44:42 +0000 (17:44 +0000)]
Capable of loading a multiboot image into memory

13 years agoAdd placeholder elf_execute()
Michael Brown [Thu, 11 Jan 2007 17:44:07 +0000 (17:44 +0000)]
Add placeholder elf_execute()

13 years agoLimit -ENOEXEC to mean "this is not in my format".
Michael Brown [Thu, 11 Jan 2007 17:06:25 +0000 (17:06 +0000)]
Limit -ENOEXEC to mean "this is not in my format".

13 years agoDistinguish between ENOMEM (as representing a lack of internal memory
Michael Brown [Thu, 11 Jan 2007 16:30:21 +0000 (16:30 +0000)]
Distinguish between ENOMEM (as representing a lack of internal memory
as allocated by malloc()) versus all other errors, in particular
ENOBUFS (representing a lack of external buffer space, e.g. in a
device's TX queue or a user buffer).

13 years agoDownloaded from current grub CVS.
Michael Brown [Thu, 11 Jan 2007 16:22:03 +0000 (16:22 +0000)]
Downloaded from current grub CVS.

13 years agoUse generic "struct image" rather than "struct elf".
Michael Brown [Thu, 11 Jan 2007 16:10:32 +0000 (16:10 +0000)]
Use generic "struct image" rather than "struct elf".

13 years agoRename "image" field to "data", because "image->image" is just confusing.
Michael Brown [Thu, 11 Jan 2007 16:07:30 +0000 (16:07 +0000)]
Rename "image" field to "data", because "image->image" is just confusing.

13 years agoMove include/image.h to include/gpxe/image.h
Michael Brown [Thu, 11 Jan 2007 16:04:36 +0000 (16:04 +0000)]
Move include/image.h to include/gpxe/image.h

13 years agoHad this file lying around for ages; may as well check it in.
Michael Brown [Thu, 11 Jan 2007 15:31:50 +0000 (15:31 +0000)]
Had this file lying around for ages; may as well check it in.

13 years agoTry image as ELF file first. (Don't yet actually try to execute it).
Michael Brown [Thu, 11 Jan 2007 15:27:06 +0000 (15:27 +0000)]
Try image as ELF file first.  (Don't yet actually try to execute it).

13 years agoPrint informative error message when boot fails.
Michael Brown [Thu, 11 Jan 2007 15:26:17 +0000 (15:26 +0000)]
Print informative error message when boot fails.

13 years agoCreate include/gpxe/elf.h for the ELF bits that aren't part of the ELF
Michael Brown [Thu, 11 Jan 2007 15:25:07 +0000 (15:25 +0000)]
Create include/gpxe/elf.h for the ELF bits that aren't part of the ELF
standard and so don't belong in include/elf.h

13 years agoUpdate TFTP to use a struct buffer rather than a callback.
Michael Brown [Thu, 11 Jan 2007 15:14:54 +0000 (15:14 +0000)]
Update TFTP to use a struct buffer rather than a callback.

Add debug autocolourisation to TFTP.

13 years agoUse physical address in debug messages; they make more sense to read.
Michael Brown [Thu, 11 Jan 2007 15:08:58 +0000 (15:08 +0000)]
Use physical address in debug messages; they make more sense to read.

13 years agoRemoved the Etherboot-specific ELF-image code and replaced it with a
Michael Brown [Thu, 11 Jan 2007 14:44:03 +0000 (14:44 +0000)]
Removed the Etherboot-specific ELF-image code and replaced it with a
generic ELF loader, to be used by the multiboot code.

13 years agoAdd image directory back in
Michael Brown [Thu, 11 Jan 2007 14:43:15 +0000 (14:43 +0000)]
Add image directory back in

13 years agoRemove osloader.c and replace with a prep_segment() that uses userptr_t
Michael Brown [Thu, 11 Jan 2007 14:32:26 +0000 (14:32 +0000)]
Remove osloader.c and replace with a prep_segment() that uses userptr_t
and get_memmap() in image/segment.c

13 years agoAdded user_to_phys() and memset_user().
Michael Brown [Thu, 11 Jan 2007 14:27:27 +0000 (14:27 +0000)]
Added user_to_phys() and memset_user().

13 years agoMove memmap.h out of arch/i386; it no longer contains anything
Michael Brown [Thu, 11 Jan 2007 14:08:44 +0000 (14:08 +0000)]
Move memmap.h out of arch/i386; it no longer contains anything
architecture-dependent and is needed by the ELF code.

13 years agoAdd phys_to_user() and copy_user().
Michael Brown [Thu, 11 Jan 2007 14:01:20 +0000 (14:01 +0000)]
Add phys_to_user() and copy_user().

13 years agobuffer.c should be using copy_{to,from}_user, rather than
Michael Brown [Thu, 11 Jan 2007 05:42:06 +0000 (05:42 +0000)]
buffer.c should be using copy_{to,from}_user, rather than
copy_{to,from}_phys.

13 years agoI hate NULL pointer dereferences.
Michael Brown [Thu, 11 Jan 2007 05:27:02 +0000 (05:27 +0000)]
I hate NULL pointer dereferences.

13 years agoUse pkb_pad() rather than doing it the dangerous way :)
Michael Brown [Thu, 11 Jan 2007 05:26:16 +0000 (05:26 +0000)]
Use pkb_pad() rather than doing it the dangerous way :)

13 years agoExtract packet-padding login from rtl8139.c to a separate pkbpad.c file.
Michael Brown [Thu, 11 Jan 2007 05:25:50 +0000 (05:25 +0000)]
Extract packet-padding login from rtl8139.c to a separate pkbpad.c file.

13 years agoChange FTP to use a data buffer rather than a callback function.
Michael Brown [Thu, 11 Jan 2007 04:51:20 +0000 (04:51 +0000)]
Change FTP to use a data buffer rather than a callback function.

13 years agoFix bug in buffer.c, add buffer mini-unit test.
Michael Brown [Thu, 11 Jan 2007 04:46:41 +0000 (04:46 +0000)]
Fix bug in buffer.c, add buffer mini-unit test.

13 years agoAdded strerror(0)=="No error", so that TCP protocols can use
Michael Brown [Thu, 11 Jan 2007 04:01:31 +0000 (04:01 +0000)]
Added strerror(0)=="No error", so that TCP protocols can use
strerror(rc) in their closed() methods without producing "Error
0x0000" when the connection is closed normally.

13 years agoUpdate buffer-handling code to enable expandable buffers.
Michael Brown [Thu, 11 Jan 2007 03:50:47 +0000 (03:50 +0000)]
Update buffer-handling code to enable expandable buffers.

13 years agoMove include/buffer.h to include/gpxe/buffer.h
Michael Brown [Thu, 11 Jan 2007 01:47:26 +0000 (01:47 +0000)]
Move include/buffer.h to include/gpxe/buffer.h

13 years agoWarn when net device on an active route is not open.
Michael Brown [Wed, 10 Jan 2007 20:58:36 +0000 (20:58 +0000)]
Warn when net device on an active route is not open.

13 years agoAdd "route" command (which currently only displays the routing table; it
Michael Brown [Wed, 10 Jan 2007 20:51:14 +0000 (20:51 +0000)]
Add "route" command (which currently only displays the routing table; it
can't modify it).

13 years agoAdd route() function to display routing table.
Michael Brown [Wed, 10 Jan 2007 20:38:20 +0000 (20:38 +0000)]
Add route() function to display routing table.

13 years agoTry booting from the "boot" network device first (i.e. the one which we
Michael Brown [Wed, 10 Jan 2007 20:21:42 +0000 (20:21 +0000)]
Try booting from the "boot" network device first (i.e. the one which we
were loaded from).  The code to identify this device isn't present yet,
but the code to act upon the knowledge is.

13 years agoAdd find_pci_netdev()
Michael Brown [Wed, 10 Jan 2007 16:16:05 +0000 (16:16 +0000)]
Add find_pci_netdev()

13 years agoAdd device description fields to struct device.
Michael Brown [Wed, 10 Jan 2007 15:27:48 +0000 (15:27 +0000)]
Add device description fields to struct device.

13 years agoGive UNDI device a more meaningful name.
Michael Brown [Wed, 10 Jan 2007 05:52:04 +0000 (05:52 +0000)]
Give UNDI device a more meaningful name.

13 years agoForce ordering of commands within help list.
Michael Brown [Wed, 10 Jan 2007 05:13:20 +0000 (05:13 +0000)]
Force ordering of commands within help list.

13 years agoForce ordering of commands in help list.
Michael Brown [Wed, 10 Jan 2007 05:10:30 +0000 (05:10 +0000)]
Force ordering of commands in help list.

13 years agoHaving forced __table() to natural structure alignment, it now seems
Michael Brown [Wed, 10 Jan 2007 05:08:05 +0000 (05:08 +0000)]
Having forced __table() to natural structure alignment, it now seems
that we *can* place arrays in tables, which means we can force the
order within a table without having to resort to explicitly numbered
sections on everything.

13 years agoAdd "name" field to struct device to allow human-readable hardware device
Michael Brown [Wed, 10 Jan 2007 04:22:09 +0000 (04:22 +0000)]
Add "name" field to struct device to allow human-readable hardware device
names.

Add "dev" pointer in struct net_device to tie network interfaces back to a
hardware device.

Force natural alignment of data types in __table() macros.  This seems to
prevent gcc from taking the unilateral decision to occasionally increase
their alignment (which screws up the table packing).

13 years agoRemove uIP; we haven't used it for quite some time now.
Michael Brown [Wed, 10 Jan 2007 02:52:58 +0000 (02:52 +0000)]
Remove uIP; we haven't used it for quite some time now.

13 years agoAllow udp_{send,sendto,sendto_via} to be called outside of the
Michael Brown [Wed, 10 Jan 2007 02:46:39 +0000 (02:46 +0000)]
Allow udp_{send,sendto,sendto_via} to be called outside of the
udp_senddata() callback.  This will simplify any UDP protocols that don't
need the temporary buffer.

13 years agoDHCP transmits via specified net device, so no need to create a dummy
Michael Brown [Wed, 10 Jan 2007 02:37:23 +0000 (02:37 +0000)]
DHCP transmits via specified net device, so no need to create a dummy
routing table entry just to fool ipv4.c any more.

13 years agoAdd udp_sendto_via() to allow e.g. DHCP to transmit without first having
Michael Brown [Wed, 10 Jan 2007 02:31:38 +0000 (02:31 +0000)]
Add udp_sendto_via() to allow e.g. DHCP to transmit without first having
to set up dummy routing entries.

13 years agoAllow an explicit network device to be specified for IP-layer
Michael Brown [Wed, 10 Jan 2007 02:25:11 +0000 (02:25 +0000)]
Allow an explicit network device to be specified for IP-layer
transmissions.

13 years agoAdd interface management commands
Michael Brown [Wed, 10 Jan 2007 02:04:07 +0000 (02:04 +0000)]
Add interface management commands

13 years agoMove header file for usr/autoboot.c to include/usr
Michael Brown [Wed, 10 Jan 2007 02:03:20 +0000 (02:03 +0000)]
Move header file for usr/autoboot.c to include/usr

13 years agoAdded network interface management commands
Michael Brown [Wed, 10 Jan 2007 01:55:07 +0000 (01:55 +0000)]
Added network interface management commands

13 years agoAdd "name" field to network device, to facilitate netdev commands.
Michael Brown [Tue, 9 Jan 2007 23:48:18 +0000 (23:48 +0000)]
Add "name" field to network device, to facilitate netdev commands.

13 years agoAdd RX quotas to the net device poll() method. This avoids the problem
Michael Brown [Tue, 9 Jan 2007 21:47:01 +0000 (21:47 +0000)]
Add RX quotas to the net device poll() method.  This avoids the problem
of alloc_pkb() exhaustion when e.g. an iSCSI-booted DOS session is left
idle for a long time at the C:\ prompt and builds up a huge packet
backlog.

13 years agoAutopadding was sometimes overwriting the struct list_head at the end
Michael Brown [Tue, 9 Jan 2007 21:01:55 +0000 (21:01 +0000)]
Autopadding was sometimes overwriting the struct list_head at the end
of the packet buffer.  Although pkbuffs are guaranteed to be at least
PKB_ZLEN bytes long, there's no guarantee that the data starts at the
start of the packet buffer.

Since we have to align data for rtl8139 anyway, and since the start of
the packet buffer is guaranteed to be aligned to PKB_ALIGN, we may as
well just shuffle the packet down so that it starts at the start of
the packet buffer.  This simultaneously aligns the packet and ensures
that there is enough room for the zero-padding.

13 years agoRename pkb_available() to pkb_tailroom() for consistency with Linux's
Michael Brown [Tue, 9 Jan 2007 20:56:31 +0000 (20:56 +0000)]
Rename pkb_available() to pkb_tailroom() for consistency with Linux's
skb_tailroom().  Add pkb_headroom().

13 years agoAdded net device TX queue; this will be needed to support the PXE UNDI API
Michael Brown [Tue, 9 Jan 2007 20:18:31 +0000 (20:18 +0000)]
Added net device TX queue; this will be needed to support the PXE UNDI API
(which will need us to wait for TX completions).

Added debug autocolourisation to netdevice.c

13 years agoMove start/stop/expire debug messages to DBG2() level.
Michael Brown [Tue, 9 Jan 2007 17:39:52 +0000 (17:39 +0000)]
Move start/stop/expire debug messages to DBG2() level.