Michael Brown [Sun, 14 Jan 2007 04:04:28 +0000 (04:04 +0000)]
Replace image->entry with image->priv.
Michael Brown [Sun, 14 Jan 2007 03:49:07 +0000 (03:49 +0000)]
Mostly updated. Won't work yet.
Michael Brown [Sun, 14 Jan 2007 02:24:41 +0000 (02:24 +0000)]
Obsolete for some time
Michael Brown [Sun, 14 Jan 2007 02:21:02 +0000 (02:21 +0000)]
Fill in BufferSize in PXENV_GET_CACHED_INFO
Michael Brown [Sun, 14 Jan 2007 02:20:10 +0000 (02:20 +0000)]
Select a PXE network device before starting PXE NBP.
Move pxe_boot() code to pxe_image.c
Michael Brown [Sun, 14 Jan 2007 02:01:26 +0000 (02:01 +0000)]
Do not go past the end of the argv[] array.
This bug found by setting read and write watchpoints at NULL in bochs.
Michael Brown [Sun, 14 Jan 2007 00:57:43 +0000 (00:57 +0000)]
Use debug autocolourisation.
Shut down before jumping to the multiboot image.
Michael Brown [Sun, 14 Jan 2007 00:53:56 +0000 (00:53 +0000)]
Call hide_etherboot() from startup(), rather than requiring the prefix to
do it.
Michael Brown [Sun, 14 Jan 2007 00:16:41 +0000 (00:16 +0000)]
Make shutdown functions callable by OS image's exec methods.
Michael Brown [Sun, 14 Jan 2007 00:08:13 +0000 (00:08 +0000)]
Make "boot" a synonym for "imgexec", to match grub
Michael Brown [Sun, 14 Jan 2007 00:06:23 +0000 (00:06 +0000)]
Rename "boot" to "autoboot"
Michael Brown [Sun, 14 Jan 2007 00:03:07 +0000 (00:03 +0000)]
Use _text, rather than assuming _text==0.
Michael Brown [Sun, 14 Jan 2007 00:01:16 +0000 (00:01 +0000)]
Use {get,set}_fbms() so that allocated base memory is correctly hidden.
Michael Brown [Sat, 13 Jan 2007 23:57:31 +0000 (23:57 +0000)]
Provide {get,set}_fbms() in basemem.h.
set_fbms() will also update the E820 hidden region.
Michael Brown [Sat, 13 Jan 2007 23:38:33 +0000 (23:38 +0000)]
Some operating systems get a nasty shock if a region of the E820 map seems
to start on a non-page boundary. Make life safer by rounding out our
edited regions.
Michael Brown [Sat, 13 Jan 2007 17:54:41 +0000 (17:54 +0000)]
Add some trace messages for important events
Michael Brown [Sat, 13 Jan 2007 17:36:17 +0000 (17:36 +0000)]
Advertise a larger MSS to improve TCP performance.
Michael Brown [Sat, 13 Jan 2007 17:28:51 +0000 (17:28 +0000)]
I prefer IMAGE_XXX to XXX_IMAGE.
Add IMAGE_PXE to use the new image format framework. "kernel pxelinux.0"
now works.
Michael Brown [Sat, 13 Jan 2007 17:23:44 +0000 (17:23 +0000)]
Add header for pxe_boot()
Michael Brown [Sat, 13 Jan 2007 16:55:57 +0000 (16:55 +0000)]
Pick up the return status code from the correct place now that we
don't overwrite the parameter block until *after* the debug code.
Michael Brown [Sat, 13 Jan 2007 16:53:55 +0000 (16:53 +0000)]
When an UNDI API call fails, print everything there is to know about it.
Michael Brown [Sat, 13 Jan 2007 16:49:38 +0000 (16:49 +0000)]
Hex dumps are now integrated into the DBG() framework.
Michael Brown [Sat, 13 Jan 2007 14:45:26 +0000 (14:45 +0000)]
Always send EOI. We can't feasibly share interrupts (since we have no
clue what the "previous" interrupt handler will do, which could range
from "just an iret" to "disable the interrupt"), and that means that
we have to take responsibility for ACKing all interrupts. Joy.
Michael Brown [Sat, 13 Jan 2007 01:48:12 +0000 (01:48 +0000)]
Damn Broadcom and their damned incorrect assumptions about x86 memory
allocation.
Michael Brown [Fri, 12 Jan 2007 19:19:59 +0000 (19:19 +0000)]
Add HTTP test support
Michael Brown [Fri, 12 Jan 2007 19:18:13 +0000 (19:18 +0000)]
Fixed HTTP
Michael Brown [Fri, 12 Jan 2007 19:17:25 +0000 (19:17 +0000)]
Whitespace fix
Michael Brown [Fri, 12 Jan 2007 19:14:01 +0000 (19:14 +0000)]
Added ENOENT, since HTTP 404 translates to it
Michael Brown [Fri, 12 Jan 2007 19:11:28 +0000 (19:11 +0000)]
Added isspace() and made strtoul() accept whitespace, as per POSIX.
Michael Brown [Fri, 12 Jan 2007 18:09:14 +0000 (18:09 +0000)]
Damn it; my lovely resilient scheme falls down when you have a protocol
that switches from line-oriented to byte-oriented partway through, such as
HTTP.
Michael Brown [Fri, 12 Jan 2007 17:16:46 +0000 (17:16 +0000)]
No need to maintain a received byte count; we always fill in sequential
order so we can just use buffer->fill.
Michael Brown [Fri, 12 Jan 2007 17:08:37 +0000 (17:08 +0000)]
Added generic line-buffering code (a la stdio)
Michael Brown [Fri, 12 Jan 2007 16:25:05 +0000 (16:25 +0000)]
Place multiboot tables in base memory; at least some OSes won't see it
if we don't.
Michael Brown [Fri, 12 Jan 2007 16:20:51 +0000 (16:20 +0000)]
Print image physical location in registration message.
Michael Brown [Fri, 12 Jan 2007 12:03:19 +0000 (12:03 +0000)]
Ensure multiboot modules are in ascending order of memory start
address, to work around OS bugs.
Michael Brown [Fri, 12 Jan 2007 11:38:04 +0000 (11:38 +0000)]
Fix the memory map.
Michael Brown [Fri, 12 Jan 2007 10:12:11 +0000 (10:12 +0000)]
Code used for load buffer and multiboot image testing
Michael Brown [Fri, 12 Jan 2007 10:08:27 +0000 (10:08 +0000)]
Use dhcp(), imgfetch() etc. to boot rather than dhcp_test().
Michael Brown [Fri, 12 Jan 2007 10:07:56 +0000 (10:07 +0000)]
Added missing declaration.
Michael Brown [Fri, 12 Jan 2007 10:06:59 +0000 (10:06 +0000)]
Make DEBUG=script echo the commands as they are executed
Michael Brown [Fri, 12 Jan 2007 09:53:28 +0000 (09:53 +0000)]
Add "dhcp" command
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.
Michael Brown [Fri, 12 Jan 2007 09:20:11 +0000 (09:20 +0000)]
Added dhcp() user-level command.
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).
Michael Brown [Fri, 12 Jan 2007 08:59:25 +0000 (08:59 +0000)]
Don't print "<NULL>" when we use imgautoselect().
Michael Brown [Fri, 12 Jan 2007 08:58:16 +0000 (08:58 +0000)]
Rearrange struct image to reflect usage of the fields
Michael Brown [Fri, 12 Jan 2007 08:57:51 +0000 (08:57 +0000)]
Add debug message
Michael Brown [Fri, 12 Jan 2007 08:56:48 +0000 (08:56 +0000)]
Ignore comment lines.
Avoid returning errors for comments and empty lines.
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().
Michael Brown [Fri, 12 Jan 2007 08:10:35 +0000 (08:10 +0000)]
Force probing of multiboot before ELF.
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.
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".
Michael Brown [Fri, 12 Jan 2007 07:22:20 +0000 (07:22 +0000)]
Cleaner separation between imgXXX() functions and image_cmd.c
Michael Brown [Fri, 12 Jan 2007 06:26:59 +0000 (06:26 +0000)]
Add free_image
Michael Brown [Fri, 12 Jan 2007 06:05:27 +0000 (06:05 +0000)]
Add basic "fetch" and "imgstat" commands.
Michael Brown [Fri, 12 Jan 2007 06:03:02 +0000 (06:03 +0000)]
Added IMAGE_LOADED flag and find_image()
Michael Brown [Fri, 12 Jan 2007 05:48:22 +0000 (05:48 +0000)]
Be silent if there are no network interfaces
Michael Brown [Fri, 12 Jan 2007 05:27:02 +0000 (05:27 +0000)]
Added missing declaration.
Michael Brown [Fri, 12 Jan 2007 05:26:19 +0000 (05:26 +0000)]
Place command-line inline, to save on memory allocation hassles.
Michael Brown [Fri, 12 Jan 2007 05:24:51 +0000 (05:24 +0000)]
Added basename() to make automatically naming images easier.
Michael Brown [Fri, 12 Jan 2007 03:51:04 +0000 (03:51 +0000)]
Build automatically expanding buffers from struct buffer and erealloc().
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.
Michael Brown [Fri, 12 Jan 2007 03:27:05 +0000 (03:27 +0000)]
Quick and dirty test for emalloc()
Michael Brown [Fri, 12 Jan 2007 03:15:29 +0000 (03:15 +0000)]
First version of an external memory allocator (not tested)
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().
Michael Brown [Fri, 12 Jan 2007 03:13:04 +0000 (03:13 +0000)]
Allow external code to update hidden memory regions.
Michael Brown [Fri, 12 Jan 2007 02:45:46 +0000 (02:45 +0000)]
Nothing (not even hidemem.c) uses this file!
Michael Brown [Fri, 12 Jan 2007 02:43:10 +0000 (02:43 +0000)]
Long since obsoleted by arch/i386/scripts/i386.lds
Michael Brown [Fri, 12 Jan 2007 02:42:14 +0000 (02:42 +0000)]
Obsoleted by arch/i386/interface/pxe/pxe_call.c
Michael Brown [Fri, 12 Jan 2007 02:37:47 +0000 (02:37 +0000)]
We *do* have a __data16_array after all!
Michael Brown [Fri, 12 Jan 2007 01:40:12 +0000 (01:40 +0000)]
Add UNULL
Michael Brown [Fri, 12 Jan 2007 01:37:38 +0000 (01:37 +0000)]
Fix typo
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.
Michael Brown [Thu, 11 Jan 2007 23:45:18 +0000 (23:45 +0000)]
Allow for named images.
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.
Michael Brown [Thu, 11 Jan 2007 23:19:31 +0000 (23:19 +0000)]
alloca() can be useful in some (limited) circumstances.
Michael Brown [Thu, 11 Jan 2007 21:21:02 +0000 (21:21 +0000)]
Populate multiboot information structure before calling OS.
Michael Brown [Thu, 11 Jan 2007 21:20:27 +0000 (21:20 +0000)]
Whoever put together the grub multiboot.h header is insane.
Michael Brown [Thu, 11 Jan 2007 21:19:29 +0000 (21:19 +0000)]
Add command line that can be passed to executed images.
Michael Brown [Thu, 11 Jan 2007 19:42:26 +0000 (19:42 +0000)]
Avoid namespace clashes
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.
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).
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.
Michael Brown [Thu, 11 Jan 2007 17:44:42 +0000 (17:44 +0000)]
Capable of loading a multiboot image into memory
Michael Brown [Thu, 11 Jan 2007 17:44:07 +0000 (17:44 +0000)]
Add placeholder elf_execute()
Michael Brown [Thu, 11 Jan 2007 17:06:25 +0000 (17:06 +0000)]
Limit -ENOEXEC to mean "this is not in my format".
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).
Michael Brown [Thu, 11 Jan 2007 16:22:03 +0000 (16:22 +0000)]
Downloaded from current grub CVS.
Michael Brown [Thu, 11 Jan 2007 16:10:32 +0000 (16:10 +0000)]
Use generic "struct image" rather than "struct elf".
Michael Brown [Thu, 11 Jan 2007 16:07:30 +0000 (16:07 +0000)]
Rename "image" field to "data", because "image->image" is just confusing.
Michael Brown [Thu, 11 Jan 2007 16:04:36 +0000 (16:04 +0000)]
Move include/image.h to include/gpxe/image.h
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.
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).
Michael Brown [Thu, 11 Jan 2007 15:26:17 +0000 (15:26 +0000)]
Print informative error message when boot fails.
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
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.
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.
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.
Michael Brown [Thu, 11 Jan 2007 14:43:15 +0000 (14:43 +0000)]
Add image directory back in
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